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.

Previous Showing 11-13 of 13 results.

A373917 Triangle read by rows: T(n,k) = k*10 mod n, with n >= 1, k >= 0.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 4, 2, 0, 4, 2, 0, 3, 6, 2, 5, 1, 4, 0, 2, 4, 6, 0, 2, 4, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 8, 6, 4, 2, 0, 10, 8, 6, 4, 2, 0, 10, 7, 4, 1, 11, 8, 5, 2, 12, 9, 6, 3
Offset: 1

Views

Author

Paolo Xausa, Jun 26 2024

Keywords

Comments

Each row n encodes a "division graph" used to determine m mod n (where m is an arbitrary nonnegative integer), using the method described in the Numberphile link (see also example).

Examples

			Triangle begins:
  n\k| 0  1  2  3  4  5  6  7  8  9
  ---------------------------------
   1 | 0;
   2 | 0, 0;
   3 | 0, 1, 2;
   4 | 0, 2, 0, 2;
   5 | 0, 0, 0, 0, 0;
   6 | 0, 4, 2, 0, 4, 2;
   7 | 0, 3, 6, 2, 5, 1, 4;
   8 | 0, 2, 4, 6, 0, 2, 4, 6;
   9 | 0, 1, 2, 3, 4, 5, 6, 7, 8;
  10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  ...
Suppose m = 3714289 and you want to determine m mod 7 (the example shown in the video).
Start with the first digit of m (3) and calculate T(7,3 mod 7) = T(7,3) = 2.
Add it to the next digit of m (7) and calculate T(7,(2+7) mod 7) = T(7,2) = 6.
Add it to the next digit of m (1) and calculate T(7,(6+1) mod 7) = T(7,0) = 0.
Add it to the next digit of m (4) and calculate T(7,(0+4) mod 7) = T(7,4) = 5.
Add it to the next digit of m (2) and calculate T(7,(5+2) mod 7) = T(7,0) = 0.
Add it to the next digit of m (8) and calculate T(7,(0+8) mod 7) = T(7,1) = 3.
Add it to the final digit of m (9) and calculate (3+9) mod 7 = 5, which corresponds to 3714289 mod 7.
		

Crossrefs

Cf. A051127, A106611 (number of distinct terms in each row), A374195 (row sums).

Programs

  • Mathematica
    Table[Mod[Range[0, 10*(n-1), 10], n], {n, 15}]
  • Python
    def A373917(n,k): return(k*10%n) # John Tyler Rascoe, Jul 02 2024

A114448 Array a(n,k) = n^k (mod k) read by antidiagonals (k>=1, n>=1).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 1, 0, 0, 2, 0, 3, 4, 1, 0, 1, 0, 1, 4, 3, 2, 1, 0, 0, 1, 0, 0, 4, 3, 0, 1, 0, 1, 2, 1, 1, 1, 4, 1, 8, 1, 0, 0, 0, 0, 2, 0, 5, 0, 0, 4, 1, 0, 1, 1, 1, 3, 1, 6, 1, 1, 9, 2, 1, 0, 0, 2, 0, 4, 4, 0, 0, 8, 6, 3, 4, 1, 0, 1, 0, 1, 0, 3, 1, 1, 0, 5, 4, 9, 2, 1
Offset: 1

Views

Author

Leroy Quet, Feb 14 2006

Keywords

Comments

Alternate description: triangular array a(n, k) = n^k (mod k) read by rows (n > 1, 0 < k < n). This is equivalent because a(n, k) = a(n-k, k). - David Wasserman, Jan 25 2007

Examples

			2^6 = 64 and 64 (mod 6) is 4. So a(2,6) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := Mod[n^k, k]; Table[a[n - k + 1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)

Extensions

More terms from David Wasserman, Jan 25 2007

A324471 a(n) = 10 mod n.

Original entry on oeis.org

0, 0, 1, 2, 0, 4, 3, 2, 1, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

N. J. A. Sloane, Mar 07 2019, following a suggestion from Charles Kusniec

Keywords

Crossrefs

Programs

  • Mathematica
    Mod[10,Range[100]] (* Paolo Xausa, Nov 14 2023 *)

Formula

From Elmo R. Oliveira, Aug 03 2024: (Start)
G.f.: x^3*(1 + x - 2*x^2 + 4*x^3 - x^4 - x^5 - x^6 - x^7 + 10*x^8)/(1 - x).
a(n) = 10 for n > 10. (End)
Previous Showing 11-13 of 13 results.