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.

A243441 Primes p such that p + A000120(p) is also a prime, where A000120 = sum of digits in base 2 = Hamming weight.

Original entry on oeis.org

2, 3, 5, 17, 43, 163, 277, 311, 347, 373, 461, 479, 571, 643, 673, 821, 853, 857, 881, 977, 983, 1013, 1093, 1103, 1117, 1181, 1223, 1297, 1427, 1433, 1439, 1481, 1523, 1607, 1613, 1621, 1823, 1861, 1871, 1873, 2003, 2083, 2281, 2333, 2393, 2417, 2467, 2549
Offset: 1

Views

Author

Anthony Sand, Jun 05 2014

Keywords

Examples

			2 + digitsum(2,base=2) = 2 + digitsum(10) = 2 + 1 = 3, which is prime.
3 + digitsum(11) = 3 + 2 = 5.
5 + digitsum(101) = 5 + 2 = 7.
17 + digitsum(10001) = 17 + 2 = 19.
43 + digitsum(101011) = 43 + 4 = 47.
		

Crossrefs

Cf. A000120, A092391 (n + A000120(n)), A048519 (analog for base 10).
Cf. A243442 (analog for p - A000120(p)).

Programs

  • Mathematica
    Select[Prime@ Range@ 400, PrimeQ[# + Total@ IntegerDigits[#, 2]] &] (* Michael De Vlieger, Nov 06 2018 *)
  • PARI
    lista(lim) = forprime(p=2,lim, if (isprime(p+hammingweight(p)), print1(p, ", "))); \\ Michel Marcus, Jun 10 2014

Extensions

Name edited by M. F. Hasler, Nov 07 2018