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.

A374369 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) is the least m such that n and k differ modulo m.

This page as a plain text file.
%I A374369 #10 Jul 12 2024 10:16:50
%S A374369 2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,4,2,3,2,3,2,2,4,2,3,2,3,2,3,2,4,2,3,2,
%T A374369 3,2,2,3,2,4,2,3,2,3,2,3,2,3,2,4,2,3,2,3,2,2,3,2,3,2,4,2,3,2,3,2,5,2,
%U A374369 3,2,3,2,4,2,3,2,3,2,2,5,2,3,2,3,2,4,2,3,2,3,2
%N A374369 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) is the least m such that n and k differ modulo m.
%F A374369 T(n, k) = A007978(n-k).
%e A374369 Triangle T(n, k) begins:
%e A374369   n   n-th row
%e A374369   --  ----------------------------------
%e A374369    1  2
%e A374369    2  3, 2
%e A374369    3  2, 3, 2
%e A374369    4  3, 2, 3, 2
%e A374369    5  2, 3, 2, 3, 2
%e A374369    6  4, 2, 3, 2, 3, 2
%e A374369    7  2, 4, 2, 3, 2, 3, 2
%e A374369    8  3, 2, 4, 2, 3, 2, 3, 2
%e A374369    9  2, 3, 2, 4, 2, 3, 2, 3, 2
%e A374369   10  3, 2, 3, 2, 4, 2, 3, 2, 3, 2
%e A374369   11  2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
%e A374369   12  5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
%t A374369 T[n_,k_]:=Module[{m=2},While[Mod[n,m]==Mod[k,m], m++]; m]; Table[T[n,k],{n,13},{k,0,n-1}]//Flatten (* _Stefano Spezia_, Jul 12 2024 *)
%o A374369 (PARI) T(n, k) = { for (m = 2, oo, if ((n%m) != (k%m), return (m););); }
%Y A374369 Cf. A007978, A374381, A374383.
%K A374369 nonn,easy,tabl
%O A374369 1,1
%A A374369 _Rémy Sigrist_, Jul 06 2024