This site is supported by donations to The OEIS Foundation.

 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

%I

%S 2,3,5,17,43,163,277,311,347,373,461,479,571,643,673,821,853,857,881,

%T 977,983,1013,1093,1103,1117,1181,1223,1297,1427,1433,1439,1481,1523,

%U 1607,1613,1621,1823,1861,1871,1873,2003,2083,2281,2333,2393,2417,2467,2549

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

%H Anthony Sand, <a href="/A243441/b243441.txt">Table of n, a(n) for n = 1..1000</a>

%e 2 + digitsum(2,base=2) = 2 + digitsum(10) = 2 + 1 = 3, which is prime.

%e 3 + digitsum(11) = 3 + 2 = 5.

%e 5 + digitsum(101) = 5 + 2 = 7.

%e 17 + digitsum(10001) = 17 + 2 = 19.

%e 43 + digitsum(101011) = 43 + 4 = 47.

%p 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

%t Select[Prime@ Range@ 400, PrimeQ[# + Total@ IntegerDigits[#, 2]] &] (* _Michael De Vlieger_, Nov 06 2018 *)

%o (PARI) lista(lim) = forprime(p=2,lim, if (isprime(p+hammingweight(p)), print1(p, ", "))); \\ _Michel Marcus_, Jun 10 2014

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

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

%K nonn,base

%O 1,1

%A _Anthony Sand_, Jun 05 2014

%E Name edited by _M. F. Hasler_, Nov 07 2018

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.

Last modified February 23 08:36 EST 2019. Contains 320420 sequences. (Running on oeis4.)