OFFSET
1,2
COMMENTS
All terms beyond a(1) = 0 are prime numbers. Heuristically a(n) is 2 3/4 of the time, 3 1/6 of the time, 5 1/20 of the time, 7 2/105 of the time, etc. The average value is 2.5738775742512.... - Charles R Greathouse IV, Jan 30 2018
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..20163 (first 87 terms from Antti Karttunen)
FORMULA
A227195(n) = a(n)-1 for all n>=2.
a(2n+1) = A112046(n) for all n>0. - A.H.M. Smeets Jan 29 2018
PROG
(PARI) a(n) = for(k=1, n, if(kronecker(k, n)<1, return(k)))
for(n=1, 120, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 06 2013
STATUS
approved