login
a(n) = 2*n*floor(n*(1 + sqrt(5))/2) - n^2. Main diagonal of A340429.
2

%I #21 Mar 21 2024 12:32:48

%S 1,8,15,32,55,72,105,128,171,220,253,312,377,420,495,544,629,720,779,

%T 880,945,1056,1173,1248,1375,1508,1593,1736,1827,1980,2139,2240,2409,

%U 2584,2695,2880,2997,3192,3393,3520,3731,3864,4085,4312,4455,4692,4935,5088,5341

%N a(n) = 2*n*floor(n*(1 + sqrt(5))/2) - n^2. Main diagonal of A340429.

%H Paolo Xausa, <a href="/A371388/b371388.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 2*n*A000201(n) - n^2.

%t Array[2 * # * Floor[# * GoldenRatio] - #^2 &, 100]

%o (Python)

%o from math import isqrt

%o def A371388(n): return n*((n+isqrt(5*n**2)&-2)-n) # _Chai Wah Wu_, Mar 21 2024

%Y Cf. A340429.

%Y Cf. A000201, A001622.

%K nonn,easy

%O 1,2

%A _Paolo Xausa_, Mar 21 2024