OFFSET
1,2
COMMENTS
Note that the terms are not all distinct.
LINKS
Keith F. Lynch, Table of n, a(n) for n = 1..200 (first 111 terms from Hugo Pfoertner).
Andreas Enge, William Hart, Fredrik Johansson, Short addition sequences for theta functions, arXiv:1608.06810 [math.NT], 2016-2018.
FORMULA
EXAMPLE
a(2)=2 because there are 2 different quadratic residues modulo 3, so 3 has 66.67% of quadratic residues density, while 2 has a 100%, so 3 has the least quadratic residues density up to 3.
MATHEMATICA
Block[{s = Range[0, 2^15 + 1]^2, t}, t = Array[{#1/#2, #2} & @@ {#, Length@ Union@ Mod[Take[s, # + 1], #]} &, Length@ s - 1]; Map[t[[All, -1]][[FirstPosition[t[[All, 1]], #][[1]] ]] &, Union@ FoldList[Max, t[[All, 1]] ] ] ] (* Michael De Vlieger, Sep 10 2018 *)
PROG
(PARI) a000224(n)=my(f=factor(n)); prod(i=1, #f[, 1], if(f[i, 1]==2, 2^f[1, 2]\6+2, f[i, 1]^(f[i, 2]+1)\(2*f[i, 1]+2)+1)) \\ from Charles R Greathouse IV
r=2; for(k=1, 1e6, v=a000224(k); t=v/k; if(t<r, r=t; print1(v, ", "))) \\ Hugo Pfoertner, Aug 24 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Jose R. Brox (tautocrona(AT)terra.es), Jul 12 2003
EXTENSIONS
More terms from Jud McCranie, Jul 18 2003
a(1) corrected by Hugo Pfoertner, Aug 23 2018
STATUS
approved