A254858 Iterated partial sums of prime numbers, square array read by diagonals.
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
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 ...
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..7259, first 120 diagonals.
Crossrefs
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 *)
Comments