login
A174497
Triangle read by rows: T(n,k) = prime(n) mod (prime(n+1) - prime(k)) for 0 < k < n+1.
3
0, 0, 1, 0, 1, 1, 7, 7, 1, 3, 0, 1, 3, 5, 1, 13, 13, 1, 3, 1, 1, 0, 1, 3, 5, 1, 5, 1, 19, 19, 1, 3, 7, 9, 1, 3, 23, 23, 23, 1, 5, 7, 11, 3, 5, 0, 1, 3, 5, 9, 11, 1, 5, 5, 1, 31, 31, 31, 1, 5, 7, 11, 13, 3, 7, 1, 37, 37, 1, 3, 7, 9, 13, 15, 1, 1, 7, 1, 0, 1, 3, 5, 9, 11, 15, 17, 1, 13, 5, 5, 1
OFFSET
1,7
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
nonn,tabl,easy
AUTHOR
STATUS
approved