login
Primes p which are equal to the sum of the binary digits in all primes <= p.
6

%I #14 Feb 04 2015 18:23:19

%S 3,5,11,19,23,47,61

%N Primes p which are equal to the sum of the binary digits in all primes <= p.

%C A subsequence of A168162.

%F A168161 = { prime p | p=A095375(pi(p)) }, where pi(n) = A000720(n).

%t sbdQ[n_]:=Total[Flatten[IntegerDigits[#,2]&/@Prime[Range[PrimePi[ n]]]]] == n; Select[Prime[Range[20]],sbdQ] (* _Harvey P. Dale_, Feb 04 2015 *)

%o (PARI) s=0; forprime(p=1, 9999, if(p==s+=norml2(binary(p)), print1(p, ", ")))

%Y Cf. A217792

%K fini,full,nonn,base

%O 1,1

%A _M. F. Hasler_, Nov 22 2009

%E Cross reference added by _Harvey P. Dale_, Mar 26 2013