OFFSET
1,2
COMMENTS
This is the total degree of the classical modular curve relating j(z) to j(nz), where j is the j-invariant, or elliptic modular function. If F_n(x, y) = 0 is the equation for the curve (the classical modular equation) then F_n(x, x) is the classical modular polynomial and the sequence is also the sequence of degrees for it. When n is a prime, the degree is 2n.
REFERENCES
Serge Lang, ''Elliptic Functions'', Addison-Wesley, 1973.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
MAPLE
with(numtheory): degx := proc (n) # degree of the classical modular curve X0(n) local a, s; s := 0; for a in divisors(n) do if a^2 > n then s := s + 2*a*phi(igcd(a, n/a))/igcd(a, n/a) fi od; if issqr(n) then s := s+phi(sqrt(n)) fi; s end:
MATHEMATICA
degx[n_] := Module[{s = 0}, Do[ If[ a^2 > n, s = s + 2*a*EulerPhi[ GCD[a, n/a]] / GCD[a, n/a]], {a, Divisors[n]}]; If[ IntegerQ[ Sqrt[n]], s = s + EulerPhi[ Sqrt[n] ] ]; s]; Table[ degx[n], {n, 1, 63}] (* Jean-François Alcover, Jan 29 2013, translated from Maple *)
PROG
(PARI) a(n)=2*sumdiv(n, d, if(d^2>n, my(g=gcd(d, n/d)); d*eulerphi(g)/g)) + if(issquare(n, &n), eulerphi(n)) \\ Charles R Greathouse IV, Jan 29 2013
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Gene Ward Smith, May 22 2006
STATUS
approved