Help needed with new sequences

Gerald McGarvey Gerald.McGarvey at comcast.net
Sun May 15 03:34:05 CEST 2005


For the orderless case (no order matters) and a,b, and c are all nonnegative,
I used the following PARI code:

a000161(n)=sum(i=0,n,sum(j=0,i,if(i^2+j^2-n,0,1)))
istriangular(n)=floor(sqrt(2*n))*(floor(sqrt(2*n)+1))-2*n==0
a(n)=sum(i=0,n,a000161(i)*istriangular(n-i))
for(n=0,55,print1(a(n),","))

to get
1,2,2,2,2,3,2,2,3,2,4,4,2,2,3,3,4,3,3,5,4,3,2,5,2,4,6,2,5,4,4,4,5,3,2,6,4,6,5,3,6,6,3,2,5,4,8,5,2,4,6,5,4,9,4,7 

Is that correct?
A000161 is the number of ways of writing n as a sum of 2 squares when order 
does not matter,
the a000161(n) code is from entry A000161
http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A000161

Gerald

At 07:15 PM 5/14/2005, David Wilson wrote:
>There are several conceivable ways to count solutions of S(a)+S(b)+T(c) = n.
>The counts depend on what we recognize as distinct solutions.
>
>For example, we might consider S(a)+S(b)+S(c) equivalent to 
>S(a')+S(b')+S(c') if
>
>1.  Ordered triple (S(a), S(b), S(c)) = (S(a'), S(b'), S(c')).  In this 
>case, S(0)+S(1)+T(2) is counted as distinct from S(1)+S(0)+S(2) because 
>corresponding term values differ.
>
>2.  ({S(a), S(b)}, S(c)) = ({S(a'), S(b')}, S(c')).  In this case, 
>S(0)+S(1)+T(2) is counted as equivalent to S(1)+S(0)+T(2), that is, 
>different orders of adding the squares are considered equivalent.
>
>3.  Multiset [S(a), S(b), S(c)] = [S(a'), S(b'), S(c')].  In this case 
>S(1)+S(6)+T(8) is counted as equivalent to S(6)+S(6)+T(1), since they both 
>represent 1+36+36.  Only the values of the terms matters.
>
>I'm sure there are others.
>
>----- Original Message ----- From: "wouter meeussen" 
><wouter.meeussen at pandora.be>
>To: "Seqfan (E-mail)" <seqfan at ext.jussieu.fr>
>Sent: Saturday, May 14, 2005 6:08 AM
>Subject: Re: Help needed with new sequences
>
>
>>sorry if I don't get it, but
>>since
>>Sum[x^(k(k + 1)/2), {k, 0, \[Infinity]}]
>>=EllipticTheta[2, 0, x]/(2 x^(1/8))
>>
>>and
>>Sum[x^(k*k), {k, 0, \[Infinity]}]
>>=1/2*(1 + EllipticTheta[3, 0, x])
>>
>>it is easy to write the GF for this:
>>
>>I find
>>CoefficientList[Series[EllipticTheta[2, 0, Sqrt[x]]/(2*x^(1/8))*1/2*
>>    (1 + EllipticTheta[3, 0, x])*1/2*(1 + EllipticTheta[3, 0, x]), {x, 0, 
>> 64}], x]
>>=
>>{1, 3, 3, 2, 4, 5, 3, 4, 4, 3, 7, 7, 3, 4, 5, 5, 8, 5, 4, 9, 8, 4, 4, 8, 3,
>>8, 12, 4, 8, 7, 7, 8, 9, 4, 4, 11, 5, 10, 7, 5, 10, 10, 5, 4, 8, 4, 11, 7, 4,
>>4, 9, 9, 6, 12, 4, 10, 7, 4, 6, 6, 6, 6, 8, 2, 10}
>>
>>Am I being silly here?
>>
>>W.
>>
>>----- Original Message ----- From: "N. J. A. Sloane" <njas at research.att.com>
>>To: <seqfan at ext.jussieu.fr>
>>Cc: <njas at research.att.com>
>>Sent: Saturday, May 14, 2005 1:33 AM
>>Subject: Help needed with new sequences
>>
>>
>>
>>Dear Seqfans,  Professor Zhi-Wei Sun and his students have been looking
>>at numbers that can be written (for example) in the form x^2 + y^2 + T_z,
>>and they show that every natural number n can be written in this form.
>>(T_z = z(z+1)/2)
>>
>>So it is natural to ask, how many ways are there of writing
>>n in the form x^2 + y^2 + T_z?  (S+S+T, for short)
>>
>>They consider MANY other mixed sums of squares (S) and triangular numbers (T)
>>(such as S+2S+T, S+2T+T, ...)
>>
>>There are two papers on the arXiv:
>>http://front.math.ucdavis.edu/math.NT/0505128
>>http://front.math.ucdavis.edu/math.NT/0505187
>>and possibly more on his home page:
>>http://pweb.nju.edu.cn/zwsun
>>
>>For each of these we may ask, how many ways are possible?
>>And there can be several answers, depending on
>>whether order or signs are taken into account.
>>
>>Sequence A005875 is the classical sequence that gives the number
>>of ways of writing n as a sum of 3 squares, taking
>>order and signs into account.
>>But if you ignore signs and order you
>>get a sequence which begins (I think) 1,1,1,1,1,1,0,1,2,1,...,
>>-I think David Wilson would call the latter sequence
>>"Number of ways to partition n into 3 or fewer squares"
>>(I didn't stop to find out the A-number).
>>
>>So here are a lot of potential new sequences from Sun's papers,
>>if one or more seqfans would like to compute them!
>>There is enough material for a collaborative effort.
>>If you are going to work on this, post a note here.  Thanks!
>>NJAS
>>
>>






More information about the SeqFan mailing list