[seqfan] divisors <= sqrt(n)

Joerg Arndt arndt at jjj.de
Thu Mar 4 11:31:47 CET 2010


Regarding some generating functions (pari/gp),
just for your amusement:

default(realprecision,100);
default(format,"g.15");
default(echo,1);

N=500  \\ sum N terms with linear series
S=ceil(sqrt(N))  \\ sum S terms with faster (Theta-type) series
default(seriesprecision,50);

fd(q)=sum( n=1,S, (1+q^n)/(1-q^n) * q^(n^2) )
s=Ser(fd(x))
t=Vec(s) \\ A000005 d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. 

f2(q)=sum( n=1,S, (1+q^n)/(1-q^n) * q^(2*n^2) )
s=Ser(f2(x))
t=Vec(s) \\ A067743 Number of divisors of n not in the half-open interval [sqrt(n/2), sqrt(n*2)).

fs(q)=sum( n=1,S, 1/(1-q^n) * q^(n^2) )
s=Ser(fs(x))
t=Vec(s) \\ A038548 Number of divisors of n that are <= sqrt(n)

fo(q)=sum( n=1,S, 1/(1-q^(2*n-1)) * q^((2*n-1)^2) )
s=Ser(fo(x))
t=Vec(s) \\ A069288 Number of odd divisors of n <= sqrt(n). 
\\ NOTE just submitted G.F.

\\ NOTE: following
fe(q)=sum( n=1,S, 1/(1-q^(2*n)) * q^((2*n)^2) )
s=Ser(fe(x))
t=Vec(s) \\ not in OEIS: Number of even divisors <= sqrt(n)
\\ but simple blow-up of A038548, so added comment there:
\\ a(n) is the number of even divisors of 2*n that are <=sqrt(2*n)
\\
\\ proof-oid:
ts=Ser(fs(x));
teo=Ser( fe(x)+fo(x) );
ts-teo \\ == zero (even+odd==all)

cheers,   jj




More information about the SeqFan mailing list