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!)
A238018 Least k such that the sum triangular(k) + triangular(k+1) +...+ triangular(k+n-1) is a triangular number, or -1 if no such k exists. 1
0, 0, 1, 0, 2, -1, 4, 1, 0, 12, 14, -1, 11, -1, -1, 76, 3, 28, -1, 1, 0, 33, -1, -1, 52, 22, 4, 29, 11, 13, 5, -1, -1, 1, 0, 74, -1, 3, -1, 83, -1, -1, 76, 1006, -1, -1, 518, -1, 150, -1, -1, 103, 133, 51, 14, 45, 19, -1, 5, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
EXAMPLE
a(5) = 2 because 2 is the least integer such that the sum of 5 consecutive triangular numbers starting with triangular(2) is a triangular number: 55 = 3+6+10+15+21.
a(7) = 4 because 4 is the least integer such that the sum of 7 consecutive triangular numbers starting with triangular(4) is a triangular number: 210 = 10+15+21+28+36+45+55.
MATHEMATICA
s[n_, k_] := n*(3*k^2 + 3*k*n + n^2 - 1)/6; a[1] = 0; a[n_] := Module[{r}, r = Reduce[ k >= 0 && m >= 0 && 8*s[n, k] + 1 == m^2 , {k, m}, Integers] /. C[1] -> 1 // FullSimplify; If[r === False, -1, k /. {ToRules[r]} // Min]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Feb 26 2014 *)
CROSSREFS
Sequence in context: A353606 A220420 A190616 * A368945 A131642 A070674
KEYWORD
sign
AUTHOR
Alex Ratushnyak, Feb 17 2014
EXTENSIONS
More terms from Jean-François Alcover, Feb 26 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 May 10 05:09 EDT 2024. Contains 372356 sequences. (Running on oeis4.)