OFFSET
1,5
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
EXAMPLE
Triangle begins as:
0;
1, 0;
1, 2, 0;
1, 1, 2, 0;
1, 2, 1, 4, 0;
1, 1, 3, 6, 2, 0;
1, 2, 2, 3, 6, 4, 0;
1, 1, 4, 5, 8, 6, 2, 0;
1, 2, 3, 2, 1, 10, 6, 4, 0;
1, 2, 4, 1, 7, 3, 12, 10, 6, 0;
MAPLE
A173655 := proc(n, k) ithprime(n) mod ithprime(k) ; end proc:
seq(seq(A173655(n, k), k=1..n), n=1..20) ; # R. J. Mathar, Nov 24 2010
MATHEMATICA
Flatten[Table[Mod[Prime[n], Prime[Range[n]]], {n, 15}]]
PROG
(PARI) forprime(p=2, 40, forprime(q=2, p, print1(p%q", "))) \\ Charles R Greathouse IV, Dec 21 2011
(Magma)
A173655:= func< n, k | NthPrime(n) mod NthPrime(k) >;
[A173655(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 10 2024
(SageMath)
def A173655(n, k): return nth_prime(n)%nth_prime(k)
flatten([[A173655(n, k) for k in range(1, n+1)] for n in range(1, 13)]) # G. C. Greubel, Apr 10 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Juri-Stepan Gerasimov, Nov 24 2010
STATUS
approved