|
|
A333618
|
|
a(n) is the total number of terms (1-digits) in the dual Zeckendorf representation of all divisors of n.
|
|
3
|
|
|
1, 2, 3, 4, 3, 7, 3, 7, 6, 7, 5, 12, 4, 8, 8, 11, 5, 14, 6, 12, 9, 10, 5, 20, 7, 9, 11, 14, 6, 20, 6, 17, 11, 10, 10, 23, 6, 12, 11, 21, 5, 22, 6, 17, 17, 11, 6, 30, 8, 17, 13, 17, 8, 23, 12, 22, 13, 13, 6, 33, 7, 12, 18, 23, 12, 26, 6, 17, 13, 23, 7, 37, 7, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|