login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065725 Primes p such that the decimal expansion of its base-7 conversion is also prime. 5

%I #16 Nov 10 2022 14:44:59

%S 2,3,5,17,29,31,43,59,71,127,157,197,211,227,239,241,337,353,367,379,

%T 409,463,491,563,577,619,647,743,757,773,787,857,911,953,967,1093,

%U 1123,1163,1193,1249,1303,1373,1429,1459,1471,1499,1583,1597,1613,1627,1669

%N Primes p such that the decimal expansion of its base-7 conversion is also prime.

%C In general rebase notation (Marc LeBrun): p7 = (7) [p] (10).

%H Harry J. Smith, <a href="/A065725/b065725.txt">Table of n, a(n) for n = 1..1000</a>

%e E.g., 787_10 = 2203_7 is prime, and so is 2203_10.

%t Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 7]]] & ]

%t Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,7]]]&] (* _Harvey P. Dale_, Nov 10 2022 *)

%o (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, 7); if (isprime(b), write("b065725.txt", n++, " ", p); if (n==1000, return)) ) } \\ _Harry J. Smith_, Oct 27 2009

%o (PARI) isok(p) = isprime(p) && isprime(fromdigits(digits(p, 7), 10)); \\ _Michel Marcus_, Mar 05 2022

%Y Cf. A065720 up to A065727, A065361.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Nov 15 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)