OFFSET
1,4
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{k>=1} Fibonacci(k-1)*x^k/(1 - x^k). - Ilya Gutkovskiy, May 23 2017
EXAMPLE
a(4)=3 because the divisors of 4 are 1,2,4 and the first, second and fourth Fibonacci numbers are 0, 1 and 2, respectively, having sum 3.
MAPLE
with(combinat): with(numtheory): f:=n->fibonacci(n-1): g:=proc(n) local div: div:=divisors(n): sum(f(div[j]), j=1..tau(n)) end: seq(g(n), n=1..45);
MATHEMATICA
a[n_] := DivisorSum[n, Fibonacci[#-1]&]; Array[a, 40] (* Jean-François Alcover, Dec 17 2015 *)
PROG
(PARI) a(n)=if(n<1, 1, sumdiv(n, d, fibonacci(d-1))); /* Joerg Arndt, Aug 14 2012 */
(Python)
from sympy import fibonacci, divisors
def a(n): return 1 if n<1 else sum([fibonacci(d - 1) for d in divisors(n)]) # Indranil Ghosh, May 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 01 2005
STATUS
approved