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.

A207409 Triangular array: T(n,k) = prime(n) mod prime(k), 1 <= k < n.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 1, 4, 1, 1, 3, 6, 2, 1, 2, 2, 3, 6, 4, 1, 1, 4, 5, 8, 6, 2, 1, 2, 3, 2, 1, 10, 6, 4, 1, 2, 4, 1, 7, 3, 12, 10, 6, 1, 1, 1, 3, 9, 5, 14, 12, 8, 2, 1, 1, 2, 2, 4, 11, 3, 18, 14, 8, 6, 1, 2, 1, 6, 8, 2, 7, 3, 18, 12, 10, 4, 1, 1, 3, 1, 10, 4, 9, 5, 20, 14, 12, 6, 2, 1
Offset: 2

Views

Author

Clark Kimberling, Feb 17 2012

Keywords

Comments

Conjecture: For each row in the triangle, the maximum value occurs only once, and for n>2 it is never the first entry and the value previous to it in the row is always odd. - Mike Jones, Jul 12 2024

Examples

			Top 7 rows:
  n=2:  1............. 3 mod 2
  n=3:  1 2............5 mod 2, 5 mod 3
  n=4:  1 1 2..........7 mod 2, 7 mod 3, 7 mod 5
  n=5:  1 2 1 4
  n=6:  1 1 3 6 2
  n=7:  1 2 2 3 6 4
  n=8:  1 1 4 5 8 6 2
		

Crossrefs

Cf. A000040.
Cf. A001223 (right diagonal), A033955 (row sums), A039731 (row maxs).

Programs

  • Maple
    P := select(isprime, [$1..100]):
    seq(seq(P[n] mod P[k],k=1..n-1),n=1..nops(P)); # Robert Israel, May 01 2017
  • Mathematica
    t = Table[Mod[Prime[n + 1], Prime[k]], {n, 1, 15}, {k, 1, n }];
    Flatten[t]   (* this sequence *)
    TableForm[t] (* this sequence as a triangle *)
  • PARI
    row(n) = my(p=prime(n)); vector(n-1, k, p % prime(k)); \\ Michel Marcus, Jul 13 2024