login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #20 Aug 08 2023 12:10:24

%S 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,

%T 8,9,9,10,10,11,11,12,11,12,12,13,13,14,14,15,13,14,14,15,15,16,16,17,

%U 16,17,17,18,18,19,19,20,13,14,14,15,15,16,16,17,16,17,17,18,18,19,19,20

%N 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).

%C 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.

%C 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, ... .

%C 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).

%H Amiram Eldar, <a href="/A356874/b356874.txt">Table of n, a(n) for n = 0..10000</a>

%F a(2n) = a(n) + a(floor(n/2)); a(2n+1) = a(2n) + 1.

%F a(2^k) = A000045(k+1).

%F For k >= 1, 2^k < n < 2^(k+1), a(n) = a(n - 2^k) + a(2^k).

%F a(2n) = A022290(n).

%F a(4n) = A022342(a(2n)+1).

%F a(4n+2) = A000201(a(2n+1)).

%e 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.

%e Table showing initial terms with Fibonacci subsets:

%e n Fibonacci subset a(n)

%e 0 { } (empty set) -> 0 = 0

%e 1 { F_1 } -> 1 = 1

%e 2 { F_2 } -> 0 + 1 = 1

%e 3 { F_1, F_2 } -> 1 + 1 = 2

%e 4 { F_3 } -> 0 + 0 + 2 = 2

%e 5 { F_1, F_3 } -> 1 + 0 + 2 = 3

%e 6 { F_2, F_3 } -> 0 + 1 + 2 = 3

%e 7 { F_1, F_2, F_3 } -> 1 + 1 + 2 = 4

%e 8 { F_4 } -> 0 + 0 + 0 + 3 = 3

%e 9 { F_1, F_4 } -> 1 + 0 + 0 + 3 = 4

%t 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 *)

%o (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

%Y Cf. A000045, A000121, A000201, A022342, A287870.

%Y Even bisection: A022290.

%K nonn,base,easy

%O 0,4

%A _Peter Munn_, Sep 02 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 04:39 EDT 2024. Contains 375931 sequences. (Running on oeis4.)