This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A365138 #13 Sep 22 2023 05:37:40 %S A365138 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,2,1,3,1,2,3,5,2,6,4,6,5,10,4,12,8,10, %T A365138 10,11,8,20,13,15,12,24,12,28,17,20,22,33,18,34,23,31,27,45,25,39,29, %U A365138 42,39,56,28,62,44,47,46,59,39,77,51,65,48,85,48,93,66,71,67,89,60,109 %N A365138 Genus of the quotient of the modular curve X_1(n) by the Fricke involution. %H A365138 C. H. Kim and J. K. Koo, <a href="https://doi.org/10.1081/AGB-120037394">Estimation of Genus for Certain Arithmetic Groups</a>, Communications in Algebra, 32:7 (2004), 2479-2495. %F A365138 a(n) = (A029937(n) - A001617(n))/2 + A276183(n). %t A365138 A000003[n_] := %t A365138 Length[Select[ %t A365138 Flatten[#, 1] &@ %t A365138 Table[{i, j, (j^2 + 4 n)/(4 i)}, {i, Sqrt[4 n/3]}, {j, 1 - i, i}], %t A365138 Mod[#3, 1] == 0 && #3 >= # && %t A365138 GCD[##] == 1 && ! (# == #3 && #2 < 0) & @@ # &]]; %t A365138 A001617[n_] := %t A365138 If[n < 1, 0, %t A365138 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, %t A365138 Divisors@n}] - %t A365138 Count[(#^2 - # + 1)/n & /@ Range[n], _?IntegerQ]/3 - %t A365138 Count[(#^2 + 1)/n & /@ Range[n], _?IntegerQ]/4]; %t A365138 A029937[n_] = %t A365138 If[n < 5, 0, %t A365138 1 + Sum[d^2*MoebiusMu[n/d]/24 - EulerPhi[d]*EulerPhi[n/d]/4, {d, %t A365138 Divisors[n]}]]; %t A365138 A276183[n_] := %t A365138 If[0 <= n <= 4, %t A365138 0, (A001617[n] + 1)/2 - %t A365138 If[Mod[n, 8] == 3, 4, If[Mod[n, 8] == 7, 6, 3]]*A000003[n]/12]; %t A365138 A365138[n_] := (A029937[n] - A001617[n])/2 + A276183[n] %Y A365138 Cf. A000003, A001617, A029937, A276183. %K A365138 nonn %O A365138 1,17 %A A365138 _David Jao_, Aug 23 2023