OFFSET
1,3
COMMENTS
If Landau's fourth problem is ever answered in the positive, that would imply that there are infinitely many primes of the form n^2+1, in which case a(n) = 1 for infinitely many n (cf. A005574). Note that a(n) = 1 if and only if there is m >= 1 such that A066755(m) = n. - Petros Hadjicostas, Sep 18 2019
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Wikipedia, Landau's problems.
FORMULA
Conjecture: (1/n)*Sum_{i=1..n} a(i) = c*log(log(n)) asymptotically with 1 < c < 2.
EXAMPLE
a(7) = 4 because among the numbers 1^2+1 = 2, 2^2+1 = 5, 3^2+1 = 10, 4^2+1 = 17, 5^2+1 = 26, 6^2+1 = 37, 7^2+1 = 50, exactly 4 of them (2, 5, 10, and 50) divide 7^2+1 = 50. - Petros Hadjicostas, Sep 18 2019
MAPLE
a:= n-> add(`if`(irem(n^2+1, k^2+1)=0, 1, 0), k=1..n):
seq(a(n), n=1..120); # Alois P. Heinz, Sep 18 2019
MATHEMATICA
a[ n_ ] := Length[ Select[ Range[ 1, n ], IntegerQ[ (n^2+1)/(#^2+1) ]& ] ]
PROG
(PARI) a(n) = sum(k=1, n, denominator((n^2+1)/(k^2+1)) == 1); \\ Michel Marcus, Sep 18 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 16 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 20 2002
STATUS
approved