cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A283525 Remainder when sum of first n terms of A004001 is divided by 3*n.

Original entry on oeis.org

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

Views

Author

Altug Alkan, Mar 10 2017

Keywords

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.

Crossrefs

Programs

  • 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 *)
  • 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))

Formula

a(n) = (Sum_{k=1..n} A004001(k)) mod (3*n).