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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A159913 a(n) = 2^(A000120(n)+1)-1, where A000120(n) = number of nonzero bits in n. 4
1, 3, 3, 7, 3, 7, 7, 15, 3, 7, 7, 15, 7, 15, 15, 31, 3, 7, 7, 15, 7, 15, 15, 31, 7, 15, 15, 31, 15, 31, 31, 63, 3, 7, 7, 15, 7, 15, 15, 31, 7, 15, 15, 31, 15, 31, 31, 63, 7, 15, 15, 31, 15, 31, 31, 63, 15, 31, 31, 63, 31, 63, 63, 127, 3, 7, 7, 15, 7, 15, 15, 31, 7, 15, 15, 31, 15, 31, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Essentially the same sequence as A117973 and A001316. The latter entry has much more information. - N. J. A. Sloane, Jun 05 2009

First differences of A159912; every other term of A038573.

From Gary W. Adamson, Oct 16 2009: (Start)

Equals Sierpinski's gasket, A047999; as an infinite lower triangular matrix

* [1,2,2,2,...] as a vector. (End)

a(n) is also the number of cells turned ON at n-th generation in the outward corner version of the Ulam-Warburton cellular automaton of A147562, and a(n) is also the number of Y-toothpicks added at n-th generation in the outward corner version of the Y-toothpick structure of A160120. - David Applegate and Omar E. Pol, Jan 24 2016

LINKS

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

David Applegate, The movie version

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

Index entries for sequences related to cellular automata

Index entries for sequences related to toothpick sequences

FORMULA

a(n) = 2^A000120(2n+1)-1 = A038573(2n+1) = 2*A038573(n)+1 = A159912(n+1) - A159912(n).

a(n) = A160019(n,n). - Philippe Deléham, Nov 15 2011

a(n) = n - Sum_{k=0..n} (-1)^binomial(n, k). - Peter Luschny, Jan 14 2018

EXAMPLE

From Michael De Vlieger, Jan 25 2016: (Start)

The number n converted to binary, "0" represented by "." for better visibility of 1's, totaling the 1's and calculating the sequence:

n    Binary   Total                         a(n)

0 -> .     ->     0, thus 2^(0+1)-1 =  2-1 =  1

1 -> 1     ->     1,   "  2^(1+1)-1 =  4-1 =  3

2 -> 1.    ->     1,   "  2^(1+1)-1 =  4-1 =  3

3 -> 11    ->     2,   "  2^(2+1)-1 =  8-1 =  7

4 -> 1..   ->     1,   "  2^(1+1)-1 =  4-1 =  3

5 -> 1.1   ->     2,   "  2^(2+1)-1 =  8-1 =  7

6 -> 11.   ->     2,   "  2^(2+1)-1 =  8-1 =  7

7 -> 111   ->     3,   "  2^(3+1)-1 = 16-1 = 15

8 -> 1...  ->     1,   "  2^(1+1)-1 =  4-1 =  3

9 -> 1..1  ->     2,   "  2^(2+1)-1 =  8-1 =  7

10-> 1.1.  ->     2,   "  2^(2+1)-1 =  8-1 =  7

(End)

MATHEMATICA

Table[2^(DigitCount[n, 2][[1]] + 1) - 1, {n, 0, 78}] (* or *)

Table[2^(Total@ IntegerDigits[n, 2] + 1) - 1, {n, 0, 78}] (* Michael De Vlieger, Jan 25 2016 *)

PROG

(PARI) A159913(n)=2<<norml2(binary(n))-1

CROSSREFS

Rows of triangle in A038573 converge to this sequence. - N. J. A. Sloane, Jun 05 2009

Cf. A000120, A038573, A047999, A159912, A117973, A001316, A147582, A160121.

Sequence in context: A285387 A100803 A036840 * A183061 A172097 A193934

Adjacent sequences:  A159910 A159911 A159912 * A159914 A159915 A159916

KEYWORD

nonn

AUTHOR

M. F. Hasler, May 03 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 February 22 20:06 EST 2018. Contains 299469 sequences. (Running on oeis4.)