OFFSET
1,3
COMMENTS
a(n) is also the number of distinct prime factors, up to multiplication by units, of n + i in the ring of Gaussian integers. - Jason Kimberley, Dec 17 2011
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A001221(n^2+1).
EXAMPLE
a(3) = 2 because 3^2+1 = 2*5.
MAPLE
a:= n-> nops(select(isprime, numtheory[divisors](n^2+1))):
seq(a(n), n=1..100); # Alois P. Heinz, Dec 06 2020
MATHEMATICA
a[n_]:=Length[FactorInteger[n^2 + 1]]
PROG
(PARI) a(n)=omega(n^2+1) \\ Charles R Greathouse IV, Jul 31 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Kent Horvath (kenthorvath(AT)gmail.com), May 10 2007
STATUS
approved