OFFSET
1,2
COMMENTS
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Illustration Of Residue Classes Modulo 8
EXAMPLE
a(4) = 7 since Sum_{k = 1..4} A005185(k) = 1 + 1 + 2 + 3 = 7 and remainder when 7 is divided by 8 is 7.
MAPLE
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Table[Mod[Total@ Array[a, n], 2 n], {n, 84}] (* Michael De Vlieger, Mar 13 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-a[n-1]]+a[n-a[n-2]]); vector(#a, n, sum(k=1, n, a[k]) % (2*n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 09 2017
STATUS
approved