OFFSET
0,1
COMMENTS
Entries are 2, 3, 4, 5, 6, 12, 13 and 24.
Periodic with period equal to 420.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..1000
FORMULA
a(3*k + 1) = 2;
a(12*k + 2) = a(12*k + 6) = 3;
a(12*k) = 4;
a(30*k + 9) = a(30*k + 29) = a(60*k + 44) = 5;
a(60*k + 8) = a(60*k + 20) = a(60*k + 32) = a(60*k + 56) = 6;
a(60*k + 3) = a(60*k + 11) = a(60*k + 15) = a(60*k + 23) = a(60*k + 27) = a(60*k + 35) = a(60*k + 47) = a(60*k + 51) = 12;
a(420*k + 5) = a(420*k + 33) = a(420*k + 117) = a(420*k + 173) = a(420*k + 201) = a(420*k + 257) = a(420*k + 285) = a(420*k + 341) = 13;
a(420*k + x) = 24, with x = 17, 21, 41, 45, 53, 57, 65, 77, 81, 93, 101, 105, 113, 125, 137, 141, 153, 161, 165, 177, 185, 197, 213, 221, 225, 233, 237, 245, 261, 273, 281, 293, 297, 305, 317, 321, 333, 345, 353, 365, 377, 381, 393, 401, 405, 413, 417.
EXAMPLE
a(0) = 4 because F(0) + F(1) + F(2) + F(3) = 0 + 1 + 1 + 2 = 4 and 4/4 = 1;
a(1) = 2 because F(1) + F(2) = 1 + 1 = 2 and 2/2 = 1;
a(2) = 3 because F(2) + F(3) + F(4) = 1 + 2 + 3 = 6 and 6/3 = 2;
a(3) = 12 because F(3) + F(4) + ... + F(13) + F(14) = 2 + 3 + ... + 233 + 377 = 984 and 984/12 = 82.
MAPLE
with(combinat): P:=proc(q) local a, k, n; for k from 0 to q do a:=fibonacci(k); for n from 1 to q do a:=a+fibonacci(k+n);
if type(a/(n+1), integer) then print(n+1); break; fi; od; od; end: P(10^3);
MATHEMATICA
Table[k = 1; While[! IntegerQ@ Mean@ Take[#, n ;; n + k], k++]; k + 1, {n, Length@ # - 24}] &@ Fibonacci@ Range[0, 419] (* Michael De Vlieger, Mar 06 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Mar 03 2017
STATUS
approved