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!)
A170856 a(0) = 0, a(1) = 1; a(2^i + j) = 2a(j) + 3a(j + 1) for 0 <= j < 2^i. 1

%I #13 Feb 24 2021 02:48:19

%S 0,1,3,11,3,11,39,31,3,11,39,31,39,139,171,71,3,11,39,31,39,139,171,

%T 71,39,139,171,179,495,791,555,151,3,11,39,31,39,139,171,71,39,139,

%U 171,179,495,791,555,151,39,139,171,179,495,791,555,259,495,791,879,1843,3363,3247

%N a(0) = 0, a(1) = 1; a(2^i + j) = 2a(j) + 3a(j + 1) for 0 <= j < 2^i.

%H Robert Israel, <a href="/A170856/b170856.txt">Table of n, a(n) for n = 0..10000</a>

%H David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]

%H N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>

%p f:= proc(n) option remember; local j;

%p j:= n - 2^ilog2(n);

%p 2*procname(j)+3*procname(j+1);

%p end proc:

%p f(0):= 0: f(1):= 1:

%p map(f, [$0..100]); # _Robert Israel_, Jun 12 2018

%t f[n_] := f[n] = With[{j = n - 2^Floor@Log[2, n]}, 2 f[j] + 3 f[j+1]];

%t f[0] = 0; f[1] = 1;

%t f /@ Range[0, 100] (* _Jean-François Alcover_, Aug 31 2020, after _Robert Israel_ *)

%K nonn,look

%O 0,3

%A _N. J. A. Sloane_, Jan 02 2010

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 12 14:54 EDT 2024. Contains 372482 sequences. (Running on oeis4.)