login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A281299
Primes p whose binary representation p_2 is the decimal representation of a prime q; and also the sum of the decimal digits of p equals the sum of the digits of p_2.
0
5011, 7001, 11251, 22501, 32303, 32411, 90031, 101107, 104123, 108011, 111323, 121343, 122131, 124001, 125101, 141023, 224011, 233021, 235003, 241141, 321203, 324011, 421303, 432031, 442201, 510331, 511213, 520411, 801011, 1000183, 1000541, 1001191, 1005223, 1006231
OFFSET
1,1
COMMENTS
Intersection of A037308 and A065720.
EXAMPLE
a(1) = 5011 is a prime;
5011_2 = 1001110010011_10 is a prime;
5 + 0 + 1 + 1 = 7;
1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 1 + 1 = 7; both the digit sums are equal.
MATHEMATICA
Select[Prime[Range[1000000]], PrimeQ[FromDigits[IntegerDigits[#, 2]]] && Plus @@ IntegerDigits[#] == Plus @@ IntegerDigits[FromDigits[IntegerDigits[#, 2]]] &]
PROG
(PARI) eva(n) = subst(Pol(n), x, 10)
is(n) = ispseudoprime(n) && ispseudoprime(eva(binary(n))) && sumdigits(n)==sumdigits(eva(binary(n))) \\ Felix Fröhlich, Jan 19 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jan 19 2017
STATUS
approved