OFFSET
1,3
COMMENTS
Moebius transform of A327629.
FORMULA
G.f.: Sum_{k>=1} phi(k) * (theta_2(x^(k/2)) / (2 * x^(k/8)) - 1), where phi() is the Euler totient function and theta_() is the Jacobi theta function.
a(n) = Sum_{d|n} A010054(n/d) * phi(d).
MATHEMATICA
Table[Length[Select[Range[n], IntegerQ[(8 GCD[n, #] + 1)^(1/2)] &]], {n, 1, 75}]
Table[DivisorSum[n, Boole[IntegerQ[(8 n/# + 1)^(1/2)]] EulerPhi[#] &], {n, 1, 75}]
nmax = 75; CoefficientList[Series[Sum[EulerPhi[k] (EllipticTheta[2, 0, x^(k/2)]/(2 x^(k/8)) - 1), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sum(k=1, n, ispolygonal(gcd(k, n), 3)); \\ Michel Marcus, Sep 20 2019
(Magma) [#[j:j in [1..n]| IsSquare(8*Gcd(n, j)+1)]:n in [1..75]]; // Marius A. Burtea, Sep 20 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 20 2019
STATUS
approved