OFFSET
1,3
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..5000
EXAMPLE
MAPLE
with(StringTools): lim:=100: s:="": for j from 1 to lim do p:=ithprime(j): d:=convert(p, base, 2): for k from nops(d) to 1 by -1 do s:=cat(s, d[k]): od: printf("%d, ", nops([SearchAll(s[j], s)])); od: # Nathaniel Johnston, May 27 2011
MATHEMATICA
Module[{p = IntegerDigits[Prime[Range[100]], 2], d}, Array[Count[d = Flatten[p[[;; #]]], d[[#]]] &, Length[p]]] (* Paolo Xausa, Feb 26 2024 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Juri-Stepan Gerasimov, May 27 2011
EXTENSIONS
Corrected and extended by Nathaniel Johnston, May 27 2011
STATUS
approved