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!)
A236415 Sequence of distinct least triangular numbers such that the arithmetic mean of the first n terms is also a triangular number. Initial term is 0. 0

%I #19 Feb 07 2014 10:16:27

%S 0,6,3,15,741,153,25878,3828,16653,253,4753,23653,6328,53956,9730,

%T 191890,21115,140185,1225,26335,317206,3160,38503,2108431,37950,

%U 121278,1440905403,53483653,201733741,58595725,22663524351,787786971,23483020686,1475521326

%N Sequence of distinct least triangular numbers such that the arithmetic mean of the first n terms is also a triangular number. Initial term is 0.

%C Sequence is believed to be infinite. If a(31) exists, it will be greater than 10^10.

%C a(31)=22663524351. - _Jon E. Schoenfield_, Feb 07 2014

%e a(1) = 0.

%e a(2) must be a triangular number such that (a(1)+a(2))/2 is triangular. Thus, a(1) = 6.

%e a(3) must be a triangular number such that (a(1)+a(2)+a(3))/3 is triangular. Thus, a(3) = 3.

%e ...and so on

%o (Python)

%o def Tri(x):

%o ..for n in range(10**10):

%o ....if x == n*(n+1)/2:

%o ......return True

%o ....if x < n*(n+1)/2:

%o ......return False

%o ..return False

%o def TriAve(init):

%o ..print(init)

%o ..lst = []

%o ..lst.append(init)

%o ..n = 1

%o ..while n*(n+1)/2 < 10**10:

%o ....if n*(n+1)/2 not in lst:

%o ......if Tri(((sum(lst)+int(n*(n+1)/2))/(len(lst)+1))):

%o ........print(int(n*(n+1)/2))

%o ........lst.append(int(n*(n+1)/2))

%o ........n = 1

%o ......else:

%o ........n += 1

%o ....else:

%o ......n += 1

%Y Cf. A000217.

%K nonn

%O 1,2

%A _Derek Orr_, Jan 25 2014

%E More terms from _Jon E. Schoenfield_, Feb 07 2014

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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)