login
A371381
Main diagonal of A219875.
3
2, 8, 13, 25, 41, 52, 74, 89, 117, 149, 170, 208, 250, 277, 325, 356, 410, 468, 505, 569, 610, 680, 754, 801, 881, 965, 1018, 1108, 1165, 1261, 1361, 1424, 1530, 1640, 1709, 1825, 1898, 2020, 2146, 2225, 2357, 2440, 2578, 2720, 2809, 2957, 3109, 3204, 3362, 3461
OFFSET
1,1
FORMULA
a(n) = n^2 + ceiling(n/(1 + sqrt(5))/2)^2 = n^2 + A019446(n)^2.
MATHEMATICA
Array[#^2 + Ceiling[# / GoldenRatio]^2 &, 100]
PROG
(Python)
from math import isqrt
def A371381(n): return (n<<1)*(n-1)+1+(q:=n+isqrt(5*n**2)>>1)*(q-(n-1<<1)) # Chai Wah Wu, Mar 21 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo Xausa, Mar 20 2024
STATUS
approved