cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A256985 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).

This page as a plain text file.
%I A256985 #24 May 22 2025 10:21:42
%S A256985 60,217,520,42,196812,2480437,2232,7128815,1736327236,124516392,
%T A256985 203450520,40193528485,14417724597564,22856442972,324145501174,
%U A256985 7946757,193726348876699204,206135768515040,581179046630097612,32289695739703771,275114595439871720
%N A256985 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 A256985 Hiroaki Yamanouchi, <a href="/A256985/b256985.txt">Table of n, a(n) for n = 1..105</a>
%H A256985 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 A256985 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 A256985 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 A256985 [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 A256985 (Python)
%o A256985 from itertools import accumulate # requires python 3.2 or higher
%o A256985 def A256985(n):
%o A256985     ilist, k = [1]*(n+1), 1
%o A256985     jlist = [d % 10 for d in accumulate(ilist)]
%o A256985     jlist = [jlist[-1]]+ jlist[:-1]
%o A256985     while ilist != jlist:
%o A256985         k += 1
%o A256985         jlist = [d % 10 for d in accumulate(jlist)]
%o A256985         jlist = [jlist[-1]]+ jlist[:-1]
%o A256985     return k # _Chai Wah Wu_, Apr 30 2015
%Y A256985 Cf. A000045, A003893.
%K A256985 nonn
%O A256985 1,1
%A A256985 _N. J. A. Sloane_, Apr 26 2015
%E A256985 a(6)-a(11) from _Chai Wah Wu_, Apr 30 2015
%E A256985 a(12)-a(21) from _Hiroaki Yamanouchi_, May 04 2015