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.

A272058 Start with all terms set to 0. Then add n to the next n+3 terms for n=0,1,2,... .

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 14, 20, 25, 33, 39, 49, 56, 68, 76, 90, 99, 115, 125, 143, 154, 174, 186, 208, 221, 245, 259, 285, 300, 328, 344, 374, 391, 423, 441, 475, 494, 530, 550, 588, 609, 649, 671, 713, 736, 780, 804, 850, 875, 923, 949, 999, 1026, 1078, 1106
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 19 2016

Keywords

Examples

			n  | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, ...
__________________________________________
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
+       0, 0, 0
+          1, 1, 1, 1,
+             2, 2, 2, 2, 2
+                3, 3, 3, 3, 3, 3
+                   4, 4, 4, 4, 4, 4, 4
+                      5, 5, 5, 5, 5, 5, 5, 5
+                         6, 6, 6, 6, 6, 6, 6, 6, 6
+                            7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+                               8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
+                                  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
+                                     ...
__________________________________________
a(n)|0, 0, 1, 3, 6,10,14,20,25,33,39, ...
		

Crossrefs

Programs

  • Magma
    [0,0] cat [(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16 : n in [2..100]];
  • Maple
    A272058:=n->(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16: 0,0,seq(A272058(n),n=2..100);
  • Mathematica
    CoefficientList[Series[x^2*(1 + 2 x + x^2 - x^4)/((1 - x)^3*(1 + x)^2), {x, 0, 50}], x] (* or *)
    LinearRecurrence[{1, 2, -2, -1, 1, 0, 0}, {0, 0, 1, 3, 6, 10, 14}, 60]

Formula

G.f.: x^2*(1 + 2*x + x^2 - x^4)/((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 6.
a(n) = (6*n^2 + 6*n - 23 + (7 - 2*n)*(-1)^n)/16 for n > 1.
a(n) = floor((n+3)/4) * floor((3*n-4)/2) + (floor((n-1)/2) mod 2) * floor((3*n-3)/4) for n > 1.
For n > 1, a(2n) = A095794(n). - Jon E. Schoenfield, Feb 19 2022

A288656 a(n) = Sum_{k=1..n} Sum_{i=floor((k-1)/2)..k-1} i * c(i), where c is the prime characteristic (A010051).

Original entry on oeis.org

0, 0, 0, 2, 7, 12, 22, 30, 45, 57, 69, 81, 104, 122, 153, 184, 215, 239, 280, 321, 381, 441, 501, 561, 644, 716, 788, 860, 932, 991, 1079, 1167, 1286, 1405, 1524, 1643, 1762, 1864, 2003, 2142, 2281, 2401, 2562, 2723, 2927, 3131, 3335, 3539, 3790, 4018, 4246, 4474, 4702, 4930, 5211, 5492, 5773, 6054, 6335, 6616, 6956, 7267, 7639
Offset: 0

Views

Author

Wesley Ivan Hurt, Jun 12 2017

Keywords

Comments

Sum of all the primes appearing in columns less than or equal to n from the example in A258087.

Crossrefs

Partial Sums of A288726.

Programs

  • Maple
    with(numtheory): A288656:=n->add(add(i*(pi(i)-pi(i-1)), i=floor((k-1)/2)..k-1), k=1..n): seq(A288656(n), n=0..100);
  • Mathematica
    Table[Sum[Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, Floor[(k - 1)/2], k - 1}], {k, n}], {n, 0, 62}] (* Michael De Vlieger, Jun 15 2017 *)

A288726 a(n) = Sum_{i=floor((n-1)/2)..n-1} i * c(i), where c is the prime characteristic (A010051).

Original entry on oeis.org

0, 0, 0, 2, 5, 5, 10, 8, 15, 12, 12, 12, 23, 18, 31, 31, 31, 24, 41, 41, 60, 60, 60, 60, 83, 72, 72, 72, 72, 59, 88, 88, 119, 119, 119, 119, 119, 102, 139, 139, 139, 120, 161, 161, 204, 204, 204, 204, 251, 228, 228, 228, 228, 228, 281, 281, 281, 281, 281, 281, 340, 311, 372, 372, 372, 341, 341, 341, 408
Offset: 0

Views

Author

Wesley Ivan Hurt, Jun 14 2017

Keywords

Comments

Sum of the primes in the n-th column of the example in A258087.

Crossrefs

Programs

  • Maple
    with(numtheory): A288726:=n->add(i*(pi(i)-pi(i-1)), i=floor((n-1)/2)..n-1): seq(A288726(n), n=0..100);
    # Alternative:
    M:= 100: # to get a(0) to a(2*M+1)
    A:= Array(0..2*M+1):
    A[3]:= 2:
    for k from 2 to M do
       if isprime(2*k-1) then A[2*k]:= A[2*k-1]+2*k-1 else A[2*k]:=A[2*k-1] fi;
       if isprime(k-1) then A[2*k+1]:= A[2*k]-(k-1) else A[2*k+1]:= A[2*k] fi;
    od:
    convert(A,list); # Robert Israel, Jun 16 2017
  • Mathematica
    Table[Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, Floor[(n - 1)/2], n - 1}], {n, 0, 68}] (* Michael De Vlieger, Jun 14 2017 *)
  • PARI
    a(n) = sum(i=floor((n-1)/2), n-1, i*isprime(i)) \\ Felix Fröhlich, Jun 16 2017

Formula

From Robert Israel, Jun 16 2017: (Start)
For k >= 2, a(2*k+1) - a(2*k) = 1-k if k-1 is prime, otherwise 0.
a(2*k+2) - a(2*k+1) = 2*k+1 if 2*k+1 is prime, otherwise 0. (End)
a(n) = A288656(n) - A288656(n-1), n>=1. - Wesley Ivan Hurt, Dec 26 2023
Showing 1-3 of 3 results.