OFFSET
0,2
COMMENTS
The number of square roots of 1 in any modulus is a power of 2.
Another way of expressing the same: These are also the record setting values of m for the number of solutions to "m*k+1 is a square", for some k, 0<=k<=m. There is 1 solution for a(0)=m=1, and for m = a(n), n>0, there is the first occurrence of 2^n solutions. Compare with A006278. - Richard R. Forberg, Mar 18 2016
Also a(n) is the least k such that the proportion of squares in a reduced residue system modulo n is 1/2^n, i.e. A046073(k)/A000010(k) = 1/2^n. - Jianing Song, Nov 12 2019
From Jianing Song, Oct 18 2021: (Start)
a(n) is the smallest k such that rank((Z/kZ)*) = n. The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G. In particular, rank((Z/kZ)*) = 0 if k <= 2 and A046072(k) otherwise.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..351
EXAMPLE
a(3) = 24 because 24 is the least modulus with 2^3 square roots of 1, namely 1,5,7,11,13,17,19,23.
MATHEMATICA
{1, 3}~Join~Table[4 Product[Prime[k], {k, n}], {n, 17}] (* Michael De Vlieger, Mar 27 2016 *)
nxt[{a_, p_}] := {a*NextPrime[p], NextPrime[p]}; Join[{1, 3}, NestList[nxt, {8, 2}, 20][[All, 1]]] (* or *) Join[{1, 3}, 4*FoldList[ Times, Prime[ Range[ 21]]]](* Harvey P. Dale, Dec 18 2016 *)
PROG
(PARI) a(n) = if(n<=1, [1, 3][n+1], 4*factorback(primes(n-1))) \\ Jianing Song, Oct 19 2021, following David A. Corneth's program for A002110
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David W. Wilson, Jan 10 2005
STATUS
approved