login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216506 Least number k such that k*n+1 is a prime dividing n^(2n) - 1. 2
1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 1, 4, 2, 2, 1, 644, 1, 5700, 2, 2, 1, 2, 3, 4, 2, 4, 1, 2, 1, 12, 8, 2, 3, 2, 1, 4, 5, 2, 1, 2, 1, 4, 2, 4, 1, 14, 2, 4, 2, 2, 1, 2, 2, 16, 2, 4, 1, 12, 1, 16, 273, 2, 3, 2, 1, 4, 2, 2, 1, 246, 1, 4, 2, 2, 16, 8, 1, 4, 15, 2, 1, 2, 4, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
The corresponding prime factors of n^(2n)-1 of the form k*n+1 is in A216487.
LINKS
EXAMPLE
a(7) = 4 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1 => k = 4.
MATHEMATICA
Table[p=First/@FactorInteger[n^(2*n)-1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]]-1)/n, {n, 2, 50}]
a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; (m - 1)/n]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
PROG
(PARI) a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); (m - 1)/n; } \\ Amiram Eldar, May 17 2024
CROSSREFS
Sequence in context: A080825 A229724 A034693 * A072342 A257089 A328892
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 11 2012
EXTENSIONS
Data corrected and extended by Amiram Eldar, May 17 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 7 05:42 EDT 2024. Contains 375729 sequences. (Running on oeis4.)