OFFSET
1,2
COMMENTS
Clearly, the sequence contains all positive squares.
Conjecture: Let A(x) be the number of terms not exceeding x. Then A(x)/x has the limit 1/2 as x tends to the infinity.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1 since 1 is a quadratic residue modulo prime(1) = 2.
a(2) = 4 since 4 is a quadratic residue modulo prime(4) = 7, but 2 is a quadratic nonresidue modulo prime(2) = 3, and 3 is a quadratic nonresidue modulo prime(3) = 5.
MATHEMATICA
tab = {}; Do[If[JacobiSymbol[n, Prime[n]] == 1, tab = Append[tab, n]], {n, 140}]; tab
PROG
(PARI) isok(m) = kronecker(m, prime(m)) == 1; \\ Michel Marcus, Feb 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 04 2020
STATUS
approved