cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065722 Primes that when written in base 4, then reinterpreted in base 10, again give primes.

This page as a plain text file.
%I A065722 #31 Dec 08 2024 20:41:38
%S A065722 2,3,5,7,11,13,17,19,23,29,37,43,47,53,61,71,73,79,83,97,103,107,109,
%T A065722 113,131,149,151,157,163,167,181,191,193,197,227,233,241,251,277,293,
%U A065722 307,311,313,317,349,359,373,389,401,419,421,433,443,449,463,467,503
%N A065722 Primes that when written in base 4, then reinterpreted in base 10, again give primes.
%C A065722 In general rebase notation (Marc LeBrun): p4 = (4) [p] (10).
%H A065722 Harry J. Smith, <a href="/A065722/b065722.txt">Table of n, a(n) for n=1..1000</a>
%H A065722 Brady Haran and Grant Sanderson, <a href="https://www.youtube.com/watch?v=jhObLT1Lrfo">Paterson Primes</a>, YouTube/Numberphile video, Nov. 2022.
%H A065722 M. F. Hasler, <a href="https://docs.google.com/document/d/10IM7fcAbB2tqRGuwfGvuEGUzD_IXbgXPDK0tfxN4M3o/pub">Primes whose base c expansion is also the base b expansion of a prime</a>
%F A065722 Numbers n such that A049084(n)>0 and A049084(A007090(n))>0. - _R. J. Mathar_, Jun 15 2007
%e A065722 The decimal prime 29 in base 4 is 131 which is again a prime in base 10.
%e A065722 E.g., 509_10 = 13331_4 is prime but also 13331_10.
%p A065722 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
%t A065722 Select[ Range[505], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 4]]] & ]
%o A065722 (PARI) isok(p)={ isprime(p) && isprime(fromdigits(digits(p,4))) } \\ _Harry J. Smith_, Oct 27 2009
%Y A065722 Cf. A065720-A065727, A065361.
%Y A065722 Cf. A004678, A107715, A090707.
%K A065722 nonn,base
%O A065722 1,1
%A A065722 _Patrick De Geest_, Nov 15 2001
%E A065722 Edited by _N. J. A. Sloane_, Jul 02 2008 at the suggestion of _R. J. Mathar_