cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A173655 Triangle read by rows: T(n,k) = prime(n) mod prime(k), 0 < k <= n.

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