OFFSET
1,4
COMMENTS
To illustrate the formula: if k >= 2, then (2k, 2k, 2k-1, 2k+1, 2k, 2k, 2k+2, 2k, 2k+1, 2k+2, 2k) are next 11 terms.
E.g., if k=5, (10,10,9,11,10,10,12,10,11,12,10) form the terms from a(44) through a(54).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
For k >= 1:
a(11*k) = 2k+2,
a(11*k + 1) = 2k+2,
a(11*k + 2) = 2k+1,
a(11*k + 3) = 2k+3,
a(11*k + 4) = 2k+2,
a(11*k + 5) = 2k+2,
a(11*k + 6) = 2k+4,
a(11*k + 7) = 2k+2,
a(11*k + 8) = 2k+3,
a(11*k + 9) = 2k+4,
a(11*k + 10) = 2k+2.
MATHEMATICA
nxt[{a_, b_, c_}]:={b, c, Floor[a+b/c]}; NestList[nxt, {1, 1, 1}, 90][[All, 1]] (* Harvey P. Dale, Dec 12 2020 *)
PROG
(Magma) a:=[1, 1, 1]; [n le 3 select a[n] else Floor(Self(n-3)+Self(n-2)/Self(n-1)): n in [1..80]]; // Marius A. Burtea, Oct 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 02 2002
STATUS
approved