Let's say you want to find all PRPs with the form k^n+n
for k = 6
and n < 10000
https://sourceforge.net/projects/openpfgw/
Go to https://pinetools.com/generate-list-numbers
In our example, you would fill in the following:
using Primes | |
function appendLeft(num, base, prims = []) | |
for n in 1:(base-1) | |
leftAppended = parse(BigInt, "$n$num", base = base) | |
if isprime(leftAppended) | |
appendLeft("$n$num", base, prims) | |
else | |
if ("$num" in prims) == false | |
push!(prims, "$num") |
Let's say you want to find all PRPs with the form k^n+n
for k = 6
and n < 10000
https://sourceforge.net/projects/openpfgw/
Go to https://pinetools.com/generate-list-numbers
In our example, you would fill in the following:
6564953747038235790955217330623214601774215358095936006017110214784860168687227631027635937839153757268380642974079467157334809566999540962148704233794850102097231093372707426616562692617106981691872758671712110601540505296280467223417393799786109394608287675526571645626442023311821444974297444491272713503050842692707454144812229426034131743996661007715345018917604748834080149496485127824272414386407155506056534722573065665058662947434721059145788344714873337189186944176649103698979268480570375719992781428767497822025468002474658914212189996461627669962337714237025844747155610322336476635982392947311400713905569889295619682873789914852700713265655533621966991091545559256866123490950539453524126917512556053020524791870367438813728085218574561793464589185584667137527301268689841454825589001774026515152992307669651794159610073155993294468509578431647455474435187659015344735661080488116422219151150513430742172406608569003085896799891013375757397457153381693475634334147234494649818673347328769575430106983888770141 |
<?php | |
class T5KParser { | |
private $primelistURL = 'https://t5k.org/primes/lists/all.txt'; | |
private $primelistRaw; | |
public $primes = []; | |
public $proofcodes = []; | |
public function parse() { |
const bitstringToBigInt = bstr => { | |
let counter = 0n; | |
let byteindex = 0n; | |
for (let i = bstr.length - 1; i >= 0; i--) { | |
if (bstr[i] === '1') { | |
counter += 2n**byteindex; | |
} | |
byteindex++; |
class NumberFormatter { | |
constructor() { | |
} | |
toDec(numstr) { | |
return parseInt(numstr, 10).toString(10); | |
} | |
toHex(numstr) { |