login
A375079
a(n) = a(n-1) + a(n-2) + ... + a(n-k) where k = (a(n-1) mod (n-1)) + 1 for n >= 3, with a(1) = 1 and a(2) = 2.
0
1, 2, 2, 5, 7, 14, 26, 56, 56, 138, 306, 612, 612, 1224, 3004, 5758, 11822, 23476, 45284, 91792, 184140, 368224, 735948, 1472492, 2944996, 5889992, 11411652, 23191624, 46290860, 92672900, 185346856, 370693871, 741375929, 1479818680, 2962582344, 5925164688
OFFSET
1,2
COMMENTS
It appears that the ratio a(n+1)/a(n) -> 2.
FORMULA
a(n) = Sum_{i=1 .. (a(n-1) mod (n-1)) + 1} a(n-i).
EXAMPLE
For n = 7, we add up the previous a(7-1) mod (7-1) + 1 = 3 terms to get a(7) = a(6) + a(5) + a(4) = 14 + 7 + 5 = 26.
MATHEMATICA
Modanacci={1, 2}; Do[AppendTo[Modanacci, Sum[Modanacci[[-i]], {i, Mod[Modanacci[[-1]], Length[Modanacci]]+1}]], 100]
CROSSREFS
Sequence in context: A028303 A255063 A195964 * A238422 A047083 A327019
KEYWORD
nonn
AUTHOR
Mehmet A. Ates, Jul 29 2024
STATUS
approved