OFFSET
0,4
COMMENTS
This sequence looks on the Fibonacci sequence terms (from F_1 onwards) as an ordered set, considering F_1 and F_2 as distinct members mapped to the same integer value, namely 1. We run through all finite subsets, adding up the integer values from each subset (see table in the examples). In consequence, a number, k, occurs exactly A000121(k) times.
The definition is effectively an amendment of the definition of A022290 so that a(n) is a sum of Fibonacci terms starting with F_1 rather than F_2. If we took this a further step so that a(n) was a sum of Fibonacci terms starting with F_0, we would get this sequence with each term duplicated, that is 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, ... .
Doubling n increments the indices of the Fibonacci terms that sum to a(n), so a(2n) is in this sense a Fibonacci successor to a(n). When n is even, this sense matches the meaning of successor as used in A022342; however, for odd n, the generated successor of a(n) is A000201(a(n)) -- note, in this respect, that A000201 is a column in the extended Wythoff array (A287870).
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
n = 13: 13 = 8 + 4 + 1 = 2^(4-1) + 2^(3-1) + 2^(1-1); so a(n) = F_4 + F_3 + F_1 = 3 + 2 + 1 = 6.
Table showing initial terms with Fibonacci subsets:
n Fibonacci subset a(n)
0 { } (empty set) -> 0 = 0
1 { F_1 } -> 1 = 1
2 { F_2 } -> 0 + 1 = 1
3 { F_1, F_2 } -> 1 + 1 = 2
4 { F_3 } -> 0 + 0 + 2 = 2
5 { F_1, F_3 } -> 1 + 0 + 2 = 3
6 { F_2, F_3 } -> 0 + 1 + 2 = 3
7 { F_1, F_2, F_3 } -> 1 + 1 + 2 = 4
8 { F_4 } -> 0 + 0 + 0 + 3 = 3
9 { F_1, F_4 } -> 1 + 0 + 0 + 3 = 4
MATHEMATICA
a[n_] := Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; Array[a, 100, 0] (* Amiram Eldar, Aug 08 2023 *)
PROG
(PARI) a(n) = if(n==0, 0, if(n%2==1, a(n-1)+1, a(n/2)+a(n\4))); \\ Peter Munn, Sep 06 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Peter Munn, Sep 02 2022
STATUS
approved