login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A151904 a(n) = (3^(wt(k)+f(j))-1)/2 if n = 6k+j, 0 <= j < 6, where wt = A000120, f = A151899. 6
0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 4, 4, 13, 13, 13, 40, 13, 13, 40, 40, 40, 121, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 4, 4, 13, 13, 13, 40, 13, 13, 40, 40, 40, 121, 4, 4, 13, 13, 13, 40, 13, 13, 40, 40, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Table of n, a(n) for n=0..82.

David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata

N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS

FORMULA

a(n) = (3^A151902(n)-1)/2.

MAPLE

f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;

wt := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end;

A151904 := proc(n) local k, j; k:=floor(n/6); j:=n-6*k; (3^(wt(k)+f(j))-1)/2; end;

PROG

(PARI) a(n)=(3^(hammingweight(n\6)+[0, 0, 1, 1, 1, 2][n%6+1])-1)/2 \\ Charles R Greathouse IV, Sep 26 2015

CROSSREFS

Cf, A151899, A151902, A151905-A151907.

Sequence in context: A183374 A176263 A110812 * A222360 A222371 A222479

Adjacent sequences:  A151901 A151902 A151903 * A151905 A151906 A151907

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Jul 31 2009

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 14:25 EDT 2018. Contains 316281 sequences. (Running on oeis4.)