login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243441 Primes p such that p + A000120(p) is also a prime, where A000120 = sum of digits in base 2 = Hamming weight. 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Anthony Sand, Table of n, a(n) for n = 1..1000

EXAMPLE

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.

MAPLE

P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do w:=0; k:=ithprime(i); j:=k; while k>0 do w:=w+k-(trunc(k/2)*2); k:=trunc(k/2); od; if isprime(j+w) then print(j); fi; od; end: P(1000); # Adaptation of program by Paolo P. Lava for A048519

MATHEMATICA

Select[Prime@ Range@ 400, PrimeQ[# + Total@ IntegerDigits[#, 2]] &] (* Michael De Vlieger, Nov 06 2018 *)

PROG

(PARI) lista(lim) = forprime(p=2, lim, if (isprime(p+hammingweight(p)), print1(p, ", "))); \\ Michel Marcus, Jun 10 2014

CROSSREFS

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

Cf. A243442 (analog for p - A000120(p)).

Sequence in context: A053182 A211972 A076706 * A256426 A019350 A235630

Adjacent sequences:  A243438 A243439 A243440 * A243442 A243443 A243444

KEYWORD

nonn,base

AUTHOR

Anthony Sand, Jun 05 2014

EXTENSIONS

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

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 18 07:38 EST 2019. Contains 319269 sequences. (Running on oeis4.)