OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += Floor[n*GoldenRatio^2]; n -= m++]; t, {n, 120}] (* G. C. Greubel, Jan 28 2022 *)
PROG
(Magma)
b:= func< n, j | IsIntegral((Sqrt(8*j+9) -3)/2) select Fibonacci(n-j+1) else 0 >;
A024324:= func< n | (&+[b(n, j): j in [1..Floor((n+1)/2)]]) >;
[A024324(n) : n in [1..80]]; // G. C. Greubel, Jan 28 2022
(Sage)
def b(n, j): return floor( (n+1-j)*(1+sqrt(5))/2 ) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
def A024324(n): return sum( b(n, k) for k in (1..((n+1)//2)) )
[A024324(n) for n in (1..80)] # G. C. Greubel, Jan 28 2022
(PARI) my(phi=quadgen(5)); a(n) = my(L=n>>1, m=2, ret=0); n--; while(n>L, ret += floor(n*phi); n-=(m++)); ret; \\ Kevin Ryde, Feb 03 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(62) corrected by Sean A. Irvine, Jun 27 2019
STATUS
approved