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.

A316571 a(1) = 1; for n > 1: a(n) = smallest number such that (Sum_{k=1..n} a(k)) is divisible by n - 1.

Original entry on oeis.org

1, 2, 3, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124
Offset: 1

Views

Author

Jaroslav Krizek, Aug 20 2018

Keywords

Comments

This is the lexicographically earliest increasing sequence such that n-1 divides the sum of the first n terms.
Sequence b(n) of the sums of the first n+1 terms, Sum_{k=1..n+1} a(k): 3, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, ...
Sequence c(n) of quotients when a(n) is calculated, (Sum_{k=1..n+1} a(k) ) / n is 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...

Examples

			a(1) = 1 because 1 divides the sum of the first 2 (i.e., 1 + 1) terms (a(1) + a(2)) for whatever term a(2) > a(1).
a(2) = 2 because 2 is the smallest number > a(1) and 2 divides the sum of the first 3 (i.e., 2 + 1) terms (a(1) + a(2) + a(3)) for whatever term a(3) > a(2) such that 2 divides the sum a(1) + a(2) + a(3); the smallest number > a(2) with this property for a(3) is 3.
a(3) = 3.
a(4) = 6 because 6 is the smallest number > a(3) such that 3 divides the sum of the first 4 (i.e., 3 + 1) terms.
a(5) = 8 because 8 is the smallest number > a(4) such that 4 divides the sum of the first 5 (i.e., 4 + 1) terms.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 2 x^3 - x^4)/(-1 + x)^2 , {x, 0, 50}], x] (* Stefano Spezia, Sep 16 2018 *)
    Join[{1, 2, 3}, LinearRecurrence[{2, -1}, {6, 8}, 60]] (* Jean-François Alcover, Dec 30 2018 *)

Formula

a(1)=1, a(2)=2, a(3)=3, a(n)=2(n-1) for n >= 4.
a(n) = A005843(n-1) for n >= 4. - Antti Karttunen, Sep 16 2018
G.f.: (1 + 2*x^3 - x^4)/(-1 + x)^2. - Stefano Spezia, Sep 16 2018
a(n) = A020739(n-4) = 2*(n - 4) + 6 for n >= 4. - Georg Fischer, Jan 19 2019

Extensions

Definition clarified by Georg Fischer and Alois P. Heinz, Jan 19 2019