OFFSET
1,11
COMMENTS
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
After the initial block of 10 1's, the sequence is quasi-periodic with period 100, increasing by 10 after each block. In more detail:
a(n) = 1 for 1 <= n <= 10.
For n >= 10, write n = 11 + 100i + j with i >= 0, 0 <= j <= 99.
Then for 0 <= j <= 79, a(n) = 10i + f(j),
where f(0) ... f(79) is the following 80-term sequence:
[2 2 2 2 2 3 2 2 2 2 2 3
3 3 3 3 3 3 3 3
4 4 4 4 4 5 4 4 4 4 4 5
6 5 5 6 5 5 6 5 5 6 5 5
6 7
6 6 6 6 6
7 7 7 7 7 7 7 7 7
8 8 8 8 8 9 8 8 8 8 8 9
9 9 9 9 9 9 9 9]
(this has been broken into blocks to make it easier to see),
and for 80 <= j <= 99, a(n) = 10i+10 if j is even, a(n) = 10i+11 if j is odd.
Examples:
n=120 = 11 + 100*1 + 9, i=1, j=9, a(120)=10+f(9) = 10+2 = 12
n=292 = 11 + 100*2 + 81, i=2, j=81. a(292)=20+11=31
EXAMPLE
The sequence begins
1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 3 2 2 2 2 2 3
3 3 3 3 3 3 3 3
4 4 4 4 4 5 4 4 4 4 4 5
6 5 5 6 5 5 6 5 5 6 5 5
6 7
6 6 6 6 6
7 7 7 7 7 7 7 7 7
8 8 8 8 8 9 8 8 8 8 8 9
9 9 9 9 9 9 9 9
10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11
12 12 12 12 12 13 12 12 12 12 12 13
...
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 06 2011
STATUS
approved