OFFSET
1,4
COMMENTS
After the two initial terms, the sequence enters the cycle (1,2,1,3,2,0,0,3) of length 8.
This is the lexicographically earliest (nontrivial) sequence of that type, with a range R={0,...,N}, following the example proposed by Eric Angelini (N=9: A227859), cf. link. Indeed, the ranges R={0,1} or R={0,1,2} are not possible. The range R={0,2} is also possible (cf. link).
LINKS
M. F. Hasler, in reply to E. Angelini, Re: Skolem + digits + loop, SeqFan List, Nov 01 2013.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,1).
FORMULA
a(n) = a(n-8) for n>10. G.f.: -x^3*(3*x^7+2*x^4+3*x^3+x^2+2*x+1) / ((x-1)*(x+1)*(x^2+1)*(x^4+1)). - Colin Barker, Nov 02 2013
EXAMPLE
Between a(1)=0 and a(2)=0 there are 0 other terms. Then one can place a(3)=1 and has to set a(5)=1 as to have 1 term in between these two. Then one can set a(4)=2=a(7). Then the next free position is a(6)=3=a(10), etc.
PROG
(PARI) Vec((3*x^9+2*x^6+3*x^5+x^4+2*x^3+x^2)/(-x^8+1) + O(x^100)) \\ Colin Barker, Nov 02 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 01 2013
STATUS
approved