login
A356874
Write n as Sum_{i in S} 2^(i-1), where S is a set of positive integers, then a(n) = Sum_{i in S} F_i, where F_i is the i-th Fibonacci number, A000045(i).
6
0, 1, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 5, 6, 6, 7, 5, 6, 6, 7, 7, 8, 8, 9, 8, 9, 9, 10, 10, 11, 11, 12, 8, 9, 9, 10, 10, 11, 11, 12, 11, 12, 12, 13, 13, 14, 14, 15, 13, 14, 14, 15, 15, 16, 16, 17, 16, 17, 17, 18, 18, 19, 19, 20, 13, 14, 14, 15, 15, 16, 16, 17, 16, 17, 17, 18, 18, 19, 19, 20
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
FORMULA
a(2n) = a(n) + a(floor(n/2)); a(2n+1) = a(2n) + 1.
a(2^k) = A000045(k+1).
For k >= 1, 2^k < n < 2^(k+1), a(n) = a(n - 2^k) + a(2^k).
a(2n) = A022290(n).
a(4n) = A022342(a(2n)+1).
a(4n+2) = A000201(a(2n+1)).
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
Even bisection: A022290.
Sequence in context: A319856 A100197 A368314 * A057022 A287896 A087504
KEYWORD
nonn,base,easy
AUTHOR
Peter Munn, Sep 02 2022
STATUS
approved