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.

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.

Original entry on oeis.org

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

Views

Author

K. D. Bajpai, Jan 19 2017

Keywords

Comments

Intersection of A037308 and A065720.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000000]], PrimeQ[FromDigits[IntegerDigits[#, 2]]] && Plus @@ IntegerDigits[#] == Plus @@ IntegerDigits[FromDigits[IntegerDigits[#, 2]]] &]
  • 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