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.

A143121 Triangle read by rows, T(n,k) = Sum_{j=k..n} prime(j), 1 <= k <= n.

Original entry on oeis.org

2, 5, 3, 10, 8, 5, 17, 15, 12, 7, 28, 26, 23, 18, 11, 41, 39, 36, 31, 24, 13, 58, 56, 53, 48, 41, 30, 17, 77, 75, 72, 67, 60, 49, 36, 19, 100, 98, 95, 90, 83, 72, 59, 42, 23, 129, 127, 124, 119, 112, 101, 88, 71, 52, 29, 160, 158, 155, 150, 143, 132, 119, 102, 83, 60, 31
Offset: 1

Views

Author

Keywords

Comments

Left border = A007504, sum of first n primes: (2, 5, 10, 27, 28, 41, ...).
Right border = primes = A000040.
Row sums = A014285: (2, 8, 23, 51, 106, 184, ...).

Examples

			First few rows of the triangle are:
   2;
   5,  3;
  10,  8,  5;
  17, 15, 12,  7;
  28, 26, 23, 18, 11;
  41, 39, 36, 31, 24, 13;
  58, 56, 53, 48, 41, 30, 17;
  ...
T(5,3) = 23 = prime(3) + prime(4) + prime(5) = (5 + 7 + 11).
		

Crossrefs

Cf. A194939 (rows reversed).

Programs

  • Magma
    [[(&+[NthPrime(j): j in [k..n]]): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Oct 15 2018
  • Maple
    a:=proc(n,k) add(ithprime(j),j=k..n) end: seq(seq(a(n,k),k=1..n),n=1..11); # Muniru A Asiru, Oct 15 2018
  • Mathematica
    a[n_, k_] := a[n, k] = Plus@@Prime[Range[n - k + 1, n]]; Column[Table[a[n, k], {n, 15}, {k, n, 1, -1}], Center] (* Alonso del Arte, Jul 25 2011 *)
    Table[Sum[Prime[j], {j, k, n}], {n, 1, 15}, {k, 1, n}]//Flatten (* G. C. Greubel, Oct 15 2018 *)
  • PARI
    a(n,k)=my(s);forprime(p=prime(k),prime(n),s+=p);s \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

T(n,k) = Sum_{j=k..n} prime(j), 1 <= k <= n, primes = A000040.
Equals A000012 * (A000040 * 0^(n-k)) * A000012.

Extensions

Corrected by Hanke Bremer, Nov 28 2008

A221975 Triangle read by rows of the numbers that are the sum of some consecutive Mersenne numbers A000225.

Original entry on oeis.org

1, 3, 4, 7, 10, 11, 15, 22, 25, 26, 31, 46, 53, 56, 57, 63, 94, 109, 116, 119, 120, 127, 190, 221, 236, 243, 246, 247, 255, 382, 445, 476, 491, 498, 501, 502, 511, 766, 893, 956, 987, 1002, 1009, 1012, 1013, 1023, 1534, 1789, 1916, 1979, 2010, 2025, 2032, 2035, 2036
Offset: 1

Views

Author

Omar E. Pol, Feb 12 2013

Keywords

Examples

			Triangle begins:
1;
3,     4;
7,    10,  11;
15,   22,  25,  26;
31,   46,  53,  56,  57;
63,   94, 109, 116, 119, 120;
127, 190, 221, 236, 243, 246, 247;
255, 382, 445, 476, 491, 498, 501, 502;
...
		

Crossrefs

Column 1 is A000225. Right border gives the positive terms of A000295.

Formula

T(n,k) = sum_{j = n-k+1..n} 2^j - 1, n>=1, k>=1.
T(n,n) = A000295(n+1).
Showing 1-2 of 2 results.