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.

A092067 a(n) is the smallest number m such that m > 1 and m divides n^m + 1.

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Farideh Firoozbakht, Mar 28 2004

Keywords

Comments

a(n)=2 iff n is odd. If n is even then every prime factor of n+1 is a solution of the equation (n^x + 1) mod x = 0, and if n is odd, the smallest prime factor of n+1 (2) is a solution of (n^x + 1) mod x = 0, so for each n, a(n) is not greater than the smallest prime factor of n+1.
Conjecture 1: All terms of this sequence are primes. We know if n is odd a(n) is the smallest prime factor of n+1.
Conjecture 2: For each n, a(n) is the smallest prime factor of n+1 or a(n)=A020639(n+1).
From Charlie Neder, Jun 16 2019: (Start)
Theorem: a(n) = A020639(n+1).
Proof: If a(n) is composite (kp, say) then n^(kp) == -1 (mod p), but then n^k is also congruent to -1 (mod p) by Fermat's little theorem, contradicting the assumption that a(n) was minimal. Thus, a(n) must be prime, and using Fermat's little theorem again shows that n^p == -1 (mod p) iff n == -1 (mod p), and A020639(n+1) gives the least p such that this is the case. (End)
The theorem plus the conjecture 2 in A092028 imply a(n) = A092028(n+2). - R. J. Mathar, Mar 21 2023

Examples

			a(6)=7 because 7 divides 6^7 + 1 and there doesn't exist m such that 1 < m < 7 and m divides 6^m + 1.
		

Crossrefs

Row n=2 of A333429.

Programs

  • Mathematica
    a[n_] := (For[k=2, Mod[n^k+1, k]>0, k++ ];k); Table[a[n], {n, 100}]
    snm[n_]:=Module[{m=2},While[PowerMod[n,m,m]!=m-1,m++];m]; Array[snm,100] (* Harvey P. Dale, Jul 31 2021 *)