login
A105314
Write the natural numbers as an infinite sequence of digits, starting at the left; a(n) is the subset (i.e., the position in this sequence of the "counting digits") of the first digit of the n-th square.
0
1, 4, 9, 22, 40, 62, 88, 118, 152, 190, 253, 322, 397, 478, 565, 658, 757, 862, 973, 1090, 1213, 1342, 1477, 1618, 1765, 1918, 2077, 2242, 2413, 2590, 2773, 2986, 3246, 3514, 3790, 4074, 4366, 4666, 4974, 5290, 5614, 5946, 6286, 6634, 6990, 7354, 7726, 8106
OFFSET
1,2
EXAMPLE
integers : 1234567891011121314151617...
1st digit : x x x x
positions : 1 4 9 22
PROG
(PARI) a(n) = 1+ sum(k=1, n^2-1, #digits(k)); \\ Michel Marcus, Jul 27 2017
CROSSREFS
Cf. A103575.
Sequence in context: A041943 A158140 A290647 * A200155 A002835 A253289
KEYWORD
base,easy,nonn
AUTHOR
Alexandre Wajnberg, Apr 25 2005
EXTENSIONS
More terms from Joshua Zucker, Jun 21 2006
STATUS
approved