A088207 a(n) = Sum_{k=0..n} floor(k*phi^2) where phi=(1+sqrt(5))/2.
0, 2, 7, 14, 24, 37, 52, 70, 90, 113, 139, 167, 198, 232, 268, 307, 348, 392, 439, 488, 540, 594, 651, 711, 773, 838, 906, 976, 1049, 1124, 1202, 1283, 1366, 1452, 1541, 1632, 1726, 1822, 1921, 2023, 2127, 2234, 2343, 2455, 2570, 2687, 2807, 2930, 3055, 3183
Offset: 0
Examples
A001950(1) = 2, then 5, 7, 10, 13, ...; partial sums are 2, 7, 14, 24, 37, ...
Programs
-
Mathematica
a[0] = 0; a[n_] := a[n] = (a[n - 1] + Floor[n*(1 + Sqrt[5])^2/4]); Table[ a[n], {n, 1, 50}] (* Robert G. Wilson v, Sep 27 2003 *) Accumulate[Floor[GoldenRatio^2 Range[0,50]]] (* Harvey P. Dale, Aug 11 2021 *)
-
Python
from math import isqrt from itertools import islice, count, accumulate def A088207_gen(): # generator of terms return accumulate((n+isqrt(5*n**2)>>1)+n for n in count(0)) A088207_list = list(islice(A088207_gen(),10)) # Chai Wah Wu, Aug 29 2022
Formula
a(n) = Sum_{k=1..n} floor(k*phi^2).
a(n) = floor((n*(n+1)/2)*phi^2 - n/2) + (0 or 1). - Benoit Cloitre, Sep 27 2003
a(n) = Sum_{k=1..n} floor(k*phi)+k = A054347(n)+n*(n+1)/2. - Jason Yuen, Jan 12 2025
Extensions
More terms from Robert G. Wilson v and Benoit Cloitre, Sep 27 2003
Comments