login
A096534
a(1) = 0; a(2) = 1; a(n) = (a(n-1) + a(n-2)) mod n.
4
0, 1, 1, 2, 3, 5, 1, 6, 7, 3, 10, 1, 11, 12, 8, 4, 12, 16, 9, 5, 14, 19, 10, 5, 15, 20, 8, 0, 8, 8, 16, 24, 7, 31, 3, 34, 0, 34, 34, 28, 21, 7, 28, 35, 18, 7, 25, 32, 8, 40, 48, 36, 31, 13, 44, 1, 45, 46, 32, 18, 50, 6, 56, 62, 53, 49, 35, 16, 51, 67, 47, 42, 16, 58, 74, 56, 53, 31, 5, 36
OFFSET
1,4
LINKS
MAPLE
N:= 100: # to get a(1)..a(N)
A:= Vector(N):
A[1]:= 0: A[2]:= 1:
for n from 3 to N do
A[n]:= A[n-1] + A[n-2] mod n
od:
convert(A, list); # Robert Israel, Nov 13 2017
MATHEMATICA
l = {0, 1}; For[i = 3, i <= 100, i++, len = Length[l]; l = Append[l, Mod[l[[len]] + l[[len - 1]], i]]]; l
CROSSREFS
A072987 is a closely related sequence.
Sequence in context: A128047 A105870 A328145 * A322558 A139047 A343376
KEYWORD
easy,nonn
AUTHOR
STATUS
approved