login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025435 Number of partitions of n into 2 distinct squares. 7
0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,26

COMMENTS

a(A004435(n)) = 0; a(A001983(n)) > 0. - Reinhard Zumkeller, Dec 20 2013

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = A000161(n) - A010052(2n). - M. F. Hasler, Aug 05 2018

EXAMPLE

G.f. = x + x^4 + x^5 + x^9 + x^10 + x^13 + x^16 + x^17 + x^20 + 2*x^25 + ...

MAPLE

A025435 := proc(n)

    local i, j, ans;

    ans := 0;

    for i from 0 to n do

        for j from i+1 to n do

            if i^2+j^2=n then

                ans := ans+1

            fi

        end do

    end do;

    ans ;

end proc: # R. J. Mathar, Aug 04 2018

MATHEMATICA

a[ n_] := If[ n < 0, 0, Sum[ Boole[ n == i^2 + j^2], {i, Sqrt[n]}, {j, 0, i - 1}]]; (* Michael Somos, Jun 24 2015 *)

a[ n_] := Length@ PowersRepresentations[ n, 2, 2] - Boole @ IntegerQ @ Sqrt[2 n]; (* Michael Somos, Jun 24 2015 *)

a[ n_] := SeriesCoefficient[ With[ {f = (EllipticTheta[ 3, 0, x] + 1)/2, g = (EllipticTheta[ 3, 0, x^2] + 1)/2}, f f - g] / 2, {x, 0, n}]; (* Michael Somos, Jun 24 2015 *)

PROG

(Haskell)

a025435 0 = 0

a025435 n = a010052 n + sum

   (map (a010052 . (n -)) $ takeWhile (< n `div` 2) $ tail a000290_list)

-- Reinhard Zumkeller, Dec 20 2013

(PARI) {a(n) = if( n<0, 0, sum(i=1, sqrtint(n), sum(j=0, i-1, n == i^2 + j^2)))}; /* Michael Somos, Jun 24 2015 */

(PARI) A025435(n)=sum(k=sqrtint((n-1+!n)\2)+1, sqrtint(n), issquare(n-k^2))-issquare(n/2) \\ or A000161(n)-issquare(n/2). - M. F. Hasler, Aug 05 2018

CROSSREFS

Cf. A010052, A000290, A000161, A025441.

Sequence in context: A286562 A185644 A319080 * A304685 A186714 A160382

Adjacent sequences:  A025432 A025433 A025434 * A025436 A025437 A025438

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 20:11 EST 2020. Contains 331288 sequences. (Running on oeis4.)