cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A174066 Irregular triangle, row sums = A000041, left border = A174065.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 2, 1, 5, 3, 1, 2, 7, 4, 2, 2, 9, 5, 3, 2, 3, 12, 7, 4, 4, 3, 15, 9, 5, 6, 3, 4, 19, 12, 7, 8, 6, 4, 25, 15, 9, 10, 9, 4, 5, 31, 19, 12, 14, 12, 8, 5, 38, 25, 15, 18, 15, 12, 5, 7, 48, 31, 19, 24, 21, 16, 10, 7, 60, 38, 25, 30, 27, 20, 15, 7, 9, 73, 48, 31, 38, 36
Offset: 1

Views

Author

Gary W. Adamson, Mar 06 2010

Keywords

Comments

Left border = A174065: (1, 1, 1, 2, 3, 4, 5, 7, 9, 12,...) * its aerated variant (1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 7,...) = A000041, the partition sequence: (1, 1, 2, 3, 5, 7, 11, 15, 22, 30,...).

Examples

			Heading and first few rows of the triangle =
.1,...1,...1,...2,...3,...4,...5,...7,...9,... = A174065.
.1;........................................... = .. 1 (A000041)
.1;........................................... = .. 1
.1,...1;...................................... = .. 2
.2,...1;...................................... = .. 3
.3,...1,...1;................................. = .. 5
.4,...2,...1;................................. = .. 7
.5,...3,...1,...2;............................ = ..11
.7,...4,...2,...2;............................ = ..15
.9....5,...3,...2,...3;....................... = ..22
.12,..7,...4,...4,...3;....................... = ..30
.15,..9,...5,...6,...3;...4;.................. = ..42
.19,.12,...7,...8,...6,...4;.................. = ..56
.25,.15,...9,..10,...9,...4,...5;............. = ..77
.31,.19,..12,..14,..12,...8,...5;............. = .101
.38,.25,..15,..18,..15,..12,...5,...7;........ = .135
.48,.31,..19,..24,..21,..16,..10,...7;........ = .176
.60,.38,..25,..30,..27,..20,..15,...7,...9;... = .231
.73,.48,..31,..38,..36,..28,..20,..14,...9;... = .297
...
Example: leftmost term in 8th row has to be 7 = (15 - (4 + 2 + 2)); so we
place a 7 as next term in the heading, then multiply * leftmost column.
Finally, shift the columns down twice.
		

Crossrefs

Formula

The triangle is the result of three rules after beginning (1, 1, 1, 1,...):
Columns >1 are shifted down twice from previous columns; column terms = left border * (left border placed as a heading row); and row sums = A000041, the partition numbers. The rules force the next missing term in the triangle to be the leftmost term in column 1. This is found by taking p(n) for row n, then subtracting the sum of row n terms (minus leftmost term).

A003159 Numbers whose binary representation ends in an even number of zeros.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 33, 35, 36, 37, 39, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 97, 99, 100, 101, 103, 105
Offset: 1

Views

Author

Keywords

Comments

Fraenkel (2010) called these the "vile" numbers.
Minimal with respect to property that parity of number of 1's in binary expansion alternates.
Minimal with respect to property that sequence is half its complement. [Corrected by Aviezri S. Fraenkel, Jan 29 2010]
If k appears then 2k does not.
Increasing sequence of positive integers k such that A035263(k)=1 (from paper by Allouche et al.). - Emeric Deutsch, Jan 15 2003
a(n) is an odious number (see A000069) for n odd; a(n) is an evil number (see A001969) for n even. - Philippe Deléham, Mar 16 2004
Indices of odd numbers in A007913, in A001511. - Philippe Deléham, Mar 27 2004
Partial sums of A026465. - Paul Barry, Dec 09 2004
A121701(2*a(n)) = A121701(a(n)); A096268(a(n)-1) = 0. - Reinhard Zumkeller, Aug 16 2006
A different permutation of the same terms may be found in A141290 and the accompanying array. - Gary W. Adamson, Jun 14 2008
a(n) = n-th clockwise Tower of Hanoi move; counterclockwise if not in the sequence. - Gary W. Adamson, Jun 14 2008
Indices of terms of Thue-Morse sequence A010060 which are different from the previous term. - Tanya Khovanova, Jan 06 2009
The sequence has the following fractal property. Remove the odd numbers from the sequence, leaving 4,12,16,20,28,36,44,48,52,... Dividing these terms by 4 we get 1,3,4,5,7,9,11,12,..., which is the original sequence back again. - Benoit Cloitre, Apr 06 2010
From Gary W. Adamson, Mar 21 2010: (Start)
A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).
The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeff A174065 = the Euler transform of A035263 = 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^5)*...) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + ... and the aerated variant = the Euler transform of the complement of A035263: 1/((1-x^2)*(1-x^6)*(1-x^8)*...) = 1 + x^2 + x^4 + 2*x^6 + 3*x^8 + 4*x^10 + ....
(End)
The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013. - Gary W. Adamson, Jan 22 2014
If the lower s-Wythoff sequence of s is s, then s=A003159. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A003159 is the limit when the lower s-Wythoff operation is iterated. For example, starting with s=(1,4,9,16,...)=(n^2), we obtain lower and upper s-Wythoff sequences
a=(1,3,4,5,6,8,9,10,11,12,14,...)=A184427;
b=(2,7,12,21,31,44,58,74,...)=A184428.
Then putting s=a and repeating the operation gives a'=(1,3,4,5,7,9,11,12,14,...), which has the same first eight terms as A003159. - Clark Kimberling, Jan 14 2011

Examples

			1=1, 3=11, 5=101 and 7=111 have no (0 = even) trailing zeros, 4=100 has 2 (= even) trailing zeros in the base-2 representation.
2=10 and 6=110 end in one (=odd number) of trailing zeros in their base-2 representation, therefore are not terms of this sequence. - _M. F. Hasler_, Oct 29 2013
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

For the actual binary numbers see A280049.
Indices of even numbers in A007814.
Complement of A036554, also one-half of A036554.

Programs

  • Haskell
    import Data.List (delete)
    a003159 n = a003159_list !! (n-1)
    a003159_list = f [1..] where f (x:xs) = x : f (delete  (2*x) xs)
    -- Reinhard Zumkeller, Nov 04 2011
    
  • Maple
    filter:= n -> type(padic:-ordp(n,2),even):
    select(filter,[$1..1000]); # Robert Israel, Jul 07 2014
  • Mathematica
    f[n_Integer] := Block[{k = n, c = 0}, While[ EvenQ[k], c++; k /= 2]; c]; Select[ Range[105], EvenQ[ f[ # ]] & ]
    Select[Range[150],EvenQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    a(n)=if(n<2,n>0,n=a(n-1); until(valuation(n,2)%2==0,n++); n)
    
  • PARI
    is(n)=valuation(n,2)%2==0 \\ Charles R Greathouse IV, Sep 23 2012
    
  • Python
    from itertools import count, islice
    def A003159_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(n&-n).bit_length()&1,count(max(startvalue,1)))
    A003159_list = list(islice(A003159_gen(),30)) # Chai Wah Wu, Jul 11 2022
    
  • Python
    def A003159(n):
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1^1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Jan 29 2025

Formula

a(0) = 1; for n >= 0, a(n+1) = a(n) + 1 if (a(n) + 1)/2 is not already in the sequence, = a(n) + 2 otherwise.
Limit_{n->oo} a(n)/n = 3/2. - Benoit Cloitre, Jun 13 2002
More precisely, a(n) = 3*n/2 + O(log n). - Charles R Greathouse IV, Sep 23 2012
a(n) = Sum_{k = 1..n} A026465(k). - Benoit Cloitre, May 31 2003
a(n+1) = (if a(n) mod 4 = 3 then A007814(a(n) + 1) mod 2 else a(n) mod 2) + a(n) + 1; a(1) = 1. - Reinhard Zumkeller, Aug 03 2003
a(A003157(n)) is even. - Philippe Deléham, Feb 22 2004
Sequence consists of numbers of the form 4^i*(2*j + 1), i>=0, j>=0. - Jon Perry, Jun 06 2004
G.f.: (1/(1-x)) * Product_{k >= 1} (1 + x^A001045(k)). - Paul Barry, Dec 09 2004
a(1) = 1, a(2) = 3, and for n >= 2 we get a(n+1) = 4 + a(n) + a(n-1) - a(a(n)-n+1) - a(a(n-1)-n+2). - Benoit Cloitre, Apr 08 2010
If A(x) is the counting function for a(n) <= x, then A(2^n) = (2^(n+1) + (-1)^n)/3. - Vladimir Shevelev, Apr 15 2010
a(n) = A121539(n) + 1. - Reinhard Zumkeller, Mar 01 2012
A003159 = { N | A007814(N) is even }. - M. F. Hasler, Oct 29 2013

Extensions

Additional comments from Michael Somos
Edited by M. F. Hasler, Oct 29 2013
Incorrect formula removed by Peter Munn, Dec 04 2020

A036554 Numbers whose binary representation ends in an odd number of zeros.

Original entry on oeis.org

2, 6, 8, 10, 14, 18, 22, 24, 26, 30, 32, 34, 38, 40, 42, 46, 50, 54, 56, 58, 62, 66, 70, 72, 74, 78, 82, 86, 88, 90, 94, 96, 98, 102, 104, 106, 110, 114, 118, 120, 122, 126, 128, 130, 134, 136, 138, 142, 146, 150, 152, 154, 158, 160, 162, 166, 168, 170, 174
Offset: 1

Views

Author

Keywords

Comments

Fraenkel (2010) called these the "dopey" numbers.
Also n such that A035263(n)=0 or A050292(n) = A050292(n-1).
Indices of even numbers in A033485. - Philippe Deléham, Mar 16 2004
a(n) is an odious number (see A000069) for n odd; a(n) is an evil number (see A001969) for n even. - Philippe Deléham, Mar 16 2004
Indices of even numbers in A007913, in A001511. - Philippe Deléham, Mar 27 2004
This sequence consists of the increasing values of n such that A097357(n) is even. - Creighton Dement, Aug 14 2004
Numbers with an odd number of 2's in their prime factorization (e.g., 8 = 2*2*2). - Mark Dow, Sep 04 2007
Equals the set of natural numbers not in A003159 or A141290. - Gary W. Adamson, Jun 22 2008
Represents the set of CCW n-th moves in the standard Tower of Hanoi game; and terms in even rows of a [1, 3, 5, 7, 9, ...] * [1, 2, 4, 8, 16, ...] multiplication table. Refer to the example. - Gary W. Adamson, Mar 20 2010
Refer to the comments in A003159 relating to A000041 and A174065. - Gary W. Adamson, Mar 21 2010
If the upper s-Wythoff sequence of s is s, then s=A036554. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A036554 is the limit when the upper s-Wythoff operation is iterated. For example, starting with s=(1,4,9,16,...) = (n^2), we obtain lower and upper s-Wythoff sequences
a=(1,3,4,5,6,8,9,10,11,12,14,...) = A184427;
b=(2,7,12,21,31,44,58,74,...) = A184428.
Then putting s=a and repeating the operation gives
b'=(2,6,8,10,13,17,20,...), which has the same first four terms as A036554. - Clark Kimberling, Jan 14 2011
Or numbers having infinitary divisor 2, or the same, having factor 2 in Fermi-Dirac representation as a product of distinct terms of A050376. - Vladimir Shevelev, Mar 18 2013
Thus, numbers not in A300841 or in A302792. Equally, sequence 2*A300841(n) sorted into ascending order. - Antti Karttunen, Apr 23 2018

Examples

			From _Gary W. Adamson_, Mar 20 2010: (Start)
Equals terms in even numbered rows in the following multiplication table:
(rows are labeled 1,2,3,... as with the Towers of Hanoi disks)
   1,  3,  5,  7,  9, 11, ...
   2,  6, 10, 14, 18, 22, ...
   4, 12, 20, 28, 36, 44, ...
   8, 24, 40, 56, 72, 88, ...
   ...
As shown, 2, 6, 8, 10, 14, ...; are in even numbered rows, given the row with (1, 3, 5, 7, ...) = row 1.
The term "5" is in an odd row, so the 5th Towers of Hanoi move is CW, moving disc #1 (in the first row).
a(3) = 8 in row 4, indicating that the 8th Tower of Hanoi move is CCW, moving disc #4.
A036554 bisects the positive nonzero natural numbers into those in the A036554 set comprising 1/3 of the total numbers, given sufficiently large n.
This corresponds to 1/3 of the TOH moves being CCW and 2/3 CW. Row 1 of the multiplication table = 1/2 of the natural numbers, row 2 = 1/4, row 3 = 1/8 and so on, or 1 = (1/2 + 1/4 + 1/8 + 1/16 + ...). Taking the odd-indexed terms of this series given offset 1, we obtain 2/3 = 1/2 + 1/8 + 1/32 + ..., while sum of the even-indexed terms is 1/3. (End)
		

Crossrefs

Indices of odd numbers in A007814. Subsequence of A036552. Complement of A003159. Also double of A003159.
Cf. A000041, A003157, A003158, A005408, A052330, A072939, A079523, A096268 (characteristic function, when interpreted with offset 1), A141290, A174065, A300841.

Programs

  • Haskell
    a036554 = (+ 1) . a079523  -- Reinhard Zumkeller, Mar 01 2012
    
  • Magma
    [2*m:m in [1..100] | Valuation(m,2) mod 2 eq 0]; // Marius A. Burtea, Aug 29 2019
    
  • Mathematica
    Select[Range[200],OddQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    is(n)=valuation(n,2)%2 \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    def ok(n):
      c = 0
      while n%2 == 0: n //= 2; c += 1
      return c%2 == 1
    print([m for m in range(1, 175) if ok(m)]) # Michael S. Branicky, Feb 06 2021
    
  • Python
    from itertools import count, islice
    def A036554_gen(startvalue=1): return filter(lambda n:(~n & n-1).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue
    A036554_list = list(islice(A036554_gen(),30)) # Chai Wah Wu, Jul 05 2022
    
  • Python
    is_A036554 = lambda n: A001511(n)&1==0 # M. F. Hasler, Nov 26 2024
    
  • Python
    def A036554(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        return bisection(f,n,n) # Chai Wah Wu, Jan 29 2025

Formula

a(n) = A079523(n)+1 = A072939(n)-1.
a(n) = A003156(n) + n = A003157(n) - n = A003158(n) - n + 1. - Philippe Deléham, Apr 10 2004
Values of k such that A091297(k) = 2. - Philippe Deléham, Feb 25 2004
a(n) ~ 3n. - Charles R Greathouse IV, Nov 20 2012 [In fact, a(n) = 3n + O(log n). - Charles R Greathouse IV, Nov 27 2024]
a(n) = 2*A003159(n). - Clark Kimberling, Sep 30 2014
{a(n)} = A052330({A005408(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Aug 26 2019

Extensions

Incorrect equation removed from formula by Peter Munn, Dec 04 2020

A035263 Trajectory of 1 under the morphism 0 -> 11, 1 -> 10; parity of 2-adic valuation of 2n: a(n) = A000035(A001511(n)).

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Keywords

Comments

First Feigenbaum symbolic (or period-doubling) sequence, corresponding to the accumulation point of the 2^{k} cycles through successive bifurcations.
To construct the sequence: start with 1 and concatenate: 1,1, then change the last term (1->0; 0->1) gives: 1,0. Concatenate those 2 terms: 1,0,1,0, change the last term: 1,0,1,1. Concatenate those 4 terms: 1,0,1,1,1,0,1,1 change the last term: 1,0,1,1,1,0,1,0, etc. - Benoit Cloitre, Dec 17 2002
Let T denote the present sequence. Here is another way to construct T. Start with the sequence S = 1,0,1,,1,0,1,,1,0,1,,1,0,1,,... and fill in the successive holes with the successive terms of the sequence T (from paper by Allouche et al.). - Emeric Deutsch, Jan 08 2003 [Note that if we fill in the holes with the terms of S itself, we get A141260. - N. J. A. Sloane, Jan 14 2009]
From N. J. A. Sloane, Feb 27 2009: (Start)
In more detail: define S to be 1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1,0,1___...
If we fill the holes with S we get A141260:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........0.......1.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.0.1.... = A141260.
But instead, if we define T recursively by filling the holes in S with the terms of T itself, we get A035263:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........1.......0.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.1.1.0.1.0.1..0..1.1.1..0..1.0.1.. = A035263. (End)
Characteristic function of A003159, i.e., A035263(n)=1 if n is in A003159 and A035263(n)=0 otherwise (from paper by Allouche et al.). - Emeric Deutsch, Jan 15 2003
This is the sequence of R (=1), L (=0) moves in the Towers of Hanoi puzzle: R, L, R, R, R, L, R, L, R, L, R, R, R, ... - Gary W. Adamson, Sep 21 2003
Manfred Schroeder, p. 279 states, "... the kneading sequences for unimodal maps in the binary notation, 0, 1, 0, 1, 1, 1, 0, 1..., are obtained from the Morse-Thue sequence by taking sums mod 2 of adjacent elements." On p. 278, in the chapter "Self-Similarity in the Logistic Parabola", he writes, "Is there a closer connection between the Morse-Thue sequence and the symbolic dynamics of the superstable orbits? There is indeed. To see this, let us replace R by 1 and C and L by 0." - Gary W. Adamson, Sep 21 2003
Partial sums modulo 2 of the sequence 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), a(5), a(6), a(6), ... . - Philippe Deléham, Jan 02 2004
Parity of A007913, A065882 and A065883. - Philippe Deléham, Mar 28 2004
The length of n-th run of 1's in this sequence is A080426(n). - Philippe Deléham, Apr 19 2004
Also parity of A005043, A005773, A026378, A104455, A117641. - Philippe Deléham, Apr 28 2007
Equals parity of the Towers of Hanoi, or ruler sequence (A001511), where the Towers of Hanoi sequence (1, 2, 1, 3, 1, 2, 1, 4, ...) denotes the disc moved, labeled (1, 2, 3, ...) starting from the top; and the parity of (1, 2, 1, 3, ...) denotes the direction of the move, CW or CCW. The frequency of CW moves converges to 2/3. - Gary W. Adamson, May 11 2007
A conjectured identity relating to the partition sequence, A000041: p(x) = A(x) * A(x^2) when A(x) = the Euler transform of A035263 = polcoeff A174065: (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...). - Gary W. Adamson, Mar 21 2010
a(n) is 1 if the number of trailing zeros in the binary representation of n is even. - Ralf Stephan, Aug 22 2013
From Gary W. Adamson, Mar 25 2015: (Start)
A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).
The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeffA174065 = the Euler transform of A035263 = 1/(1-x)*(1-x^3)*(1-x^4)*(1-x^5)*... = (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...) and the aerated variant = the Euler transform of the complement of A035263: 1/(1-x^2)*(1-x^6)*(1-x^8)*... = (1 + x^2 + x^4 + 2x^6 + 3x^8 + 4x^10 + ...).
(End)
The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013.
Regarded as a column vector, this sequence is the product of A047999 (Sierpinski's gasket) regarded as an infinite lower triangular matrix and A036497 (the Fredholm-Rueppel sequence) where the 1's have alternating signs, 1, -1, 0, 1, 0, 0, 0, -1, .... - Gary W. Adamson, Jun 02 2021
The numbers of 1's through n (A050292) can be determined by starting with the binary (say for 19 = 1 0 0 1 1) and writing: next term is twice current term if 0, otherwise twice plus 1. The result is 1, 2, 4, 9, 19. Take the difference row, = 1, 1, 2, 5, 10; and add the odd-indexed terms from the right: 5, 4, 3, 2, 1 = 10 + 2 + 1 = 13. The algorithm is the basis for determining the disc configurations in the tower of Hanoi game, as shown in the Jul 24 2021 comment of A060572. - Gary W. Adamson, Jul 28 2021

References

  • Karamanos, Kostas. "From symbolic dynamics to a digital approach." International Journal of Bifurcation and Chaos 11.06 (2001): 1683-1694. (Full version. See p. 1685)
  • Karamanos, K. (2000). From symbolic dynamics to a digital approach: chaos and transcendence. In Michel Planat (Ed.), Noise, Oscillators and Algebraic Randomness (Lecture Notes in Physics, pp. 357-371). Springer, Berlin, Heidelberg. (Short version. See p. 359)
  • Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 892, column 2, Note on p. 84, part (a).

Crossrefs

Parity of A001511. Anti-parity of A007814.
Absolute values of first differences of A010060. Apart from signs, same as A029883. Essentially the same as A056832.
Swapping 0 and 1 gives A096268.
Cf. A033485, A050292 (partial sums), A089608, A088172, A019300, A039982, A073675, A121701, A141260, A000041, A174065, A220466, A154269 (Mobius transform).
Limit of A317957(n) for large n.

Programs

  • Haskell
    import Data.Bits (xor)
    a035263 n = a035263_list !! (n-1)
    a035263_list = zipWith xor a010060_list $ tail a010060_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Maple
    nmax:=105: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (p+1) mod 2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 07 2013
    A035263 := n -> 1 - padic[ordp](n, 2) mod 2:
    seq(A035263(n), n=1..105); # Peter Luschny, Oct 02 2018
  • Mathematica
    a[n_] := a[n] = If[ EvenQ[n], 1 - a[n/2], 1]; Table[ a[n], {n, 1, 105}] (* Or *)
    Rest[ CoefficientList[ Series[ Sum[ x^(2^k)/(1 + (-1)^k*x^(2^k)), {k, 0, 20}], {x, 0, 105}], x]]
    f[1] := True; f[x_] := Xor[f[x - 1], f[Floor[x/2]]]; a[x_] := Boole[f[x]] (* Ben Branman, Oct 04 2010 *)
    a[n_] := If[n == 0, 0, 1 - Mod[ IntegerExponent[n, 2], 2]]; (* Jean-François Alcover, Jul 19 2013, after Michael Somos *)
    Nest[ Flatten[# /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Robert G. Wilson v, Jul 23 2014 *)
    SubstitutionSystem[{0->{1,1},1->{1,0}},1,{7}][[1]] (* Harvey P. Dale, Jun 06 2022 *)
  • PARI
    {a(n) = if( n==0, 0, 1 - valuation(n, 2)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); subst( Pol(binary(n)) - Pol(binary(n-1)), x, 1)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); direuler(p=2, n, 1 / (1 - X^((p<3) + 1)))[n])}; /* Michael Somos, Sep 04 2006 */
    
  • Python
    def A035263(n): return (n&-n).bit_length()&1 # Chai Wah Wu, Jan 09 2023
  • Scheme
    (define (A035263 n) (let loop ((n n) (i 1)) (cond ((odd? n) (modulo i 2)) (else (loop (/ n 2) (+ 1 i)))))) ;; (Use mod instead of modulo in R6RS) Antti Karttunen, Sep 11 2017
    

Formula

Absolute values of first differences (A029883) of Thue-Morse sequence (A001285 or A010060). Self-similar under 10->1 and 11->0.
Series expansion: (1/x) * Sum_{i>=0} (-1)^(i+1)*x^(2^i)/(x^(2^i)-1). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 17 2003
a(n) = Sum_{k>=0} (-1)^k*(floor((n+1)/2^k)-floor(n/2^k)). - Benoit Cloitre, Jun 03 2003
Another g.f.: Sum_{k>=0} x^(2^k)/(1+(-1)^k*x^(2^k)). - Ralf Stephan, Jun 13 2003
a(2*n) = 1-a(n), a(2*n+1) = 1. - Ralf Stephan, Jun 13 2003
a(n) = parity of A033485(n). - Philippe Deléham, Aug 13 2003
Equals A088172 mod 2, where A088172 = 1, 2, 3, 7, 13, 26, 53, 106, 211, 422, 845, ... (first differences of A019300). - Gary W. Adamson, Sep 21 2003
a(n) = a(n-1) - (-1)^n*a(floor(n/2)). - Benoit Cloitre, Dec 02 2003
a(1) = 1 and a(n) = abs(a(n-1) - a(floor(n/2))). - Benoit Cloitre, Dec 02 2003
a(n) = 1 - A096268(n+1); A050292 gives partial sums. - Reinhard Zumkeller, Aug 16 2006
Multiplicative with a(2^k) = 1 - (k mod 2), a(p^k) = 1, p > 2. Dirichlet g.f.: Product_{n = 4 or an odd prime} (1/(1-1/n^s)). - Christian G. Bower, May 18 2005
a(-n) = a(n). a(0)=0. - Michael Somos, Sep 04 2006
Dirichlet g.f.: zeta(s)*2^s/(2^s+1). - Ralf Stephan, Jun 17 2007
a(n+1) = a(n) XOR a(ceiling(n/2)), a(1) = 1. - Reinhard Zumkeller, Jun 11 2009
Let D(x) be the generating function, then D(x) + D(x^2) == x/(1-x). - Joerg Arndt, May 11 2010
a(n) = A010060(n) XOR A010060(n+1); a(A079523(n)) = 0; a(A121539(n)) = 1. - Reinhard Zumkeller, Mar 01 2012
a((2*n-1)*2^p) = (p+1) mod 2, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 07 2013
a(n) = A000035(A001511(n)). - Omar E. Pol, Oct 29 2013
a(n) = 2-A056832(n) = (5-A089608(n))/4. - Antti Karttunen, Sep 11 2017, after Benoit Cloitre
For n >= 0, a(n+1) = M(2n) mod 2 where M(n) is the Motzkin number A001006 (see Deutsch and Sagan 2006 link). - David Callan, Oct 02 2018
a(n) = A038712(n) mod 3. - Kevin Ryde, Jul 11 2019
Given any n in the form (k * 2^m, k odd), extract k and m. Categorize the results into two outcomes of (k, m, even or odd). If (k, m) is (odd, even) substitute 1. If (odd, odd), denote the result 0. Example: 5 = (5 * 2^0), (odd, even, = 1). (6 = 3 * 2^1), (odd, odd, = 0). - Gary W. Adamson, Jun 23 2021

Extensions

Alternative description added to the name by Antti Karttunen, Sep 11 2017

A373220 Expansion of Product_{i>=1, j>=0} (1 + x^(i * 6^j)).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 6, 7, 10, 12, 15, 20, 24, 29, 37, 44, 53, 67, 79, 94, 115, 135, 160, 193, 226, 265, 315, 367, 428, 505, 585, 678, 792, 913, 1054, 1225, 1406, 1614, 1862, 2129, 2436, 2797, 3187, 3630, 4147, 4709, 5347, 6084, 6887, 7793, 8832, 9968, 11247, 12706, 14301, 16089, 18116, 20337
Offset: 0

Views

Author

Seiichi Manyama, May 28 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=60, x='x+O('x^N)); Vec(prod(k=1, N, (1+x^k)^(valuation(k, 6)+1)))

Formula

G.f.: Product_{k>=1} (1 + x^k)^A373216(k).
Let A(x) be the g.f. of this sequence, and B(x) be the g.f. of A000009, then B(x) = A(x)/A(x^6).

A373221 Expansion of Product_{i>=1, j>=0} (1 + x^(i * 7^j)).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 9, 12, 14, 18, 22, 28, 34, 41, 50, 60, 72, 86, 105, 124, 146, 174, 204, 240, 282, 332, 386, 450, 524, 606, 703, 812, 940, 1082, 1243, 1428, 1636, 1873, 2140, 2448, 2788, 3172, 3610, 4096, 4646, 5264, 5963, 6737, 7607, 8584, 9668, 10887, 12244, 13765, 15451, 17328
Offset: 0

Views

Author

Seiichi Manyama, May 28 2024

Keywords

Comments

This sequence is different from A093950. The first difference occurs at a(50) = 6737, whereas A093950(50) = 6736.

Crossrefs

Programs

  • PARI
    my(N=60, x='x+O('x^N)); Vec(prod(k=1, N, (1+x^k)^(valuation(k, 7)+1)))

Formula

G.f.: Product_{k>=1} (1 + x^k)^A373217(k).
Let A(x) be the g.f. of this sequence, and B(x) be the g.f. of A000009, then B(x) = A(x)/A(x^7).

A373219 Expansion of Product_{i>=1, j>=0} (1 + x^(i * 5^j)).

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 6, 8, 10, 14, 17, 21, 26, 32, 42, 50, 60, 74, 88, 109, 130, 154, 184, 218, 263, 309, 363, 428, 500, 593, 690, 802, 936, 1084, 1266, 1463, 1687, 1948, 2242, 2590, 2970, 3403, 3900, 4456, 5107, 5820, 6626, 7546, 8572, 9755, 11059, 12523, 14180, 16028, 18133, 20455, 23056, 25978
Offset: 0

Views

Author

Seiichi Manyama, May 28 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=60, x='x+O('x^N)); Vec(prod(k=1, N, (1+x^k)^(valuation(k, 5)+1)))

Formula

G.f.: Product_{k>=1} (1 + x^k)^A055457(k).
Let A(x) be the g.f. of this sequence, and B(x) be the g.f. of A000009, then B(x) = A(x)/A(x^5).

A174067 Triangle, row sums = A000041 starting (1, 2, 3, 5, 7, ...); derived from finite differences of p(x) = A(x)*A(x^2) = B(x)*B(x^3) = C(x)*C(x^4) = ...

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 3, 1, 0, 1, 4, 1, 1, 0, 1, 5, 2, 2, 1, 0, 1, 7, 2, 3, 1, 1, 0, 1, 9, 4, 3, 3, 1, 1, 0, 1, 12, 5, 5, 3, 3, 0, 1, 0, 1, 15, 8, 6, 5, 3, 2, 1, 1, 0, 1, 19, 10, 9, 6, 5, 2, 2, 1, 1, 0, 1, 25, 13, 12, 10, 5, 5, 2, 2, 1, 1, 0, 1, 31, 17, 16, 12, 9, 5, 4, 2, 2, 1, 1, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 06 2010

Keywords

Comments

Row sums = A000041 starting with offset 1: (1, 2, 3, 5, 7, 11, ...).

Examples

			First few rows of the array:
  1, 1, 1, 2, 3, 4,  5,  7,  9, 12, 15, 19, ... = A174065
  1, 1, 2, 2, 4, 5,  7,  9, 13, 17, 23, 29, ... = A174068
  1, 1, 2, 3, 4, 6,  9, 12, 16, 22, 29, 38, ... satisfies p(x) = C(x)*C(x^4)
  1, 1, 2, 3, 5, 6, 10, 13, 19, 25, 34, 44, ... analogous for k=5
  1, 1, 2, 3, 5, 7, 10, 14, 20, 28, 37, 49, ..................k=6
  1, 1, 2, 3, 5, 7, 11, 14, 21, 28, 39, 51, ..................k=7
  1, 1, 2, 3, 5, 7, 11, 15, 21, 29, 40, 53, ..................k=8
  1, 1, 2, 3, 5, 7, 11, 15, 22, 29, 41, 54, ..................k=9
  1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 41, 55, ..................k=10
  ...
Finally, take finite differences from the top, deleting the first 1, to obtain triangle A174067:
   1;
   1,  1;
   2,  0,  1;
   3,  1,  0,  1;
   4,  1,  1,  0,  1;
   5,  2,  2,  1,  0,  1;
   7,  2,  3,  1,  1,  0,  1;
   9,  4,  3,  3,  1,  1,  0,  1;
  12,  5,  5,  3,  3,  0,  1,  0,  1;
  15,  8,  6,  5,  3,  2,  1,  1,  0,  1;
  19, 10,  9,  6,  5,  2,  2,  1,  1,  0,  1;
  25, 13, 12, 10,  5,  5,  2,  2,  1,  1,  0,  1;
  31, 17, 16, 12,  9,  5,  4,  2,  2,  1,  1,  0,  1;
  38, 24, 20, 18, 11,  8,  5,  4,  2,  2,  1,  1,  0,  1;
  ...
		

Crossrefs

Formula

Given an array of rows satisfying p(x) = A(x)*A(x^2) = row 1 = A174065; row = 2 A174068 satisfying p(x) = B(x)*B(x^3); row 3 satisfies p(x) = C(x)*C(x^4), ... and so on; take finite differences from the top, becoming rows of triangle A174067.

A327726 Expansion of Product_{i>=1, j>=0} (1 + x^(i * 3^j)).

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 7, 8, 10, 17, 20, 24, 36, 42, 52, 72, 85, 103, 139, 164, 197, 256, 301, 361, 456, 536, 637, 794, 930, 1098, 1347, 1571, 1848, 2235, 2600, 3042, 3646, 4228, 4922, 5845, 6754, 7835, 9229, 10633, 12284, 14382, 16519, 19013, 22127, 25339, 29073
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 23 2019

Keywords

Comments

Weigh transform of A051064.

Crossrefs

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[Product[(1 + x^k)^IntegerExponent[3 k, 3], {k, 1, nmax}], {x, 0, nmax}], x]
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[(-1)^(k/d + 1) d IntegerExponent[3 d, 3], {d, Divisors[k]}] a[n - k], {k, 1, n}]/n]; Table[a[n], {n, 0, 50}]
  • PARI
    seq(n)={Vec(prod(k=1, n, (1 + x^k + O(x*x^n))^(1+valuation(k, 3))))} \\ Andrew Howroyd, Sep 23 2019

Formula

G.f.: Product_{k>=1} (1 + x^k)^A051064(k).
Let A(x) be the g.f. of this sequence, and B(x) be the g.f. of A000009, then B(x) = A(x)/A(x^3). - Seiichi Manyama, May 31 2024

A373295 Expansion of 1/Product_{k>=1} (1 - x^k)^(valuation(k,4) + 1).

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 13, 18, 29, 39, 57, 77, 112, 148, 205, 271, 373, 485, 649, 841, 1116, 1431, 1865, 2379, 3080, 3896, 4979, 6268, 7961, 9953, 12524, 15585, 19505, 24135, 29984, 36943, 45678, 56007, 68841, 84080, 102912, 125164, 152449, 184756, 224184, 270691, 327094, 393675
Offset: 0

Views

Author

Seiichi Manyama, May 31 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=50, x='x+O('x^N)); Vec(1/prod(k=1, N, (1-x^k)^(valuation(k, 4)+1)))

Formula

G.f.: A(x) = 1/Product_{i>=1, j>=0} (1 - x^(i * 4^j)).
Let A(x) be the g.f. of this sequence, and P(x) be the g.f. of A000041, then P(x) = A(x)/A(x^4).
Showing 1-10 of 11 results. Next