%I M4098 N1700 #31 Oct 24 2019 11:17:15
%S 1,6,12,24,60,72,168,192,324,360,660,576,1092,1008,1440,1536,2448,
%T 1944,3420,2880,4032,3960,6072,4608,7500,6552,8748,8064,12180,8640,
%U 14880,12288,15840,14688,20160,15552,25308,20520,26208,23040,34440,24192,39732,31680
%N Index of (the image of) the modular group Gamma(n) in PSL_2(Z).
%C Equivalently, the degree of the modular curve X(N) as a cover of the j-line.
%D R. C. Gunning, Lectures on Modular Forms. Princeton Univ. Press, Princeton, NJ, 1962, p. 15.
%D B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 76.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A001766/b001766.txt">Table of n, a(n) for n = 1..1000</a>
%H Ioannis Ivrissimtzis, David Singerman, James Strudwick, <a href="https://arxiv.org/abs/1909.08568">From Farey fractions to the Klein quartic and beyond</a>, arXiv:1909.08568 [math.GR], 2019. See mu(n) p. 3.
%H <a href="/index/Gre#groups_modular">Index entries for sequences related to modular groups</a>
%F a(n) = n * A000114(n). - _Michael Somos_, Jan 29 2004
%F a(n) = ((n^3)/2)*Product_{p | n, p prime} (1-1/p^2), for n>=3. - _Michel Marcus_, Oct 23 2019
%p proc(n) local b,d: b := (n^3)/2: for d from 1 to n do if irem(n,d) = 0 and isprime(d) then b := b*(1-d^(-2)): fi: od: RETURN(b): end:
%t Table[ (n^3)/If[ n>2, 2, 1 ] Times@@(1-1/Select[ Range[ n ], (Mod[ n, #1 ]==0&&PrimeQ[ #1 ])& ]^2), {n, 1, 45} ] (* _Olivier Gérard_, Aug 15 1997 *)
%o (PARI) a(n) = if (n==1, 1, if (n==2, 6, my(f=factor(n)); prod(k=1, #f~, 1-1/f[k,1]^2)*n^3/2)); \\ _Michel Marcus_, Oct 23 2019
%Y Equals A000056(n) for n = 2 and (1/2)*A000056(n) for n > 2 (since -I is contained in Gamma(2) but not in Gamma(n) for n > 2).
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Olivier Gérard_, Aug 15 1997
%E Definition corrected by _Mira Bernstein_, May 30 2006