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

A257233 Multiplicity sequence for the alternating row sums of triangle A257232.

Original entry on oeis.org

1, 7, 6, 6, 4, 2, 6, 2, 4, 6, 4, 2, 4, 2, 6, 2, 4, 6, 2, 4, 4, 2, 4, 2, 2, 4, 6, 6, 4, 2, 2, 2, 2, 2, 4, 4, 2, 6, 2, 2, 2, 6, 2, 4, 2, 4, 4, 2, 4, 2, 6, 2, 2, 2, 6, 6, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4
Offset: 1

Views

Author

Wolfdieter Lang, Apr 19 2015

Keywords

Comments

The sequence of alternating row sums of A257232 gives one times 1, seven times 2, 6 times 3, six times 4, four times 5, etc., in this order.
Is a(n) = A067970(n-1), n>=3 ? - R. J. Mathar, Apr 24 2015

Crossrefs

Cf. A257232.

Formula

The number m appears a(m) times in the sequence of row sums of triangle A257232 for m = 1, 2, ..., that is in sum(((-1)^(k-1))*(n - (k-1) - [isprime(k)]), k = 1..n) with [isprime(k)] = A010051(k) for n >= 1.

A256885 a(n) = n*(n + 1)/2 - pi(n), where pi(n) = A000720(n) is the prime counting function.

Original entry on oeis.org

1, 2, 4, 8, 12, 18, 24, 32, 41, 51, 61, 73, 85, 99, 114, 130, 146, 164, 182, 202, 223, 245, 267, 291, 316, 342, 369, 397, 425, 455, 485, 517, 550, 584, 619, 655, 691, 729, 768, 808, 848, 890, 932, 976, 1021, 1067, 1113, 1161, 1210, 1260, 1311, 1363, 1415, 1469, 1524
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 11 2015

Keywords

Comments

Number of lattice points (x,y) in the region 1 <= x <= n, 1 <= y <= n - A010051(n); see example.
This sequence gives the row sums of the triangle A257232. - Wolfdieter Lang, Apr 21 2015

Examples

			10 .                             x
9  .                          x  x
8  .                       x  x  x
7  .                    .  x  x  x
6  .                 x  x  x  x  x
5  .              .  x  x  x  x  x
4  .           x  x  x  x  x  x  x
3  .        .  x  x  x  x  x  x  x
2  .     .  x  x  x  x  x  x  x  x
1  .  x  x  x  x  x  x  x  x  x  x
0  .__.__.__.__.__.__.__.__.__.__.
   0  1  2  3  4  5  6  7  8  9  10
		

Crossrefs

Programs

  • Haskell
    a256885 n = a000217 n - a000720 n  -- Reinhard Zumkeller, Apr 21 2015
  • Magma
    [n*(n + 1)/2 - #PrimesUpTo(n): n in [1..60] ]; // Vincenzo Librandi, Apr 12 2015
    
  • Maple
    with(numtheory)[pi]: A256885:=n->n*(n+1)/2-pi(n): seq(A256885(n), n=1..100);
  • Mathematica
    Table[n (n + 1)/2 - PrimePi[n], {n, 1, 50}]
  • PARI
    vector(80, n, n*(n+1)/2 - primepi(n)) \\ Michel Marcus, Apr 13 2015
    

Formula

a(n) = A000217(n) - A000720(n).
a(n) - a(n-1) = A014684(n), n >= 2.
a(n) = Sum_{i=1..n} A014684(i).
a(n) = 1 + Sum_{i=2..n}(i - A000720(i) + A000720(i-1)).

Extensions

Edited, following the hint by Reinhard Zumkeller to change the offset. - Wolfdieter Lang, Apr 22 2015
Showing 1-2 of 2 results.