OFFSET
1,2
COMMENTS
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Illustration of Residue Classes Modulo 12
Altug Alkan, Alternative Scatterplot of A283525
FORMULA
a(n) = (Sum_{k=1..n} A004001(k)) mod (3*n).
MAPLE
MATHEMATICA
b[1] = 1; b[2] = 1; b[n_] := b[n] = b[b[n - 1]] + b[n - b[n - 1]]; a[n_] := Mod[Sum[b[k], {k, n}], 3 n]; Array[a, 80] (* Robert G. Wilson v, Mar 13 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[a[n-1]]+a[n-a[n-1]]); vector(#a, n, sum(k=1, n, a[k]) % (3*n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 10 2017
STATUS
approved