A210456 Period of the sequence of the digital roots of Fibonacci n-step numbers.
1, 24, 39, 78, 312, 2184, 1092, 240, 273, 26232, 11553, 9840, 177144, 14348904, 21523359, 10315734, 48417720, 16120104, 15706236, 5036466318, 258149112, 1162261464, 141214768239, 421900912158, 8857200, 2184, 2271, 28578504864, 21938847432216, 148698308091840
Offset: 1
Examples
Digital roots of Fibonacci numbers (A030132) are 0, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9, 1, 1, 2, 3,... Thus the period is 24 (1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9).
Links
- Hiroaki Yamanouchi, Table of n, a(n) for n = 1..100
- Eric Weisstein's World of Mathematics, Fibonacci n-Step Number
- Eric Weisstein's World of Mathematics, Pisano Period
Crossrefs
Programs
-
Maple
A210456:=proc(q,i) local d,k,n,v; v:=array(1..q); for d from 1 to i do for n from 1 to d do v[n]:=0; od; v[d+1]:=1; for n from d+2 to q do v[n]:=1+((add(v[k],k=n-d-1..n-1)-1) mod 9); if add(v[k],k=n-d+1..n)=9*d and v[n-d]=1 then print(n-d); break; fi; od; od; end: A210456 (100000000,100);
-
Mathematica
f[n_] := f[n] = Block[{s = PadLeft[{1}, n], c = 1}, s = t = Nest[g, s, n]; While[t = g[t]; s != t, c++]; c]; g[lst_List] := Rest@Append[lst, 1 + Mod[-1 + Plus @@ lst, 9]]; Do[ Print[{n, f[n] // Timing}], {n, 100}]
Extensions
a(23) from Hans Havermann, Jan 30 2013
a(24) from Hans Havermann, Feb 18 2013
a(28) from Robert G. Wilson v, Feb 21 2013
a(29)-a(30) from Hiroaki Yamanouchi, May 04 2015
Comments