login
A371014
The number of divisors of n that are the sum of 2 squares.
2
1, 2, 1, 3, 2, 2, 1, 4, 2, 4, 1, 3, 2, 2, 2, 5, 2, 4, 1, 6, 1, 2, 1, 4, 3, 4, 2, 3, 2, 4, 1, 6, 1, 4, 2, 6, 2, 2, 2, 8, 2, 2, 1, 3, 4, 2, 1, 5, 2, 6, 2, 6, 2, 4, 2, 4, 1, 4, 1, 6, 2, 2, 2, 7, 4, 2, 1, 6, 1, 4, 1, 8, 2, 4, 3, 3, 1, 4, 1, 10, 3, 4, 1, 3, 4, 2, 2
OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p^e) = floor(e/2) + 1 if p == 3 (mod 4), and e+1 otherwise.
a(n) = A000005(n) if and only if n is in A072437.
a(n) = A046951(n) if and only if n is in A004614.
a(n) = 1 if and only if n is in A167181.
MATHEMATICA
f[p_, e_] := If[Mod[p, 4] == 3, Floor[e/2] + 1, e + 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1]%4 == 3, f[i, 2]\2 + 1, f[i, 2] + 1)); }
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Mar 08 2024
STATUS
approved