OFFSET
1,1
COMMENTS
a(n) >= n if and only if n is in A254328.
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, ...: 16, 48, 240, 288, 720, 720, 720, 720, 1008, 1440, ...
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
EXAMPLE
k is a quadratic residue modulo 16 if and only if k == 0, 1, 4, 9 (mod 16). Since 0, 1, 4, 9 and 16 are squares, a(16) = 17.
k is a quadratic residue modulo 48 if and only if k == 0, 1, 4, 9, 16, 25, 33, 36 (mod 48). Since 0, 1, 4, 9, 16 and 25 are squares, a(48) = 33.
k is a quadratic residue modulo 720 if and only if k == 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 145, ..., 676 (mod 720). Since 0, 1, 4, ..., 144 are squares, a(720) = 145.
PROG
(PARI) a(n) = my(k=1); while(!issquare(Mod(k, n)) || issquare(k), k++); k
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Dec 14 2019
STATUS
approved