A168161 Primes p which are equal to the sum of the binary digits in all primes <= p.
3, 5, 11, 19, 23, 47, 61
Offset: 1
Crossrefs
Cf. A217792
Programs
-
Mathematica
sbdQ[n_]:=Total[Flatten[IntegerDigits[#,2]&/@Prime[Range[PrimePi[ n]]]]] == n; Select[Prime[Range[20]],sbdQ] (* Harvey P. Dale, Feb 04 2015 *)
-
PARI
s=0; forprime(p=1, 9999, if(p==s+=norml2(binary(p)), print1(p, ", ")))
Extensions
Cross reference added by Harvey P. Dale, Mar 26 2013
Comments