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!)
A065720 Primes whose binary representation is also the decimal representation of a prime. 86
3, 5, 23, 47, 89, 101, 149, 157, 163, 173, 179, 199, 229, 313, 331, 367, 379, 383, 443, 457, 523, 587, 631, 643, 647, 653, 659, 709, 883, 947, 997, 1009, 1091, 1097, 1163, 1259, 1277, 1283, 1289, 1321, 1483, 1601, 1669, 1693, 1709, 1753, 1877, 2063, 2069, 2099 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
In general rebase notation (Marc LeBrun): p2 = (2) [p] (10).
Also: Primes in A036952. - M. F. Hasler, Dec 11 2012
See A089971 for the binary representation of these terms. - M. F. Hasler, Jan 05 2014
LINKS
Harry J. Smith and K. D. Bajpai, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
Carlos Rivera, Puzzle 280. 3893257, The Prime Puzzles & Problems Connection.
FORMULA
Equals A036952 intersect A000040. - M. F. Hasler, Dec 11 2012
EXAMPLE
1009{10} = 1111110001{2} is prime, and 1111110001{10} is also prime.
89 is in the sequence because it is a prime. Binary representation of 89 = 1011001, which is also a prime.
MAPLE
select(t -> isprime(t) and isprime(convert(t, binary)), [seq(2*i+1, i=1..1000)]); # Robert Israel, Jul 08 2014
MATHEMATICA
Select[ Range[1900], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 2]]] & ]
Select[ Prime@ Range@ 330, PrimeQ[ FromDigits[ IntegerDigits[#, 2]]] &] (* Robert G. Wilson v, Oct 09 2014 *)
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); e); n=0; for (m=1, 10^9, p=prime(m); b=baseE(p, 2); if (isprime(b), write("b065720.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 27 2009
(PARI) isok(p) = isprime(p) && isprime(fromdigits(binary(p), 10)); \\ Michel Marcus, Mar 04 2022
(Python)
from sympy import isprime
def ok(n): return isprime(n) and isprime(int(bin(n)[2:]))
print([k for k in range(2100) if ok(k)]) # Michael S. Branicky, Mar 04 2022
CROSSREFS
Sequence in context: A214876 A280273 A036952 * A148554 A120937 A075307
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Nov 15 2001
EXTENSIONS
a(48)-a(50) from K. D. Bajpai, Jul 04 2014
STATUS
approved

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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)