[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A214697
Least k > 1 such that tri(n)+ ... + tri(n+k-1) is a triangular number.
2
2, 3, 5, 17, 7, 2, 89, 125, 3, 215, 269, 13, 10, 8, 11, 27, 719, 815, 21, 57, 316, 11, 26, 1517, 17, 1799, 30, 26, 7, 5, 2609, 11, 2975, 10, 2, 76, 3779, 1251, 208, 4445, 115, 4919, 1045, 5417, 11, 17, 1205, 6485, 38, 2860, 7349, 18, 25, 8267, 8585, 8909
OFFSET
0,1
COMMENTS
tri(n) = n*(n+1)/2 is the n-th triangular number, A000217(n).
a(n) is how many consecutive triangular numbers starting from tri(n) are needed to sum up to tri(x) for some x. The requirement a(n) > 1 is needed, because otherwise all a(n) = 1.
Because an oblong number (A002378) is twice a triangular number, this sequence is also the least k > 1 such that oblong(n) + ... + oblong(n+k-1) is an oblong number.
a(n) is least k > 1 such that 12*k^3 + 36*n*k^2 + 36*k*n^2 - 12*k + 9 is a perfect square. - Chai Wah Wu, Mar 01 2016
a(n) <= 3*n^2 - 3*n - 1 for n > 1, since 12*k^3 + 36*n*k^2 + 36*k*n^2 - 12*k + 9 is a square when k = 3*n^2 - 3*n - 1. - Robert Israel, Mar 03 2016
EXAMPLE
0+1 = 1 is a triangular number, two summands, so a(0)=2.
1+3+6 = 10 is a triangular number, three summands, so a(1)=3.
3+6+10+15+21 = 55 is a triangular number, five summands, so a(2)=5.
Starting from Triangular(5)=15: 15+21=36 is a triangular number, two summands, so a(5)=2.
MAPLE
f:= proc(n) local k;
for k from 2 do if issqr(12*k^3+36*k^2*n+36*k*n^2-12*k+9) then return k fi od
end proc:
map(f, [$0..100]); # Robert Israel, Mar 03 2016
MATHEMATICA
triQ[n_] := IntegerQ[Sqrt[1+8*n]]; Table[k = n+1; s = k^2; While[! triQ[s], k++; s = s + k*(k+1)/2]; k - n + 1, {n, 0, 55}] (* T. D. Noe, Jul 26 2012 *)
PROG
(Python)
for n in range(77):
i = ti = n
sum = 0
tn_gte_sum = 0 # least oblong number >= sum
while i-n<=1 or tn_gte_sum!=sum:
sum += i*(i+1)
i+=1
while tn_gte_sum<sum:
tn_gte_sum = ti*(ti+1)
ti+=1
print i-n,
(Python)
from math import sqrt
def A214697(n):
k, a1, a2, m = 2, 36*n, 36*n**2 - 12, n*(72*n + 144) + 81
while int(round(sqrt(m)))**2 != m:
k += 1
m = k*(k*(12*k + a1) + a2) + 9
return k # Chai Wah Wu, Mar 01 2016
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Alex Ratushnyak, Jul 26 2012
STATUS
approved