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.

Showing 1-3 of 3 results.

A318872 Partial sums of A316156.

Original entry on oeis.org

1, 3, 6, 12, 19, 27, 36, 49, 64, 81, 99, 118, 138, 169, 201, 240, 280, 323, 378, 437, 500, 564, 629, 695, 762, 830, 899, 969, 1040, 1112, 1185, 1271, 1376, 1482, 1589, 1697, 1806, 1916, 2027, 2145, 2280, 2416, 2553, 2709, 2866, 3024, 3183, 3343, 3504, 3666, 3829, 3993, 4158, 4324, 4491, 4675, 4860, 5046, 5233, 5428
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2018

Keywords

Crossrefs

Cf. A316156.

Programs

  • PARI
    up_to = 10000;
    povisin(v,n) = { forstep(j=n,1,-1, if(v[j] == n, return(j))); (0); }; \\ Here: povisin = position_of_n_in_strictly_increasing_v
    A318872list(up_to) = { my(v316156 = vector(up_to), v318872 = vector(up_to), k, s); v316156[1] = v318872[1] = 1; for(n=2, up_to, k = 1+v316156[n-1]; if(povisin(v316156, n-1), s = v318872[n-1]; while((s+k)%(n-1), k++)); v316156[n] = k; v318872[n] = v318872[n-1] + v316156[n]); (v318872); };
    v318872 = A318872list(up_to);
    A318872(n) = v318872[n];

Formula

a(n) = Sum_{k=1..n} A316156(k).

A318873 First differences of A316156.

Original entry on oeis.org

1, 1, 3, 1, 1, 1, 4, 2, 2, 1, 1, 1, 11, 1, 7, 1, 3, 12, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 19, 1, 1, 1, 1, 1, 1, 7, 17, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 1, 1, 8, 1, 1, 1, 20, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2018

Keywords

Crossrefs

Cf. A316156.

Programs

  • PARI
    up_to = 20000;
    povisin(v,n) = { forstep(j=n,1,-1, if(v[j] == n, return(j))); (0); }; \\ Here: povisin = position_of_n_in_strictly_increasing_v
    A318873list(up_to) = { my(v316156 = vector(1+up_to), v318872 = vector(1+up_to), v318873 = vector(up_to), k, s); v316156[1] = v318872[1] = 1; for(n=2, up_to+1, k = 1+v316156[n-1]; if(povisin(v316156, n-1), s = v318872[n-1]; while((s+k)%(n-1), k++)); v316156[n] = k; v318872[n] = v318872[n-1] + v316156[n]; v318873[n-1] = v316156[n] - v316156[n-1]); (v318873); };
    v318873 = A318873list(up_to);
    A318873(n) = v318873[n];

Formula

a(n) = A316156(n+1) - A316156(n).

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
Showing 1-3 of 3 results.