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-2 of 2 results.

A323376 Square array read by ascending antidiagonals: T(n,k) is the multiplicative order of the n-th prime modulo the k-th prime, or 0 if n = k, n >= 1, k >= 1.

Original entry on oeis.org

0, 1, 2, 1, 0, 4, 1, 2, 4, 3, 1, 1, 0, 6, 10, 1, 2, 4, 6, 5, 12, 1, 1, 1, 0, 5, 3, 8, 1, 2, 4, 3, 10, 4, 16, 18, 1, 1, 4, 2, 0, 12, 16, 18, 11, 1, 2, 2, 6, 10, 12, 16, 9, 11, 28, 1, 2, 4, 6, 10, 0, 16, 3, 22, 28, 5, 1, 1, 2, 3, 10, 6, 4, 3, 22, 14, 30, 36
Offset: 1

Views

Author

Jianing Song, Jan 12 2019

Keywords

Comments

The maximum element in the k-th column is prime(k) - 1. By Dirichlet's theorem on arithmetic progressions, all divisors of prime(k) - 1 occur infinitely many times in the n-th column.

Examples

			Table begins
     |  k  | 1  2  3  4   5   6   7   8   9  10  ...
   n | p() | 2  3  5  7  11  13  17  19  23  29  ...
  ---+-----+----------------------------------------
   1 |   2 | 0, 2, 4, 3, 10, 12,  8, 18, 11, 28, ...
   2 |   3 | 1, 0, 4, 6,  5,  3, 16, 18, 11, 28, ...
   3 |   5 | 1, 2, 0, 6,  5,  4, 16,  9, 22, 14, ...
   4 |   7 | 1, 1, 4, 0, 10, 12, 16,  3, 22,  7, ...
   5 |  11 | 1, 2, 1, 3,  0, 12, 16,  3, 22, 28, ...
   6 |  13 | 1, 1, 4, 2, 10,  0,  4, 18, 11, 14, ...
   7 |  17 | 1, 2, 4, 6, 10,  6,  0,  9, 22,  4, ...
   8 |  19 | 1, 1, 2, 6, 10, 12,  8,  0, 22, 28, ...
   9 |  23 | 1, 2, 4, 3,  1,  6, 16,  9 , 0,  7, ...
  10 |  29 | 1, 2, 2, 1, 10,  3, 16, 18, 11,  0, ...
  ...
		

Crossrefs

Cf. A250211.
Cf. A014664 (1st row), A062117 (2nd row), A211241 (3rd row), A211243 (4th row), A039701 (2nd column).
Cf. A226367 (lower diagonal), A226295 (upper diagonal).

Programs

  • Maple
    A:= (n, k)-> `if`(n=k, 0, (p-> numtheory[order](p(n), p(k)))(ithprime)):
    seq(seq(A(1+d-k, k), k=1..d), d=1..14);  # Alois P. Heinz, Feb 06 2019
  • Mathematica
    T[n_, k_] := If[n == k, 0, MultiplicativeOrder[Prime[n], Prime[k]]];Table[T[n, k], {n, 1, 10}, {k, 1, 10}] (* Peter Luschny, Jan 20 2019 *)
  • PARI
    T(n,k) = if(n==k, 0, znorder(Mod(prime(n), prime(k))))

Formula

T(n,k) = A250211(prime(n), prime(k)).

A378634 Numbers k such that for each odd prime dividing k, the previous prime divides k-1.

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 10, 16, 21, 22, 25, 27, 32, 40, 56, 64, 81, 99, 100, 115, 116, 128, 160, 171, 176, 196, 243, 250, 256, 400, 424, 441, 484, 507, 512, 531, 625, 640, 686, 729, 783, 896, 1000, 1024, 1246, 1331, 1408, 1450, 1600, 1660, 1701, 1863, 2048, 2080, 2086, 2109, 2187, 2366, 2401, 2432
Offset: 1

Views

Author

Robert Israel, Dec 02 2024

Keywords

Comments

If k is a term, then so are all powers of k.
If p is an odd prime, then p^k is a term where k = A226367(A000720(p)-1) is the multiplicative order of p modulo A151799(p).

Examples

			a(7) = 10 is a term because the only odd prime dividing 10 is 5, and the previous prime 3 divides 10 - 1 = 9.
a(8) = 16 is a term because 16 is not divisible by any odd prime.
a(9) = 21 is a term because the odd primes dividing 21 are 3 and 7, and 2 (the prime previous to 3) and 5 (the prime previous to 7) both divide 21 - 1 = 20.
		

Crossrefs

Programs

  • Maple
    filter:= n -> andmap(p -> n-1 mod prevprime(p) = 0, numtheory:-factorset(n) minus {2}):
    select(filter, [$1..3000]);
  • Mathematica
    Select[Range[2450], Function[k, Or[IntegerQ@ Log2[k], AllTrue[FactorInteger[k/2^IntegerExponent[k, 2] ][[All, 1]], Divisible[k - 1, NextPrime[#, -1] ] &] ] ] ] (* Michael De Vlieger, Dec 03 2024 *)
  • PARI
    isok(k) = my(f=factor(k)); for (i=1, #f~, if ((f[i,1] % 2) && ((k-1) % precprime(f[i,1]-1)), return(0))); return(1); \\ Michel Marcus, Dec 02 2024
Showing 1-2 of 2 results.