login
A191233
The number of times that the n-th digit of A154703(n) occurs in A154703(n).
2
1, 1, 5, 8, 11, 4, 16, 19, 23, 27, 32, 14, 38, 42, 47, 51, 23, 61, 64, 31, 35, 37, 80, 84, 47, 50, 96, 101, 106, 59, 117, 120, 123, 127, 131, 136, 83, 145, 150, 155, 160, 165, 172, 175, 109, 112, 189, 116, 201, 206, 125, 218, 129, 130, 232, 236, 147, 245, 156
OFFSET
1,3
LINKS
EXAMPLE
A154703(3) = 1011101. The third digit of 1011101 is "1", which occurs 5 times in 1011101. Thus a(3) = 5.
A154703(4) = 1011101111. The fourth digit of 1011101111 is "1", which occurs 8 times in 1011101111. Thus a(4) = 8.
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
EXTENSIONS
Corrected and extended by Nathaniel Johnston, May 27 2011
STATUS
approved