login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281257 Primes in A067894: primes in the partial sums of the binary representations of the first m natural numbers, reading these representations in decimal. 1
11, 223, 2556997, 3333331, 14559007, 47836783, 56672227, 65555671, 181114559, 411488881, 583227779, 1399999987, 5723503439, 10047846871, 11361255547, 13787777879, 18474111311, 19905449987, 20235780199, 21226777753, 22557892319, 71445725647, 83447001413, 103459003423 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Intersection of A000040 and A067894.
LINKS
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
Sequence in context: A295542 A089917 A294388 * A187646 A347482 A170948
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jan 18 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)