OFFSET
1,2
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 1..500
FORMULA
a(n) = n + Sum_{k=1..n-2} Fibonacci(k)*floor(n/(k+2)), for n >= 2.
G.f.: 1/(1-x) * Sum_{i>0} f(x^i) * (1 - x^i) where f(x) is the g.f. of A000045. - John Tyler Rascoe, Feb 02 2026
MAPLE
a:= n-> add(combinat[fibonacci](floor(n/k)), k=1..n):
seq(a(n), n=1..41); # Alois P. Heinz, Feb 04 2026
MATHEMATICA
f[n_] := Sum[ Fibonacci@Floor[n/k], {k, n}] (* or *) f[n_] := n + Sum[Fibonacci@k*Floor[n/(k + 2)], {k, n - 2}]; Array[f, 38] (* Robert G. Wilson v, Jun 19 2006 *)
PROG
(Python)
from sympy import fibonacci
def A119737(n):
c, j = 0, 1
while j <= n:
c += fibonacci(k:=n//j)*(-j+(j:=n//k+1))
return c # Chai Wah Wu, Jan 29 2026
(PARI)
A_x(N) = {my(x='x+O('x^(N+1))); Vec(1/(1-x)*sum(i=1, N, x^i*(1-x^i)/(1-x^i-x^(2*i))))} \\ John Tyler Rascoe, Feb 02 2026
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jun 15 2006
EXTENSIONS
More terms from Robert G. Wilson v and Joshua Zucker, Jun 19 2006
STATUS
approved
