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-9 of 9 results.

A185382 Sum_{j=1..n-1} P(n)-P(j), where P(j) = A065091(j) is the j-th odd prime.

Original entry on oeis.org

0, 2, 6, 18, 26, 46, 58, 86, 134, 152, 212, 256, 280, 332, 416, 506, 538, 640, 712, 750, 870, 954, 1086, 1270, 1366, 1416, 1520, 1574, 1686, 2092, 2212, 2398, 2462, 2792, 2860, 3070, 3286, 3434, 3662, 3896, 3976, 4386, 4470, 4642, 4730, 5270
Offset: 1

Views

Author

Clark Kimberling, Feb 13 2012

Keywords

Comments

It appears 1/3 of a(n) values are divisible by 3 (as measured up to n = 8000). Almost all of these cases occur consecutively (i.e., in "runs"). The sizes of these runs, including runs of 1, in the first 250 primes are given by this sequence: {2, 4, 1, 1, 2, 4, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 5, 6, 3, 2, 2, 3, 3, 9, 1, ..} with two runs up to 12 in length occurring in the first 5000 primes. - Richard R. Forberg, Mar 26 2015
a(n+1) == a(n) (mod 3) iff n == 0 (mod 3) or P(n+1) == P(n) (mod 3); this should have asymptotic probability 2/3, and explains some of the above comment. - Robert Israel, Mar 26 2015

Examples

			a(4)=(11-3)+(11-5)+(11-7)=18.
		

Crossrefs

Cf. A001223, A152535, A206802 (a(n)/2), A206803 (= partial sums of this), A206804, A206817.

Programs

  • Maple
    N:= 1000: # to get terms for all odd primes <= N
    P:= select(isprime,[seq(2*i+1, i=1..floor((N-1)/2))]):
    Q:= ListTools[PartialSums](P):
    seq(n*P[n]-Q[n],n=2..nops(P)); # Robert Israel, Mar 26 2015
  • Mathematica
    s[k_] := Prime[k + 1]; p[n_] := Sum[s[k], {k, 1, n}]; c[n_] := n*s[n] - p[n]; Table[c[n], {n, 2, 100}]
  • PARI
    A185382(n)=(n-1)*prime(n+1)-sum(k=2,n-1,prime(k)) \\ M. F. Hasler, May 02 2015

Formula

a(n) = (n-1)*A065091(n) - A071148(n-1) = (n-1)*prime(n+1) - sum_{1 < k <= n} prime(k). [Corrected and extended by M. F. Hasler, May 02 2015]
a(n) = A206803(n) - A206803(n-1).
a(n) = Sum_{j=1..n-1} j*A001223(j+1). - Robert Israel, Mar 26 2015

Extensions

Edited and a(1)=0 prefixed by M. F. Hasler, May 02 2015

A206803 Sum_{0A065091(j) is the j-th odd prime.

Original entry on oeis.org

2, 8, 26, 52, 98, 156, 242, 376, 528, 740, 996, 1276, 1608, 2024, 2530, 3068, 3708, 4420, 5170, 6040, 6994, 8080, 9350, 10716, 12132, 13652, 15226, 16912, 19004, 21216, 23614, 26076, 28868, 31728, 34798, 38084, 41518, 45180, 49076
Offset: 2

Views

Author

Clark Kimberling, Feb 13 2012

Keywords

Comments

Partial sums of A185382.

Crossrefs

Programs

  • Mathematica
    s[k_] := Prime[k + 1]; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n]
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 100}]  (* A185382 *)
    %/2  (* A206802 *)
    Flatten[Table[t[n], {n, 2, 40}]]  (*  A206803 *)
    %/2  (* A206804 *)
  • Sage
    [sum([sum([nth_prime(k+1)-nth_prime(j+1) for j in range(1,k)]) for k in range(2,n+1)]) for n in range(2,41)] # Danny Rorabaugh, Apr 18 2015

A206816 a(n) = Sum_{0

Original entry on oeis.org

1, 9, 63, 447, 3447, 29367, 276327, 2856807, 32250087, 395130087, 5225062887, 74201293287, 1126567808487, 18213512883687, 312440245683687, 5668674457011687, 108462341176755687, 2182831421832627687, 46096712669420979687
Offset: 2

Views

Author

Clark Kimberling, Feb 12 2012

Keywords

Examples

			a(4) = (24-1) + (24-2) + (24-6) = 63.
		

Crossrefs

Programs

  • Maple
    seq(add(k^2*k!,k=1..n-1), n=2..30); # Ridouane Oudra, Jun 13 2025
  • Mathematica
    s[k_] := k!; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1];
    Table[c[n], {n, 2, 32}]           (* A206816 *)
    Flatten[Table[t[n], {n, 2, 20}]]  (* A206817 *)
  • PARI
    a(n) = sum(j=1, n-1, n!-j!); \\ Michel Marcus, Jun 13 2025
  • Sage
    [sum([factorial(n)-factorial(j) for j in range(1,n)]) for n in range(2,21)] # Danny Rorabaugh, Apr 18 2015
    

Formula

a(n) = n*n!-p(n), where p(n) is the n-th partial sum of (j!).
a(n) = t(n)-t(n-1), where t = A206817.
a(n) = Sum_{k=1..n-1} k^2*k!. - Ridouane Oudra, Jun 13 2025
a(n) = A001563(n) - A007489(n). - Ridouane Oudra, Jun 14 2025

A206806 Sum_{0A002620(j) is the j-th quarter-square.

Original entry on oeis.org

1, 4, 13, 30, 62, 112, 190, 300, 455, 660, 931, 1274, 1708, 2240, 2892, 3672, 4605, 5700, 6985, 8470, 10186, 12144, 14378, 16900, 19747, 22932, 26495, 30450, 34840, 39680, 45016, 50864, 57273, 64260, 71877, 80142, 89110, 98800, 109270, 120540, 132671, 145684
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

Partial sums of A049774. For a guide to related sequences, see A206817.

Crossrefs

Programs

  • Magma
    [(108-36*n-n^2+n^4+(70*n-266)*Ceiling((3-n)/2)-(42*n-234)*Ceiling((3-n)/2)^2+(8*n-88)*Ceiling((3-n)/2)^3+12*Ceiling((3-n)/2)^4-4*n*Floor(n/2)-(12*n-12)*Floor(n/2)^2-(8*n-24)*Floor(n/2)^3+12*Floor(n/2)^4)/12: n in [2..50]]; // Wesley Ivan Hurt, Jul 10 2014
    
  • Maple
    A206806:=n->add(i*(n-i)*(i-ceil((i-1)/2)), i=1..n): seq(A206806(n), n=2..50); # Wesley Ivan Hurt, Jul 10 2014
  • Mathematica
    s[k_] := Floor[k/2]*Ceiling[k/2]; t[1] = 0;
    Table[s[k], {k, 1, 20}]    (* A002620 *)
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]    (* A049774 *)
    f = Flatten[Table[t[n], {n, 2, 50}]]  (* A206806 *)
    Table[Sum[i (n - i) (i - Ceiling[(i - 1)/2]), {i, n}], {n, 2, 50}] (* Wesley Ivan Hurt, Jul 10 2014 *)
    CoefficientList[Series[-(2 x^2 + x + 1)/((x - 1)^5 (x + 1)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 10 2014 *)
  • PARI
    vector(100, n, ((n+1)*(1+3*(-1)^(n+1)-2*(n+1)+2*(n+1)^2+2*(n+1)^3))/48) \\ Colin Barker, Jul 10 2014
    
  • PARI
    Vec(-x^2*(2*x^2+x+1)/((x-1)^5*(x+1)^2) + O(x^100)) \\ Colin Barker, Jul 10 2014
    
  • Sage
    [sum([sum([floor(k^2/4)-floor(j^2/4) for j in range(1,k)]) for k in range(2,n+1)]) for n in range(2,44)] # Danny Rorabaugh, Apr 18 2015

Formula

From Wesley Ivan Hurt, Jul 10 2014: (Start)
a(n) = Sum_{i=1..n} i * (n-i) * (i-ceiling((i-1)/2)).
a(n) = (108 - 36n - n^2 + n^4 + (70n - 266) * ceiling((3 - n)/2) - (42n - 234) * ceiling((3 - n)/2)^2 + (8n - 88) * ceiling((3 - n)/2)^3 + 12 * ceiling((3 - n)/2)^4 - 4n * floor(n/2) - (12n - 12) * floor(n/2)^2 - (8n - 24) * floor(n/2)^3 + 12 * floor(n/2)^4) / 12. (End)
a(n) = (n*(1+3*(-1)^n-2*n+2*n^2+2*n^3))/48. - Colin Barker, Jul 10 2014
G.f.: -x^2*(2*x^2+x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Jul 10 2014

A206808 Sum_{0

Original entry on oeis.org

7, 45, 156, 400, 855, 1617, 2800, 4536, 6975, 10285, 14652, 20280, 27391, 36225, 47040, 60112, 75735, 94221, 115900, 141120, 170247, 203665, 241776, 285000, 333775, 388557, 449820, 518056, 593775, 677505, 769792, 871200, 982311
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

a(n) = n^4-p(n), where p(n) is the n-th partial sum of (j^3).
a(n) = t(n)-t(n-1), where t = A206809.
For a guide to related sequences, see A206817.

Examples

			a(2) = 2^3-1^3 = 7.
a(3) = (3^3-1^3) + (3^3-2^3) = 45.
		

Crossrefs

Programs

  • Mathematica
    s[k_] := k^3; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]  (* A206808 *)
    Flatten[Table[t[n], {n, 2, 35}]]  (* A206809 *)
  • PARI
    vector(100, n, (3*n^4+10*n^3+11*n^2+4*n)/4) \\ Colin Barker, Jul 11 2014
    
  • PARI
    Vec(-x^2*(x^2+10*x+7)/(x-1)^5 + O(x^100)) \\ Colin Barker, Jul 11 2014
    
  • Sage
    [sum([n^3-j^3 for j in range(1,n)]) for n in range(2,35)] # Danny Rorabaugh, Apr 18 2015

Formula

a(n) = (3*n^4-2*n^3-n^2)/4. G.f.: -x^2*(x^2+10*x+7) / (x-1)^5. - Colin Barker, Jul 11 2014

A206809 a(n) = Sum_{0

Original entry on oeis.org

7, 52, 208, 608, 1463, 3080, 5880, 10416, 17391, 27676, 42328, 62608, 89999, 126224, 173264, 233376, 309111, 403332, 519232, 660352, 830599, 1034264, 1276040, 1561040, 1894815, 2283372, 2733192, 3251248, 3845023, 4522528, 5292320
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

Partial sums of A206808. For a guide to related sequences, see A206817.

Examples

			a(3) = (8-1) + (27-1) + (27-8) = 52.
a(4) = a(3) + (64-1) + (64-8) + (64-27) = 208.
		

Crossrefs

Programs

  • Mathematica
    s[k_] := k^3; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]  (* A206808 *)
    Flatten[Table[t[n], {n, 2, 35}]]  (* A206809 *)
  • PARI
    vector(100, n, n*(9*n^4+60*n^3+145*n^2+150*n+56)/60) \\ Colin Barker, Jul 11 2014
    
  • PARI
    Vec(x^2*(x^2+10*x+7)/(x-1)^6 + O(x^100)) \\ Colin Barker, Jul 11 2014
    
  • Sage
    [sum([sum([k^3-j^3 for j in range(1,k)]) for k in range(2,n+1)]) for n in range(2,33)] # Danny Rorabaugh, Apr 18 2015

Formula

a(n) = (n*(-4-15*n-5*n^2+15*n^3+9*n^4))/60. G.f.: x^2*(x^2+10*x+7) / (x-1)^6. - Colin Barker, Jul 11 2014
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6). - Wesley Ivan Hurt, Jul 23 2025

A206810 Sum_{0

Original entry on oeis.org

15, 145, 670, 2146, 5501, 12131, 23996, 43716, 74667, 121077, 188122, 282022, 410137, 581063, 804728, 1092488, 1457223, 1913433, 2477334, 3166954, 4002229, 5005099, 6199604, 7611980, 9270755, 11206845, 13453650, 16047150
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

For a guide to related sequences, see A206817.

Examples

			a(2) = 2^4-1^4 = 15.
a(3) = (3^4-1^4) + (3^4-2^4) = 145.
		

Crossrefs

Programs

  • Mathematica
    s[k_] := k^4; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]  (* A206810  *)
    Flatten[Table[t[n], {n, 2, 35}]] (* A206811 *)
  • PARI
    Vec(x^2*(x^3+25*x^2+55*x+15)/(x-1)^6 + O(x^100)) \\ Colin Barker, Jul 11 2014
    
  • Sage
    [sum([n^4-j^4 for j in range(1,n)]) for n in range(2,30)] # Danny Rorabaugh, Apr 18 2015

Formula

a(n) = n^5-p(n), where p(n) is the n-th partial sum of (j^4).
a(n) = t(n)-t(n-1), where t = A206811.
a(n) = (n-10*n^3-15*n^4+24*n^5)/30. G.f.: x^2*(x^3+25*x^2+55*x+15) / (x-1)^6. - Colin Barker, Jul 11 2014

A206811 Sum_{0

Original entry on oeis.org

15, 160, 830, 2976, 8477, 20608, 44604, 88320, 162987, 284064, 472186, 754208, 1164345, 1745408, 2550136, 3642624, 5099847, 7013280, 9490614, 12657568, 16659797, 21664896, 27864500, 35476480, 44747235, 55954080, 69407730
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

Partial sums of A206810. For a guide to related sequences, see A206817.

Examples

			a(4) = 16-1 + 81-1 + 81-16 = 160.
		

Crossrefs

Programs

  • Mathematica
    s[k_] := k^4; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]  (* A206810  *)
    Flatten[Table[t[n], {n, 2, 35}]] (* A206811 *)
  • PARI
    Vec(-x^2*(x^3+25*x^2+55*x+15)/(x-1)^7 + O(x^100)) \\ Colin Barker, Jul 11 2014
    
  • Sage
    [sum([sum([k^4-j^4 for j in range(1,k)]) for k in range(2,n+1)]) for n in range(2,29)] # Danny Rorabaugh, Apr 18 2015

Formula

a(n) = (n*(1+n)^2*(1-6*n+n^2+4*n^3))/30. G.f.: -x^2*(x^3+25*x^2+55*x+15) / (x-1)^7. - Colin Barker, Jul 11 2014

A185009 Row sums of A051949 (differences of factorial numbers), seen as a triangle.

Original entry on oeis.org

0, 5, 45, 351, 2847, 25047, 241047, 2534247, 28984167, 358842087, 4785978087, 68453274087, 1045616538087, 16993016806887, 292825130163687, 5333909818803687, 102415654899123687, 2067588695129523687, 43785455761653171687, 970599475776544179687
Offset: 1

Views

Author

Olivier Gérard, Nov 02 2012

Keywords

Crossrefs

cf. A051949.
Other summations of differences of factorials : A206816, A206817, A065355.

Programs

  • Mathematica
    Table[Plus @@ Prepend[Table[(n + 1)! - i!, {i, n, 2, -1}], (n)! - 1], {n, 0, 20}]
  • PARI
    for(n=1,25, print1((n^2-1)*n! - sum(k=1,n-1, k!), ", ")) \\ G. C. Greubel, Jun 09 2017

Formula

a(n)= (n-1)*(n+1)*n! - sum( i!, i=1..n-1)
Showing 1-9 of 9 results.