OFFSET
1,1
COMMENTS
In general rebase notation (Marc LeBrun): p4 = (4) [p] (10).
LINKS
Harry J. Smith, Table of n, a(n) for n=1..1000
Brady Haran and Grant Sanderson, Paterson Primes, YouTube/Numberphile video, Nov. 2022.
FORMULA
EXAMPLE
The decimal prime 29 in base 4 is 131 which is again a prime in base 10.
E.g., 509_10 = 13331_4 is prime but also 13331_10.
MAPLE
A007090 := proc(n) local b4digs ; b4digs := convert(n, base, 4) ; add( op(i, b4digs)*10^(i-1), i=1..nops(b4digs)) ; end: isA065722 := proc(n) local rebase ; if isprime(n) then rebase := A007090(n) ; RETURN(isprime(rebase)) ; else RETURN(false) ; fi ; end: for n from 1 to 1000 do p := ithprime(n) : if isA065722(p) then printf("%d, ", p) ; fi : od : # R. J. Mathar, Jun 15 2007
MATHEMATICA
Select[ Range[505], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 4]]] & ]
PROG
(PARI) baseE(x, b)= { local(d, e=0, f=1); while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) } { n=0; for (m=1, 10^9, p=prime(m); b=baseE(p, 4); if (isprime(b), write("b065722.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 27 2009
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Nov 15 2001
EXTENSIONS
Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar
STATUS
approved