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!)
A160651 a(n) is the number of triangular nonnegative integers that are each equal to n(n+1)/2 - m(m+1)/2, for some m's where 0 <= m <= n. 1
1, 2, 2, 3, 2, 2, 4, 2, 4, 2, 4, 4, 2, 4, 2, 4, 4, 2, 4, 2, 3, 6, 2, 8, 2, 2, 4, 4, 8, 2, 2, 4, 2, 4, 2, 2, 8, 4, 4, 2, 4, 8, 2, 4, 4, 4, 6, 2, 4, 6, 2, 4, 4, 6, 4, 4, 4, 4, 6, 4, 2, 8, 4, 4, 4, 2, 8, 4, 4, 2, 2, 6, 2, 4, 4, 4, 4, 4, 12, 2, 4, 4, 2, 4, 2, 2, 8, 2, 8, 4, 2, 8, 4, 8, 4, 8, 8, 2, 4, 2, 2, 8, 2, 6, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10000

FORMULA

a(n) == 1 (mod 2) <=> n in { A001652 }. - Alois P. Heinz, May 27 2018

EXAMPLE

For n = 6, the values of n(n+1)/2 - m(m+1)/2, 0 <= m <= n, are 21, 20, 18, 15, 11, 6, and 0. Of these, 21, 15, 6, and 0 are triangular numbers, so a(6) = 4.

MAPLE

a:= n-> add(`if`(issqr(4*(n+m+1)*(n-m)+1), 1, 0), m=0..n):

seq(a(n), n=0..100);  # Alois P. Heinz, May 27 2018

PROG

(PARI) a(n) = sum(m=0, n, ispolygonal(n*(n+1)/2 - m*(m+1)/2, 3)); \\ Michel Marcus, May 27 2018

CROSSREFS

Cf. A000217, A001652, A049777, A049780.

Sequence in context: A106441 A131836 A133829 * A230296 A278317 A086454

Adjacent sequences:  A160648 A160649 A160650 * A160652 A160653 A160654

KEYWORD

nonn

AUTHOR

Leroy Quet, May 21 2009

EXTENSIONS

Extended by Ray Chandler, Jun 16 2009

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 July 9 04:34 EDT 2020. Contains 335538 sequences. (Running on oeis4.)