OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
0 + 1 + 10 = 11 (prime), so 11 is in the sequence.
0 + 1 + 10 + 11 + 100 + 101 = 223 (prime), so 223 is in the sequence.
MAPLE
select(isprime, ListTools:-PartialSums(map(convert, [$1..1000], binary))); # Robert Israel, Jan 18 2017
MATHEMATICA
Select[Accumulate[Table[FromDigits[IntegerDigits[n, 2]], {n, 0, 1000}]], PrimeQ]
PROG
(PARI) F(k, {b=10})=sum(i=1, k, subst(Pol(binary(i), y), y, b));
test(k, {b=10})={my(z=F(k, b)); return(isprime(z)*z)};
Values(n, {b=10})={my(L=List(), j, t); while(#L<n, t=test(j++, b); if(t, listput(L, j))); return(vector(#L, i, L[i]))}
firstTerms(n, {b=10})={my(w=Values(n, b)); return(vector(#w, i, F(w[i], b)))} \\ Example: print(firstTerms(25)); - R. J. Cano, Jan 19 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jan 18 2017
STATUS
approved