login
First differences of A036449, triangular numbers by definition.
3

%I #24 Dec 11 2022 16:16:59

%S 1,3,21,171,1485,435,16653,149331,1342341,12076155,990528,1279200,

%T 263901,169071,446985,133865703,1180416,1214185281,2366400,25045503,

%U 247275441,8923200,19634511,56525028,229847520,739374285,224497455,81939201,24010841091,1106357280

%N First differences of A036449, triangular numbers by definition.

%H Donovan Johnson, <a href="/A189475/b189475.txt">Table of n, a(n) for n = 1..144</a>

%F a(n) = A036449(n+1) - A036449(n). [Corrected by _Georg Fischer_, Dec 11 2022]

%F A010054(a(n)) = 1.

%o (Haskell) Cf. program in A036449 (simultaneous computation).

%o (Python)

%o from itertools import count, islice

%o from sympy import integer_nthroot

%o def A189475_gen(): # generator of terms

%o a = 0

%o for n in count(1):

%o if integer_nthroot(((b:=n**2)-a<<3)+1,2)[1]:

%o yield b-a

%o a = b

%o A189475_list = list(islice(A189475_gen(),20)) # _Chai Wah Wu_, Nov 14 2022

%Y Cf. A010054, A036449.

%Y Subsequence of A000217.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Apr 23 2011