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!)
A242067 Number of triangular numbers between n^2 and n^3 (excluding the bounds). 1
0, 0, 1, 3, 5, 9, 12, 16, 21, 25, 31, 36, 42, 48, 54, 61, 68, 75, 83, 90, 98, 106, 115, 123, 132, 142, 150, 160, 170, 180, 190, 200, 211, 221, 232, 243, 254, 266, 277, 289, 301, 313, 326, 338, 351, 363, 376, 390, 402, 416, 429, 443, 456, 471, 485, 499, 514, 528, 543, 558 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
EXAMPLE
There are 3 triangular numbers between 9 and 27, namely 10, 15, 21. So a(3)=3.
MAPLE
b:= n-> floor((sqrt(n*8+1)-1)/2):
a:= n-> `if`(n<2, 0, b(n^3-1) -b(n^2)):
seq(a(n), n=0..100); # Alois P. Heinz, Aug 14 2014
PROG
(Python)
for n in range(60):
sq=n*n
cb=n**3
s = t = 0
while 1:
tn = t*(t+1)/2
if tn>sq and tn<cb: s+=1
elif tn>=cb: break
t+=1
print str(s)+', ',
(PARI) a(n) = sum(i=n^2+1, n^3-1, ispolygonal(i, 3)); \\ Michel Marcus, Aug 14 2014
CROSSREFS
Sequence in context: A259368 A175098 A351389 * A127722 A234813 A060419
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Aug 13 2014
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 March 28 17:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)