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-5 of 5 results.

A110565 Results from a change in the rules leading to sequence A097357.

Original entry on oeis.org

1, 3, 4, 14, 21, 53, 69, 237, 321, 867, 1044, 3638, 5441, 13667, 17684, 60854, 81921, 221187, 266244, 931854, 1397781, 3495477, 4542789, 15555437, 21053441
Offset: 1

Views

Author

Creighton Dement, Sep 12 2005

Keywords

Comments

Let b_n(i) be defined as for sequence A097357. Then A097357(n) = sum(i=0...infty)b_n(i) = sum(i=1...n)b_n(i). We have: Stage 1: (1,0,0,0,0,0,0,0,0,0,0,0,0) = b_1 (disregarding initial 0); Stage 2: (1,1,0,0,0,0,0,0,0,0,0,0,0,) = b_2 (disregarding initial 0); Stage 3: (0,0,1,0,0,0,0,0,0,0,0,0,0,) = b_3 (disregarding initial 0); Stage 4: (0,1,1,1,0,0,0,0,0,0,0,0,0,) = b_4 (disregarding initial 0); Stage 5: (1,0,1,0,1,0,0,0,0,0,0,0,0,) = b_5 (disregarding initial 0); Stage 6: (1,0,1,0,1,1,0,0,0,0,0,0,0,) Stage 7: (1,0,1,0,0,0,1,0,0,0,0,0,0,) Stage 8: (1,0,1,1,0,1,1,1,0,0,0,0,0,) a(n) is defined as the number which results from interpreting the sequence b_n as a binary string read backwards from the first nonzero term.

Examples

			a(6) = 53 since b_6 = (1,0,1,0,1,1,0,0,0,0,0,0,0) and 110101 written in base 10 is 53.
		

Crossrefs

Cf. A097357.

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

A026300 Motzkin triangle, T, read by rows; T(0,0) = T(1,0) = T(1,1) = 1; for n >= 2, T(n,0) = 1, T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k = 1,2,...,n-1 and T(n,n) = T(n-1,n-2) + T(n-1,n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 4, 1, 4, 9, 12, 9, 1, 5, 14, 25, 30, 21, 1, 6, 20, 44, 69, 76, 51, 1, 7, 27, 70, 133, 189, 196, 127, 1, 8, 35, 104, 230, 392, 518, 512, 323, 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835, 1, 10, 54, 200, 560, 1242, 2235, 3288, 3915, 3610, 2188
Offset: 0

Views

Author

Keywords

Comments

Right-hand columns have g.f. M^k, where M is g.f. of Motzkin numbers.
Consider a semi-infinite chessboard with squares labeled (n,k), ranks or rows n >= 0, files or columns k >= 0; number of king-paths of length n from (0,0) to (n,k), 0 <= k <= n, is T(n,n-k). - Harrie Grondijs, May 27 2005. Cf. A114929, A111808, A114972.

Examples

			Triangle starts:
  [0] 1;
  [1] 1, 1;
  [2] 1, 2,  2;
  [3] 1, 3,  5,   4;
  [4] 1, 4,  9,  12,   9;
  [5] 1, 5, 14,  25,  30,  21;
  [6] 1, 6, 20,  44,  69,  76,   51;
  [7] 1, 7, 27,  70, 133, 189,  196,  127;
  [8] 1, 8, 35, 104, 230, 392,  518,  512,  323;
  [9] 1, 9, 44, 147, 369, 726, 1140, 1422, 1353, 835.
		

References

  • Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.
  • A. Nkwanta, Lattice paths and RNA secondary structures, in African Americans in Mathematics, ed. N. Dean, Amer. Math. Soc., 1997, pp. 137-147.

Crossrefs

Reflected version is in A064189.
Row sums are in A005773.
T(n,n) are Motzkin numbers A001006.
Other columns of T include A002026, A005322, A005323.

Programs

  • Haskell
    a026300 n k = a026300_tabl !! n !! k
    a026300_row n = a026300_tabl !! n
    a026300_tabl = iterate (\row -> zipWith (+) ([0,0] ++ row) $
                                    zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Oct 09 2013
    
  • Maple
    A026300 := proc(n,k)
       add(binomial(n,2*i+n-k)*(binomial(2*i+n-k,i) -binomial(2*i+n-k,i-1)), i=0..floor(k/2));
    end proc: # R. J. Mathar, Jun 30 2013
  • Mathematica
    t[n_, k_] := Sum[ Binomial[n, 2i + n - k] (Binomial[2i + n - k, i] - Binomial[2i + n - k, i - 1]), {i, 0, Floor[k/2]}]; Table[ t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Jan 03 2011 *)
    t[, 0] = 1; t[n, 1] := n; t[n_, k_] /; k>n || k<0 = 0; t[n_, n_] := t[n, n] = t[n-1, n-2]+t[n-1, n-1]; t[n_, k_] := t[n, k] = t[n-1, k-2]+t[n-1, k-1]+t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 18 2014 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[1/2 - k/2, -k/2, n - k + 2, 4];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Mar 21 2018 *)
  • PARI
    tabl(nn) = {for (n=0, nn, for (k=0, n, print1(sum(i=0, k\2, binomial(n, 2*i+n-k)*(binomial(2*i+n-k, i)-binomial(2*i+n-k, i-1))), ", ");); print(););} \\ Michel Marcus, Jul 25 2015

Formula

T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2i+n-k)*(binomial(2i+n-k, i) - binomial(2i+n-k, i-1)). - Herbert Kociemba, May 27 2004
T(n,k) = A027907(n,k) - A027907(n,k-2), k<=n.
Sum_{k=0..n} (-1)^k*T(n,k) = A099323(n+1). - Philippe Deléham, Mar 19 2007
Sum_{k=0..n} (T(n,k) mod 2) = A097357(n+1). - Philippe Deléham, Apr 28 2007
Sum_{k=0..n} T(n,k)*x^(n-k) = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -1, 0, 1, 2 respectively. - Philippe Deléham, Nov 28 2009
T(n,k) = binomial(n, k)*hypergeom([1/2 - k/2, -k/2], [n - k + 2], 4). - Peter Luschny, Mar 21 2018
T(n,k) = [t^(n-k)] [x^n] 2/(1 - (2*t + 1)*x + sqrt((1 + x)*(1 - 3*x))). - Peter Luschny, Oct 24 2018
The n-th row polynomial R(n,x) equals the n-th degree Taylor polynomial of the function (1 - x^2)*(1 + x + x^2)^n expanded about the point x = 0. - Peter Bala, Feb 26 2023

Extensions

Corrected and edited by Johannes W. Meijer, Oct 05 2010

A044446 Numbers k such that string 1,0 occurs in the base-4 representation of k but not of k+1.

Original entry on oeis.org

4, 20, 36, 52, 84, 100, 116, 132, 148, 164, 180, 196, 212, 228, 244, 340, 356, 372, 388, 404, 420, 436, 452, 468, 484, 500, 516, 532, 548, 564, 596, 612, 628, 644, 660, 676, 692, 708, 724, 740, 756, 772, 788, 804, 820, 852, 868, 884, 900, 916, 932, 948, 964
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def has10(k): s = "".join(map(str, digits(k, 4)[1:])); return "10" in s
    def ok(n): return has10(n) and not has10(n+1)
    print(list(filter(ok, range(965)))) # Michael S. Branicky, Apr 20 2021

Extensions

a(5) = 68 removed by Georg Fischer, Jun 27 2019

A128810 Triangle formed by reading triangle A064189 mod 2 .

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Apr 09 2007

Keywords

Comments

Also triangle formed by reading triangles A091965, A108149, A110877, A125906, A126954 mod 2 .

Examples

			Triangle begins:
1;
1, 1;
0, 0, 1;
0, 1, 1, 1;
1, 0, 1, 0, 1;
1, 0, 1, 0, 1, 1;
1, 0, 1, 0, 0, 0, 1;
1, 0, 1, 1, 0, 1, 1, 1;
1, 0, 0, 0, 0, 0, 1, 0, 1;
1, 1, 0, 0, 0, 1, 1, 0, 1, 1;
0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 ;...
		

Formula

Sum_{k, 0<=k<=n}T(n,k)*x^k=A039963(n), A097357(n+1), A110565(n+1) for x=0,1,2 respectively . T(n,k)= (T(n-1,k-1)+T(n-1,k)+T(n-1,k+1)) mod 2, T(0,0)=1, T(n,k)=0 if k<0 or if k>n .
Showing 1-5 of 5 results.