OFFSET
1,7
LINKS
Michel Marcus, Rows n=1..100 of triangle, flattened
EXAMPLE
Triangle begins as:
0;
0, 1;
0, 1, 1;
7, 7, 1, 3;
0, 1, 3, 5, 1;
13, 13, 1, 3, 1, 1;
0, 0, 1, 0, 1, 1, 7;
7, 1, 3, 0, 1, 3, 5, 1;
13, 13, 1, 3, 1, 1, 0, 1, 3;
MATHEMATICA
Table[Mod[Prime[n], Prime[n+1]-Prime[k]], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Apr 10 2024 *)
PROG
(Sage) A174497 = flatten([[nth_prime(n) % (nth_prime(n+1)-nth_prime(k)) for k in range(1, n+1)] for n in range(1, 20)]) # D. S. McNeil, Nov 30 2010
(PARI) T(n, k) = prime(n) % (prime(n+1)-prime(k));
tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Aug 08 2017
(Magma)
[NthPrime(n) mod (NthPrime(n+1) - NthPrime(k)): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 10 2024
CROSSREFS
KEYWORD
AUTHOR
Juri-Stepan Gerasimov, Nov 28 2010
STATUS
approved