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.

A168154 Numbers n such that the sum of binary digits in prime(1), ..., prime(n) is prime.

This page as a plain text file.
%I A168154 #16 Aug 28 2021 11:45:50
%S A168154 2,3,5,8,9,15,18,21,28,34,35,45,51,53,68,77,84,86,87,90,92,102,113,
%T A168154 116,119,121,130,131,137,149,164,174,178,192,205,210,220,221,238,240,
%U A168154 241,250,255,275,315,318,324,344,345,363,369,375,381,386,396,397,398,404
%N A168154 Numbers n such that the sum of binary digits in prime(1), ..., prime(n) is prime.
%C A168154 Indices of primes in A095375.
%H A168154 Charles R Greathouse IV, <a href="/A168154/b168154.txt">Table of n, a(n) for n = 1..10000</a>
%t A168154 Module[{nn=500,prs},prs=Table[IntegerDigits[p,2],{p,Prime[Range[nn]]}];Select[Range[nn],PrimeQ[Total[Flatten[Take[prs,#]]]]&]] (* _Harvey P. Dale_, Aug 28 2021 *)
%o A168154 (PARI) s=0; for(n=1,999, isprime(s+=norml2(binary(prime(n)))) & print1(n", "))
%o A168154 is_A168154(n)=isprime(A095375(n))
%o A168154 (PARI) s=n=0;forprime(p=2,1e9,n++;if(isprime(s+=hammingweight(p)), print1(n", "))) \\ _Charles R Greathouse IV_, Mar 29 2013
%Y A168154 Cf. A168153.
%K A168154 nonn,base,easy
%O A168154 1,1
%A A168154 _M. F. Hasler_, Nov 20 2009
%E A168154 Terms corrected by _Charles R Greathouse IV_, Mar 29 2013