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

A226367 Multiplicative order of the (n+1)-st prime modulo the n-th prime.

Original entry on oeis.org

1, 2, 4, 3, 10, 6, 8, 9, 11, 28, 6, 18, 20, 7, 23, 26, 58, 60, 33, 35, 36, 39, 82, 11, 24, 100, 51, 106, 18, 28, 7, 130, 68, 46, 148, 150, 156, 81, 83, 43, 178, 180, 95, 48, 196, 66, 14, 37, 226, 38, 232, 119, 30, 250, 256, 131, 268, 270, 46, 70, 141, 146, 51, 155, 78, 316, 165, 336, 346, 174, 32, 179, 366, 372, 189
Offset: 1

Views

Author

Emmanuel Vantieghem, Jun 05 2013

Keywords

Comments

a(n) is the smallest positive integer m with the property that p(n+1)^m == 1 (mod p(n)), where p(n) stands for the n-th prime; it is always a divisor of p(n)-1. For n < 10^8, a(n) is never equal to A226295(n).

Examples

			a(2) = 2 because 5^2 == 1 (mod 3) but 5^1 !== 1(mod 3).
a(6) = 6  because 17^6 == 1 (mod 13) but 17^u !== 1 (mod 13) for  u < 6.
		

Crossrefs

Cf. A226295 (multiplicative order of p(n) mod p(n+1)).

Programs

  • Mathematica
    Table[MultiplicativeOrder[Prime[n+1],Prime[n]],{n,1,75}]
  • PARI
    vector(80, n, p = prime(n); znorder(Mod(nextprime(p+1), p))) \\ Michel Marcus, Feb 09 2015

A163619 Let q(p) be the smallest prime greater than the prime p. A positive integer n is included in this sequence if n+1 is divisible by q(p) for each prime p dividing n.

Original entry on oeis.org

2, 8, 9, 20, 32, 98, 125, 128, 169, 464, 512, 729, 961, 1280, 2048, 2108, 5252, 8000, 8192, 9728, 15872, 16807, 18176, 22385, 32768, 36992, 50000, 53792, 59049, 78821, 81920, 97556, 98125, 100352, 124659, 131072, 195129, 219488, 223040, 307328
Offset: 1

Views

Author

Leroy Quet, Aug 01 2009

Keywords

Comments

All terms of this sequence are in sequence A073606.
From Robert Israel, Dec 01 2024: (Start)
If k is a term, then so is k^j for all odd j.
If A226295(k) is even, then prime(k)^(A226295(k)/2) is a term. (End)

Examples

			20 is divisible by the primes 2 and 5. q(2) = 3, and q(5)=7. 20+1 = 21 is divisible by both 3 and 7, so 20 is in this sequence.
		

Crossrefs

Programs

  • Maple
    filter:= n ->
      andmap(p -> n+1 mod nextprime(p) = 0, numtheory:-factorset(n)):
    select(filter, [$2..4*10^5]); # Robert Israel, Dec 01 2024
  • Mathematica
    depQ[n_]:=With[{c=NextPrime[FactorInteger[n][[;;,1]]]},AllTrue[(n+1)/c,IntegerQ]]; Select[Range[ 2,350000],depQ] (* Harvey P. Dale, Jun 10 2023 *)

Extensions

More terms from Sean A. Irvine, Oct 04 2009

A308510 Prime(k) such that the multiplicative order of prime(k) (mod prime(k+1)) = prime(k+1)-1.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 43, 59, 61, 67, 79, 83, 101, 103, 127, 131, 139, 151, 163, 179, 181, 197, 223, 251, 257, 269, 271, 307, 317, 337, 347, 353, 367, 379, 419, 421, 439, 443, 461, 463, 467, 487, 499, 523, 541, 563, 577, 587, 593, 607, 643, 659, 691, 709, 727, 733, 739
Offset: 1

Views

Author

David James Sycamore, Jun 02 2019

Keywords

Comments

Prime(k) is a term iff it is a primitive root of prime(k+1). These primes correspond to the records of A226295; if A226295(k) is such a record then prime(k) is a term in this sequence.

Examples

			A226295(14) = 46 is a record, so prime(14)=43 is a term.
		

Crossrefs

Cf. A226295.

Programs

  • Mathematica
    Select[Range[740], PrimeQ[#] && MultiplicativeOrder[#, p=NextPrime[#]] == p-1 &] (* Amiram Eldar, Jul 04 2019 *)
  • PARI
    isok(p) = isprime(p) && (q=nextprime(p+1)) && (znorder(Mod(p, q)) == q-1) \\ Michel Marcus, Jun 02 2019

Extensions

More terms from Michel Marcus, Jun 02 2019

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)).

A381924 Multiplicative order of n mod prime(n).

Original entry on oeis.org

1, 2, 4, 3, 5, 12, 16, 6, 11, 28, 30, 9, 40, 21, 46, 13, 29, 60, 33, 7, 24, 13, 41, 88, 48, 100, 34, 106, 54, 7, 63, 26, 136, 23, 74, 75, 39, 9, 166, 86, 178, 5, 95, 192, 196, 99, 105, 222, 113, 228, 29, 34, 120, 250, 256, 262, 67, 270, 46, 8, 47, 292, 153, 155, 312
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Mar 12 2025

Keywords

Comments

a(n) is the least k such that prime(n) divides n^k-1.

Examples

			a(12) = 9 because the multiplicative order of 12 mod prime(12) is 9.
		

Crossrefs

Cf. A226295, A014664, A091185 (n^(-1) mod prime(n)).

Programs

  • Magma
    [Order(n, NthPrime(n)) : n in [1..65]]; // Vincenzo Librandi, Mar 25 2025
  • Mathematica
    Table[MultiplicativeOrder[n,Prime[n]],{n,65}]
  • PARI
    a(n) = znorder(Mod(n, prime(n))); \\ Michel Marcus, Mar 12 2025
    

Formula

If n is a primitive root modulo prime(n), a(n) = prime(n) - 1.
Showing 1-5 of 5 results.