%I #32 Apr 10 2024 03:48:15
%S 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,
%T 2,0,1,2,3,2,1,10,6,4,0,1,2,4,1,7,3,12,10,6,0,1,1,1,3,9,5,14,12,8,2,0,
%U 1,1,2,2,4,11,3,18,14,8,6,0,1,2,1,6,8,2,7,3,18,12,10,4,0
%N Triangle read by rows: T(n,k) = prime(n) mod prime(k), 0 < k <= n.
%H G. C. Greubel, <a href="/A173655/b173655.txt">Rows n = 1..50 of the triangle, flattened</a>
%e Triangle begins as:
%e 0;
%e 1, 0;
%e 1, 2, 0;
%e 1, 1, 2, 0;
%e 1, 2, 1, 4, 0;
%e 1, 1, 3, 6, 2, 0;
%e 1, 2, 2, 3, 6, 4, 0;
%e 1, 1, 4, 5, 8, 6, 2, 0;
%e 1, 2, 3, 2, 1, 10, 6, 4, 0;
%e 1, 2, 4, 1, 7, 3, 12, 10, 6, 0;
%p A173655 := proc(n,k) ithprime(n) mod ithprime(k) ;end proc:
%p seq(seq(A173655(n,k),k=1..n),n=1..20) ; # _R. J. Mathar_, Nov 24 2010
%t Flatten[Table[Mod[Prime[n], Prime[Range[n]]], {n, 15}]]
%o (PARI) forprime(p=2,40,forprime(q=2,p,print1(p%q", "))) \\ _Charles R Greathouse IV_, Dec 21 2011
%o (Magma)
%o A173655:= func< n,k | NthPrime(n) mod NthPrime(k) >;
%o [A173655(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Apr 10 2024
%o (SageMath)
%o def A173655(n,k): return nth_prime(n)%nth_prime(k)
%o flatten([[A173655(n,k) for k in range(1,n+1)] for n in range(1,13)]) # _G. C. Greubel_, Apr 10 2024
%Y Cf. A001223 (2nd diagonal), A033955 (row sums), A102647 (row products excluding 0's), A031131 (3rd diagonal after first 3 terms).
%Y Cf. A172662, A174497, A174947, A174996, A175620.
%K nonn,tabl
%O 1,5
%A _Juri-Stepan Gerasimov_, Nov 24 2010