login
The OEIS is supported by the many generous donors to the OEIS 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 nonnegative numbers.
LINKS
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: A128435 A369219 A220415 * A286565 A219354 A026903
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 22:51 EDT 2024. Contains 375396 sequences. (Running on oeis4.)