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.

A254858 Iterated partial sums of prime numbers, square array read by diagonals.

Original entry on oeis.org

2, 2, 3, 2, 5, 5, 2, 7, 10, 7, 2, 9, 17, 17, 11, 2, 11, 26, 34, 28, 13, 2, 13, 37, 60, 62, 41, 17, 2, 15, 50, 97, 122, 103, 58, 19, 2, 17, 65, 147, 219, 225, 161, 77, 23, 2, 19, 82, 212, 366, 444, 386, 238, 100, 29, 2, 21, 101, 294, 578, 810, 830, 624, 338, 129, 31
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 08 2015

Keywords

Comments

Row n+1 = partial sums of row n.
T(n,1) = A002522(n+1); T(n,2) = A144396(n+1); T(n,3) = A002522(n+2).

Examples

			. n\k | 1  2  3   4   5    6    7     8     9    10    11     12     13
. ----+------------------------------------------------------------------
.  0  | 2  3  5   7  11   13   17    19    23    29    31     37     41 ..
.  1  | 2  5 10  17  28   41   58    77   100   129   160    197    238 ..
.  2  | 2  7 17  34  62  103  161   238   338   467   627    824   1062 ..
.  3  | 2  9 26  60 122  225  386   624   962  1429  2056   2880   3942 ..
.  4  | 2 11 37  97 219  444  830  1454  2416  3845  5901   8781  12723 ..
.  5  | 2 13 50 147 366  810 1640  3094  5510  9355 15256  24037  36760 ..
.  6  | 2 15 65 212 578 1388 3028  6122 11632 20987 36243  60280  97040 ..
.  7  | 2 17 82 294 872 2260 5288 11410 23042 44029 80272 140552 237592 ...
		

Crossrefs

Cf. A000040 (row 0), A007504 (row 1), A014148 (row 2), A014150 (row 3), A178138 (row 4), A254784 (row 5).
Cf. A007395 (column 1), A144396 (column 2), A002522 (column 3).
Cf. A125180 (antidiagonal sums), A125179 (diagonals downward).

Programs

  • Haskell
    a254858_tabl = diags [] $ iterate (scanl1 (+)) a000040_list where
       diags uss (vs:vss) = (map head wss) : diags (map tail wss) vss
                            where wss = vs : uss
    a254858_list = concat a254858_tabl
  • Mathematica
    nmax = 11;
    row[0] = Prime[Range[nmax+1]];
    row[n_] := row[n] = row[n-1] // Accumulate;
    T[n_, k_] := row[n][[k]];
    Table[T[n-k, k], {n, 0, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 11 2021 *)