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

A081706 Numbers n such that binary representation ends either in an odd number of ones followed by one zero or in an even number of ones.

Original entry on oeis.org

2, 3, 10, 11, 14, 15, 18, 19, 26, 27, 34, 35, 42, 43, 46, 47, 50, 51, 58, 59, 62, 63, 66, 67, 74, 75, 78, 79, 82, 83, 90, 91, 98, 99, 106, 107, 110, 111, 114, 115, 122, 123, 130, 131, 138, 139, 142, 143, 146, 147, 154, 155, 162, 163, 170, 171, 174, 175, 178, 179, 186
Offset: 1

Views

Author

Emeric Deutsch and Bruce E. Sagan, Apr 02 2003

Keywords

Comments

Values of k such that the Motzkin number A001006(k) is even. Values of k such that the number of restricted hexagonal polyominoes with k+1 cells (A002212) is even.
Or union of sequences {2*A079523(n)+k}, k=0,1. A generalization see in comment to A161639. - Vladimir Shevelev, Jun 15 2009
Or intersection of sequences A121539 and {A121539(n)-1}. A generalization see in comment to A161890. - Vladimir Shevelev, Jul 03 2009
Also numbers n for which A010060(n+2) = A010060(n). - Vladimir Shevelev, Jul 06 2009
The asymptotic density of this sequence is 1/3 (Rowland and Yassawi, 2015; Burns, 2016). - Amiram Eldar, Jan 30 2021
Numbers of the form 4^k*(2*n-1)-2 and 4^k*(2*n-1)-1 where n and k are positive integers. - Michael Somos, Oct 22 2021

Crossrefs

Programs

  • Mathematica
    (* m = MotzkinNumber *) m[0] = 1; m[n_] := m[n] = m[n - 1] + Sum[m[k]*m[n - 2 - k], {k, 0, n - 2}]; Select[Range[200], Mod[m[#], 2] == 0 &] (* Jean-François Alcover, Jul 10 2013 *)
    Select[Range[200], EvenQ@Hypergeometric2F1[3/2, -#, 3, 4]&] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    is(n)=valuation(bitor(n,1)+1,2)%2==0 \\ Charles R Greathouse IV, Mar 07 2013
    
  • Python
    from itertools import count, islice
    def A081706_gen(): # generator of terms
        for n in count(0):
            if (n&-n).bit_length()&1:
                m = n<<2
                yield m-2
                yield m-1
    A081706_list = list(islice(A081706_gen(),30)) # Chai Wah Wu, Jan 09 2023
    
  • Python
    def A081706(n):
        def f(x):
            c, s = (n+1>>1)+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+1>>1, f(n+1>>1)
        while m != k: m, k = k, f(k)
        return (m<<2)-1-(n&1) # Chai Wah Wu, Jan 29 2025

Formula

a(2n-1) = 2*A079523(n) = 4*A003159(n)-2; a(2n) = 4*A003159(n)-1.
Note that a(2n) = 1+a(2n-1).

A161674 Positions n such that A010060(n) + A010060(n+2) = 1.

Original entry on oeis.org

0, 1, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 44, 45, 48, 49, 52, 53, 54, 55, 56, 57, 60, 61, 64, 65, 68, 69, 70, 71, 72, 73, 76, 77, 80, 81, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 100, 101, 102, 103, 104
Offset: 1

Views

Author

Vladimir Shevelev, Jun 16 2009

Keywords

Comments

Locates patterns of the form 0x1 or 1x0 in the Thue-Morse sequence.
Complement to A081706. Also: union of sequences {2*A121539(n)+k}, k=0 or 1, generalized in A161673.
Also union of sequences {A079523(n)-k}, k=0 or 1. For a generalization see A161890. - Vladimir Shevelev, Jul 05 2009
The asymptotic density of this sequence is 2/3 (Rowland and Yassawi, 2015; Burns, 2016). - Amiram Eldar, Jan 30 2021

Crossrefs

Programs

Extensions

Extended by R. J. Mathar, Aug 28 2009

A161974 a(n) = number of equalities of the form A010060(n+k) = A010060(n), k=1,2,3.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jun 23 2009

Keywords

Comments

See comment to A161916. 3-a(n) is the number of equalities of kind A010060(n+k) = 1-A010060(n), k=1,2,3.

Crossrefs

Programs

Extensions

Missing a(24)=1 inserted by Georg Fischer, Jun 21 2024

A162311 Numbers such that A010060(n) = A010060(n+7).

Original entry on oeis.org

1, 3, 4, 5, 7, 10, 14, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 33, 35, 36, 37, 39, 42, 46, 49, 51, 52, 53, 55, 58, 62
Offset: 1

Views

Author

Vladimir Shevelev, Jul 01 2009

Keywords

Comments

Or union of intersection of A161673 and {A121539(n)-7} and intersection of A161639 and {A079523(n)-7}.
Conjecture: In every sequence of numbers n, such that A010060(n)=A010060(n+k), for fixed odd k, the odious (A000069) and evil (A001969) terms alternate. - Vladimir Shevelev, Jul 31 2009

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n - 1)/2]; Reap[For[n = 0, n <= 20000, n++, If[tm[n] == tm[n + 7], Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+7)%2 \\ Charles R Greathouse IV, Aug 20 2013
Showing 1-4 of 4 results.