-
using Nemo
function DedekindEta(len, r)
R, z = PolynomialRing(ZZ, "z")
e = eta_qexp(r, len, z)
[coeff(e, j) for j in 0:len - 1] end
RamanujanTauList(len) = DedekindEta(len, 24)
RamanujanTauList(28) |> println # Peter Luschny, Mar 09 2018
-
M12:=ModularForms(Gamma0(1),12); t1:=Basis(M12)[2]; PowerSeries(t1[1],100); Coefficients($1);
-
Basis( CuspForms( Gamma1(1), 12), 100)[1]; /* Michael Somos, May 27 2014 */
-
M := 50; t1 := series(x*mul((1-x^k)^24,k=1..M),x,M); A000594 := n-> coeff(t1,x,n);
-
CoefficientList[ Take[ Expand[ Product[ (1 - x^k)^24, {k, 1, 30} ]], 30], x] (* Or *)
(* first do *) Needs["NumberTheory`Ramanujan`"] (* then *) Table[ RamanujanTau[n], {n, 30}] (* Dean Hickerson, Jan 03 2003 *)
max = 28; g[k_] := -BernoulliB[k]/(2k) + Sum[ DivisorSigma[k - 1, n - 1]*q^(n - 1), {n, 2, max + 1}]; CoefficientList[ Series[ 8000*g[4]^3 - 147*g[6]^2, {q, 0, max}], q] // Rest (* Jean-François Alcover, Oct 10 2012, from modular forms *)
RamanujanTau[Range[40]] (* The function RamanujanTau is now part of Mathematica's core language so there is no longer any need to load NumberTheory`Ramanujan` before using it *) (* Harvey P. Dale, Oct 12 2012 *)
a[ n_] := SeriesCoefficient[ q QPochhammer[ q]^24, {q, 0, n}]; (* Michael Somos, May 27 2014 *)
a[ n_] := With[{t = Log[q] / (2 Pi I)}, SeriesCoefficient[ Series[ DedekindEta[t]^24, {q, 0, n}], {q, 0, n}]]; (* Michael Somos, May 27 2014 *)
-
{a(n) = if( n<1, 0, polcoeff( x * eta(x + x * O(x^n))^24, n))};
-
{a(n) = if( n<1, 0, polcoeff( x * (sum( i=1, (sqrtint( 8*n - 7) + 1) \ 2,(-1)^i * (2*i - 1) * x^((i^2 - i)/2), O(x^n)))^8, n))};
-
taup(p,e)={
if(e==1,
(65*sigma(p,11)+691*sigma(p,5)-691*252*sum(k=1,p-1,sigma(k,5)*sigma(p-k,5)))/756
,
my(t=taup(p,1));
sum(j=0,e\2,
(-1)^j*binomial(e-j,e-2*j)*p^(11*j)*t^(e-2*j)
)
)
};
a(n)=my(f=factor(n));prod(i=1,#f[,1],taup(f[i,1],f[i,2]));
\\ Charles R Greathouse IV, Apr 22 2013
-
\\ compute terms individually (Douglas Niebur, Ill. J. Math., 19, 1975):
a(n) = n^4*sigma(n) - 24*sum(k=1, n-1, (35*k^4-52*k^3*n+18*k^2*n^2)*sigma(k)*sigma(n-k));
vector(33, n, a(n)) \\ Joerg Arndt, Sep 06 2015
-
a(n)=ramanujantau(n) \\ Charles R Greathouse IV, May 27 2016
-
from sympy import divisor_sigma
def A000594(n): return n**4*divisor_sigma(n)-24*((m:=n+1>>1)**2*(0 if n&1 else (m*(35*m - 52*n) + 18*n**2)*divisor_sigma(m)**2)+sum((i*(i*(i*(70*i - 140*n) + 90*n**2) - 20*n**3) + n**4)*divisor_sigma(i)*divisor_sigma(n-i) for i in range(1,m))) # Chai Wah Wu, Nov 08 2022
-
def s(n)
s = 0
(1..n).each{|i| s += i if n % i == 0}
s
end
def A000594(n)
ary = [1]
a = [0] + (1..n - 1).map{|i| s(i)}
(1..n - 1).each{|i| ary << (1..i).inject(0){|s, j| s - 24 * a[j] * ary[-j]} / i}
ary
end
p A000594(100) # Seiichi Manyama, Mar 26 2017
-
def A000594(n)
ary = [0, 1]
(2..n).each{|i|
s, t, u = 0, 1, 0
(1..n).each{|j|
t += 9 * j
u += j
break if i <= u
s += (-1) ** (j % 2 + 1) * (2 * j + 1) * (i - t) * ary[-u]
}
ary << s / (i - 1)
}
ary[1..-1]
end
p A000594(100) # Seiichi Manyama, Nov 25 2017
-
CuspForms( Gamma1(1), 12, prec=100).0; # Michael Somos, May 28 2013
-
list(delta_qexp(100))[1:] # faster Peter Luschny, May 16 2016
Comments