login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A294044 a(0) = 0, a(1) = a(2) = 1; a(2*n) = 2*a(n) + a(n+1), a(2*n+1) = a(n) + a(n+1). 2
0, 1, 1, 2, 4, 3, 8, 6, 11, 7, 14, 11, 22, 14, 23, 17, 29, 18, 28, 21, 39, 25, 44, 33, 58, 36, 51, 37, 63, 40, 63, 46, 76, 47, 64, 46, 77, 49, 81, 60, 103, 64, 94, 69, 121, 77, 124, 91, 152, 94, 123, 87, 139, 88, 137, 100, 166, 103, 143, 103, 172, 109, 168, 122, 199, 123, 158, 111, 174, 110, 169 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

Michael Gilleland, Some Self-Similar Integer Sequences

Ilya Gutkovskiy, Extended graphical example

FORMULA

a(n) = a(2*n) - a(2*n+1) for n > 1.

a(n+1) = 2*a(2*n+1) - a(2*n) for n > 1.

a(2^(k+1)) = floor(phi^(2*k+1)) = A002878(k), where phi is the golden ratio (A001622).

a(2^(k+1)+1) = phi^(2*k) + phi^(-2*k) = A005248(k).

a(2^(k+1)-1) = floor(phi^(2*k)) = A005592(k).

G.f. g(x) satisfies g(x) = (x + 2 + 1/x + 1/x^2)*g(x^2) - 1 - 2*x^2. - Robert Israel, Oct 24 2017

EXAMPLE

a(0) = 0; a(1) = a(2) = 1;

a(3) = a(2*1+1) = a(1) + a(2) = 2;

a(4) = a(2*2) = 2*a(2) + a(3) = 4;

a(5) = a(2*2+1) = a(2) + a(3) = 3;

a(6) = a(2*3) = 2*a(3) + a(4) = 8, etc.

MAPLE

f:= proc(n) option remember;

  if n::odd then procname((n+1)/2)+procname((n-1)/2)

  else 2*procname(n/2)+procname(n/2+1)

  fi

end proc:

f(0):= 0: f(1):= 1: f(2):= 1:

map(f, [$0..100]); # Robert Israel, Oct 24 2017

MATHEMATICA

a[0] = 0; a[1] = 1; a[2] = 1; a[n_] := If[EvenQ[n], 2 a[n/2] + a[(n + 2)/2],  a[(n - 1)/2] + a[(n + 1)/2]]; Table[a[n], {n, 0, 70}]

CROSSREFS

Cf. A001622, A002487, A002878, A005248, A005592.

Sequence in context: A243491 A271863 A253563 * A243072 A243346 A295029

Adjacent sequences:  A294041 A294042 A294043 * A294045 A294046 A294047

KEYWORD

nonn

AUTHOR

Ilya Gutkovskiy, Oct 22 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 16:21 EDT 2020. Contains 335729 sequences. (Running on oeis4.)