OFFSET
1,1
COMMENTS
a(n) > n if and only if n is in A303704.
It seems that lim_{n->oo} a(n)/n = 0. Conjectured last term m such that a(m)/m > 1/k, k = 1, 2, 3, ...: 840, 1680, 2640, 9240, 10920, 10920, 18480, 18480, 21840, 29640, ...
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
EXAMPLE
k is a coprime quadratic residue modulo 16 if and only if k == 1 (mod 8). Since 1 and 9 are squares, a(16) = 17.
k is a coprime quadratic residue modulo 24 if and only if k == 1 (mod 24). Since 1, 25 and 49 are squares, a(24) = 73.
k is a coprime quadratic residue modulo 840 if and only if k == 1, 121, 169, 289, 361, 529 (mod 840). Since 1, 121, 169, 289, 361, 529, 841, 961 are squares, a(840) = 840+169 = 1009.
PROG
(PARI) a(n) = my(k=1); while(!issquare(Mod(k, n)) || issquare(k) || gcd(k, n)>1, k++); k
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Dec 14 2019
STATUS
approved