login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A182445
a(0)=0, a(1)=1, for n>1, a(n) = a(n-2) + (a(n-1) mod n).
3
0, 1, 1, 2, 3, 5, 8, 6, 14, 11, 15, 15, 18, 20, 24, 29, 37, 32, 51, 45, 56, 59, 71, 61, 84, 70, 102, 91, 109, 113, 132, 121, 157, 146, 167, 173, 196, 184, 228, 217, 245, 257, 250, 292, 278, 300, 302, 320, 334, 360, 344, 398, 378, 405, 405, 425, 438, 464, 438
OFFSET
0,4
LINKS
MATHEMATICA
Fold[Append[#1, Mod[#1[[-1]], #2] + #1[[-2]]] &, {0, 1}, Range[2, 58]] (* Ivan Neretin, Jun 18 2018 *)
PROG
(Python)
prpr = 0
prev = 1
for i in range(2, 99):
. current = prpr + (prev % i)
. print prpr,
. prpr = prev
. prev = current
CROSSREFS
Cf. A182444.
Sequence in context: A072987 A010075 A377388 * A010074 A355702 A116918
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Apr 29 2012
STATUS
approved