login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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, 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, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
T(n, k) = A007978(n-k).
EXAMPLE
Triangle T(n, k) begins:
n n-th row
-- ----------------------------------
1 2
2 3, 2
3 2, 3, 2
4 3, 2, 3, 2
5 2, 3, 2, 3, 2
6 4, 2, 3, 2, 3, 2
7 2, 4, 2, 3, 2, 3, 2
8 3, 2, 4, 2, 3, 2, 3, 2
9 2, 3, 2, 4, 2, 3, 2, 3, 2
10 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
11 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
12 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
MATHEMATICA
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 *)
PROG
(PARI) T(n, k) = { for (m = 2, oo, if ((n%m) != (k%m), return (m); ); ); }
CROSSREFS
Sequence in context: A333853 A182006 A085239 * A242872 A329362 A372971
KEYWORD
nonn,easy,tabl
AUTHOR
Rémy Sigrist, Jul 06 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 31 07:15 EDT 2024. Contains 375552 sequences. (Running on oeis4.)