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!)
A071553 Least x greater than 1 such that x^n == 1 (mod i) for each i=1,2,3,...,n. 0
2, 3, 7, 5, 61, 11, 421, 13, 121, 71, 27721, 23, 360361, 4159, 841, 307, 12252241, 1121, 232792561, 2393, 4398241, 483209, 5354228881, 4093, 1460244241, 11232649, 61934401, 7598557, 2329089562801, 406639, 72201776446801, 6998993 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let m(n) = A003418(n) = lcm(1,2,...,n). Then a(n) <= m(n)+1, with equality if and only if n=1 or n is prime. - David W. Wilson, Vladeta Jovovic, Dean Hickerson
LINKS
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` (* Load ChineseRemainder function, needed below. *)
f[n_, m_] := Select[Range[0, m-1], PowerMod[ #, n, m]==1&]; a[1]=2; a[n_] := Module[{lcm, pe, i, m, s, j, x}, lcm=LCM@@Range[n]; pe=Sort[Select[Range[n], Length[FactorInteger[ # ]]==1&&#*FactorInteger[ # ][[1, 1]]>n&], Length[f[n, #1]]/#1<Length[f[n, #2]]/#2&]; For[i=1; m=1; s={0}, i<=Length[pe], i++, s=Union@@Outer[ChineseRemainder[{#1, #2}, {m, pe[[i]]}]&, s, f[n, pe[[i]]]]; m*=pe[[i]]; For[j=2, j<=Length[s], j++, If[PowerMod[x=s[[j]], n, lcm]==1, Return[x]]]; If[PowerMod[1+m, n, lcm]==1, Return[1+m]]; ]]; (* f[n, m] is list of x with x^n==1 (mod m), 0 <= x < m *)
a[1] = 2; a[n_ /; n <= 10] := (s = 2; While[ Sum[ Sign[ Mod[s^n - 1, i]], {i, 1, n}] > 0, s++]; s); a[n_?PrimeQ] := LCM @@ Range[n] + 1; a[n_] := a[n] = (km = If[n <= 24, 6, 7]; redu = Reduce[ And @@ Table[ Mod[x^n, n - k] == 1, {k, 0, km}], x, Integers]; candidates = Join @@ Table[ Sort[ List @@ (redu /. C[1] -> c)[[All, 2]]], {c, 0, n}]; First[ Select[ candidates, # > 1 && And @@ Table[ Mod[ #^n, k] == 1, {k, 2, n - km - 1}] & ]]); Table[ Print[a[n]]; a[n], {n, 1, 32}] (* Jean-François Alcover, Jan 13 2012, after PARI for n <= 10 *)
PROG
(PARI) for(n=1, 12, s=2; while(sum(i=1, n, sign((s^n-1)%i))>0, s++); print1(s, ", "))
CROSSREFS
Sequence in context: A069587 A059843 A092927 * A021812 A155891 A234026
KEYWORD
nonn,nice
AUTHOR
Benoit Cloitre, May 30 2002
EXTENSIONS
Edited by Robert G. Wilson v, Jun 07 2002
More terms from Don Reble, Jun 07 2002
Corrected and extended by Vladeta Jovovic, Jun 09 2002
Corrected and extended by Dean Hickerson, Jun 13 2002
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 March 29 10:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)