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!)
A330861 Number of ways to represent n as a sum of 2 triangular numbers and a perfect square. 2
1, 2, 2, 2, 3, 2, 3, 4, 2, 2, 5, 4, 3, 4, 2, 4, 6, 4, 3, 4, 5, 4, 7, 2, 3, 8, 4, 4, 5, 6, 4, 8, 6, 2, 5, 4, 6, 8, 7, 4, 8, 4, 5, 8, 2, 6, 10, 8, 3, 6, 6, 6, 10, 4, 4, 10, 8, 6, 7, 6, 7, 8, 6, 2, 9, 10, 6, 12, 4, 4, 11, 8, 6, 10, 8, 4, 10, 6, 5, 6, 10, 10, 12, 6, 5, 14, 4, 8, 9, 4, 6, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The range of the two triangular numbers and the square is the non-negative numbers.

LINKS

Table of n, a(n) for n=0..91.

EXAMPLE

a(0)=1 because there is one representation 0 = T(0)+T(0)+0^2.

a(1)=2 because there are 2 representations 1 = T(0)+T(0)+1^2 = T(0)+T(1)+0^2.

a(4)=3 because there are 3 representations 4 = T(0)+T(0)+2^2 = T(0)+T(2)+1^2 = T(1)+T(2)+0^2.

MAPLE

A330861 := proc(n)

    local a, t1idx, t2idx, t1, t2;

    a := 0 ;

    for t1idx from 0 do

        t1 := A000217(t1idx) ;

        if t1 > n then

            break;

        end if;

        for t2idx from t1idx do

            t2 := A000217(t2idx) ;

            if t1+t2 > n then

                break;

            end if;

            if issqr(n-t1-t2) then

                a := a+1 ;

            end if;

        end do:

    end do:

    a ;

end proc:

CROSSREFS

Cf. A115288 (greedy inverse).

Sequence in context: A194344 A128435 A220415 * A286565 A219354 A026903

Adjacent sequences:  A330858 A330859 A330860 * A330862 A330863 A330864

KEYWORD

nonn

AUTHOR

R. J. Mathar, Apr 28 2020

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 August 9 18:32 EDT 2020. Contains 336326 sequences. (Running on oeis4.)