OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} A112310(d).
EXAMPLE
For n = 6, its divisors are 1, 2, 3 and 6. The dual Zeckendorf representations (A104326) of the divisors are 1, 10, 11 and 111. Their total number of 1's is 1 + 1 + 2 + 3 = 7, thus a(6) = 7.
MATHEMATICA
fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
a[n_] := DivisorSum[n, dualZeckSum[#] &]; Array[a, 100]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 29 2020
STATUS
approved