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.

Showing 1-3 of 3 results.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Examples

			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
		

Crossrefs

Programs

  • 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 *)
  • PARI
    T(n, k) = { for (m = 2, oo, if ((n%m) != (k%m), return (m););); }

Formula

T(n, k) = A007978(n-k).

A374383 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) is the least base b >= 2 where n and k have different sums of digits.

Original entry on oeis.org

2, 2, 3, 2, 2, 2, 2, 3, 4, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 5, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2, 3, 4, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 3, 2, 3, 5, 2, 2, 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 4, 2
Offset: 1

Views

Author

Rémy Sigrist, Jul 07 2024

Keywords

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ----------------------------------
   1  2
   2  2, 3
   3  2, 2, 2
   4  2, 3, 4, 2
   5  2, 2, 2, 3, 2
   6  2, 2, 2, 3, 2, 3
   7  2, 2, 2, 2, 2, 2, 2
   8  2, 3, 3, 2, 3, 2, 2, 2
   9  2, 2, 2, 5, 2, 3, 3, 2, 2
  10  2, 2, 2, 3, 2, 3, 4, 2, 2, 3
  11  2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2
  12  2, 2, 2, 3, 2, 3, 5, 2, 2, 3, 4, 2
		

Crossrefs

Cf. A374381.

Programs

  • Mathematica
    T[n_,k_]:=Module[{b=2},While[DigitSum[n,b]==DigitSum[k,b], b++]; b]; Table[T[n,k],{n,13},{k,0,n-1}]//Flatten (* Stefano Spezia, Jul 12 2024 *)
  • PARI
    T(n, k) = { for (b = 2, oo, my (d = sumdigits(n, b) - sumdigits(k, b)); if (d, return (b););); }

Formula

T(n, 0) = 2.
T(n, k) <= n+1.

A374462 Triangle T(n, k), n > 1, k = 1..n-1, read by rows; T(n, k) equals the p-adic valuation of n minus the p-adic valuation of k where p is the least prime number such that this quantity is nonzero.

Original entry on oeis.org

1, 1, -1, 2, 1, 2, 1, -1, -1, -2, 1, 1, 1, -1, 1, 1, -1, -1, -2, -1, -1, 3, 2, 3, 1, 3, 2, 3, 2, -1, 1, -2, 2, -1, 2, -3, 1, 1, 1, -1, 1, -1, 1, -2, 1, 1, -1, -1, -2, -1, -1, -1, -3, -2, -1, 2, 1, 2, 1, 2, 1, 2, -1, 2, 1, 2, 1, -1, -1, -2, -1, -1, -1, -3, -2, -1, -1, -2
Offset: 2

Views

Author

Rémy Sigrist, Jul 09 2024

Keywords

Comments

See A374451 for the corresponding prime numbers.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  -------------------------------------
   2  1
   3  1, -1
   4  2, 1, 2
   5  1, -1, -1, -2
   6  1, 1, 1, -1, 1
   7  1, -1, -1, -2, -1, -1
   8  3, 2, 3, 1, 3, 2, 3
   9  2, -1, 1, -2, 2, -1, 2, -3
  10  1, 1, 1, -1, 1, -1, 1, -2, 1
  11  1, -1, -1, -2, -1, -1, -1, -3, -2, -1
  12  2, 1, 2, 1, 2, 1, 2, -1, 2, 1, 2
		

Crossrefs

Programs

  • PARI
    T(n, k) = { forprime (p = 2, oo, my (d = valuation(n, p) - valuation(k, p)); if (d, return (d); ); ); }

Formula

T(n, 1) = A067029(n).
T(n, n-1) = A094267(n-2).
Showing 1-3 of 3 results.