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!)
A352961 a(0) = 0, a(1) = 1, and for any n > 1, a(n) = a(n-2^e) + a(n-2^(e+1)) with e as large as possible (e = A070939(n) - 2). 2

%I #15 Apr 13 2022 13:01:19

%S 0,1,1,2,1,3,2,5,1,4,3,7,2,7,5,12,1,5,4,9,3,10,7,17,2,9,7,16,5,17,12,

%T 29,1,6,5,11,4,13,9,22,3,13,10,23,7,24,17,41,2,11,9,20,7,23,16,39,5,

%U 22,17,39,12,41,29,70,1,7,6,13,5,16,11,27,4,17,13

%N a(0) = 0, a(1) = 1, and for any n > 1, a(n) = a(n-2^e) + a(n-2^(e+1)) with e as large as possible (e = A070939(n) - 2).

%C This sequence is a variant of the Fibonacci sequence (A000045) with variable steps.

%H Rémy Sigrist, <a href="/A352961/b352961.txt">Table of n, a(n) for n = 0..8191</a>

%H Rémy Sigrist, <a href="/A352961/a352961.png">Logarithmic scatterplot of the first 2^17 terms</a>

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

%e a(0) = 0 by definition.

%e a(1) = 1 by definition.

%e a(2) = a(2-2^0) + a(2-2^1) = a(1) + a(0) = 1 + 0 = 1.

%e a(3) = a(3-2^0) + a(3-2^1) = a(2) + a(1) = 1 + 1 = 2.

%e a(4) = a(4-2^1) + a(4-2^2) = a(2) + a(0) = 1 + 0 = 1.

%e a(5) = a(5-2^1) + a(5-2^2) = a(3) + a(1) = 2 + 1 = 3.

%e a(6) = a(6-2^1) + a(6-2^2) = a(4) + a(2) = 1 + 1 = 2.

%e a(7) = a(7-2^1) + a(7-2^2) = a(5) + a(3) = 3 + 2 = 5.

%e a(8) = a(8-2^2) + a(8-2^3) = a(4) + a(0) = 1 + 0 = 1.

%o (PARI) { for (n=1, #a=vector(75), print1 (a[n]=if (n==1, 0, n==2, 1, e=#binary(n-1)-2; a[n-2^e]+a[n-2^(e+1)]),", ")) }

%Y See A352964 for a similar sequence.

%Y Cf. A000045, A070939.

%K nonn

%O 0,4

%A _Rémy Sigrist_, Apr 11 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 May 4 01:57 EDT 2024. Contains 372225 sequences. (Running on oeis4.)