A214648 Sum of next a(n) > 1 triangular numbers is a triangular number.
2, 5, 125, 51875, 8114028125
Offset: 1
Examples
(0+1)=1 is a triangular number, so a(1)=2, then (3+6+10+15+21)=55 is a triangular number, so a(2)=5.
Programs
-
Python
from _future_ import division from gmpy2 import is_square A214648_list, s, c, d = [], 0, 0, -1 for _ in range(10): k = 2 q = 4*(k*(k*(k+c)+d))//3 + 1 while not is_square(q): k += 1 q = 4*(k*(k*(k+c)+d))//3 + 1 A214648_list.append(k) s += k c, d = 3*s, 3*s**2-1 # Chai Wah Wu, Mar 01 2016
Formula
a(n) is the smallest integer k > 1 such that (4*k^3 + 12*s*k^2 + 4*(3*s^2-1)*k)/3 + 1 is a square, where s = a(1) + a(2) + ... + a(n-1). - Max Alekseyev, Jan 30 2014
Comments