%I #22 May 04 2015 10:29:35
%S 60,217,520,42,196812,2480437,2232,7128815,1736327236,124516392,
%T 203450520,40193528485,14417724597564,22856442972,324145501174,
%U 7946757,193726348876699204,206135768515040,581179046630097612,32289695739703771,275114595439871720
%N Define a sequence {b(i), i >= 0} by b(i) = 1 for 0 <= i <= n, thereafter b(i+1) = (b(i)+b(i-n)) mod 10; consider the sequence of n-tuples [b(i-n+1), b(i-n+2),...,b(i)]; this repeats with period a(n).
%H Hiroaki Yamanouchi, <a href="/A256985/b256985.txt">Table of n, a(n) for n = 1..105</a>
%H Popular Computing (Calabasas, CA), <a href="/A256985/a256985.png">Contest 9</a>, Vol. 4 (No. 40, July 1976), scanned copy of page PC40-1.
%H Popular Computing (Calabasas, CA), <a href="/A256985/a256985_1.png">Contest 9</a>, Vol. 4 (No. 40, July 1976), scanned copy of page PC40-3.
%e For n=1 we get the Fibonacci sequence (starting 1,1,2,3,...), A000045, which read mod 10 repeats with period 60 (see A003893), so a(1)=60. The full period in this case is:
%e [1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7, 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5, 2, 7, 9, 6, 5, 1, 6, 7, 3, 0, 3, 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, 0].
%o (Python)
%o from itertools import accumulate # requires python 3.2 or higher
%o def A256985(n):
%o ....ilist, k = [1]*(n+1), 1
%o ....jlist = [d % 10 for d in accumulate(ilist)]
%o ....jlist = [jlist[-1]]+ jlist[:-1]
%o ....while ilist != jlist:
%o ........k += 1
%o ........jlist = [d % 10 for d in accumulate(jlist)]
%o ........jlist = [jlist[-1]]+ jlist[:-1]
%o ....return k # _Chai Wah Wu_, Apr 30 2015
%Y Cf. A000045, A003893.
%K nonn
%O 1,1
%A _N. J. A. Sloane_, Apr 26 2015
%E a(6)-a(11) from _Chai Wah Wu_, Apr 30 2015
%E a(12)-a(21) from _Hiroaki Yamanouchi_, May 04 2015