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”).

A283525
Remainder when sum of first n terms of A004001 is divided by 3*n.
1
1, 2, 4, 6, 9, 13, 17, 21, 26, 2, 6, 10, 15, 20, 25, 30, 36, 43, 51, 0, 6, 13, 21, 29, 38, 47, 56, 66, 76, 86, 3, 10, 18, 27, 37, 48, 60, 72, 85, 99, 114, 3, 16, 30, 44, 59, 74, 89, 105, 122, 139, 1, 16, 31, 47, 63, 79, 95, 112, 129, 146, 163, 180, 5, 20, 36, 53, 71, 90, 110, 130, 151, 173, 196, 220, 16, 38, 61, 85, 109
OFFSET
1,2
COMMENTS
Sequence represents b(n, 3) where b(n, i) = (Sum_{k=1..n} A004001(k)) mod (n*i). See also A282891, A283501 and corresponding illustrations in Links section.
FORMULA
a(n) = (Sum_{k=1..n} A004001(k)) mod (3*n).
MAPLE
A004001:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-1)) end proc:
A004001(1):= 1: A004001(2):= 1:
L:= ListTools[PartialSums](map(A004001, [$1..1000])):
seq(L[i] mod (3*i), i=1..1000); # after Robert Israel at A282891
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