login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A076942
Smallest k > 0 such that nk+1 is a square.
8
3, 4, 1, 2, 3, 4, 5, 1, 7, 8, 9, 2, 11, 12, 1, 3, 15, 16, 17, 4, 3, 20, 21, 1, 23, 24, 25, 6, 27, 4, 29, 7, 3, 32, 1, 8, 35, 36, 5, 2, 39, 4, 41, 10, 8, 44, 45, 1, 47, 48, 5, 12, 51, 52, 8, 3, 7, 56, 57, 2, 59, 60, 1, 15, 3, 8, 65, 16, 7, 12, 69, 4, 71, 72, 9, 18, 15, 8, 77, 1, 79, 80, 81
OFFSET
1,1
COMMENTS
a(n) <= n-2 for n > 2; a(p) = p-2 if p is a prime > 2. [Comment corrected by Floris van Doorn, Jan 31 2009]
a(n) = n - 2 precisely when n > 2 has a primitive root; that is, for 4, and p^k and 2*p^k for p an odd prime and k > 0. [From Franklin T. Adams-Watters, Apr 13 2009]
REFERENCES
Dorin Andrica, Vlad Crişan, The smallest nontrivial solution to x^k == 1 (mod n) ..., Amer. Math. Monthly 126 (2019), 173-178.
LINKS
FORMULA
a(n) = ((A215653(n))^2-1)/n.
MATHEMATICA
Do[k = 1; While[ !IntegerQ[Sqrt[n*k + 1]], k++ ]; Print[k], {n, 1, 85}]
CROSSREFS
Sequence in context: A085710 A248004 A106650 * A205127 A360407 A343613
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 19 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Oct 21 2002
STATUS
approved