OFFSET
2,1
COMMENTS
Prime number positions in the "counting digits": write the natural numbers as an infinite sequence of digits, starting at the left. a(n) is the subscript (i.e. the position in this sequence of "counting digits") of the first digit of the n-th prime.
EXAMPLE
a(6)=16 because the sixth prime (13) appears at the 16th (and 17th) position in the "counting digits": 123456789101112-13-141516
MATHEMATICA
f[n_] := Block[{d = Floor[ Log[10, n] + 1]}, d(n - 1) - Sum[9i*10^(d - i - 1), {i, d - 1}] + 1]; Table[ f[ Prime[n]], {n, 56}] (* Robert G. Wilson v, Apr 30 2005 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Alexandre Wajnberg, Apr 26 2005
EXTENSIONS
Edited by Robert G. Wilson v, Apr 30 2005
STATUS
approved