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.

A099628 Numbers m where m-th Catalan number A000108(m) = binomial(2m,m)/(m+1) is divisible by 2 but not by 4, i.e., where A048881(m) = 1.

Original entry on oeis.org

2, 4, 5, 8, 9, 11, 16, 17, 19, 23, 32, 33, 35, 39, 47, 64, 65, 67, 71, 79, 95, 128, 129, 131, 135, 143, 159, 191, 256, 257, 259, 263, 271, 287, 319, 383, 512, 513, 515, 519, 527, 543, 575, 639, 767, 1024, 1025, 1027, 1031, 1039, 1055, 1087, 1151, 1279, 1535, 2048
Offset: 1

Views

Author

Henry Bottomley, Oct 25 2004

Keywords

Comments

Also, there is exactly one digit position in which both a(n)+1 and a(n)-1, written in binary, have a 1; i.e., the bitwise AND of a(n)-1 and a(n)+1 is 2^k, with k > 0. - Wouter Meeussen, Nov 24 2007

Examples

			As triangle, rows start
   2;
   4,  5;
   8,  9, 11;
  16, 17, 19, 23;
  32, 33, 35, 39, 47;
  ...
5 is in the sequence since 10!/(5!6!) = 42 is divisible by 2 but not 4;
6 is not in the sequence since 12!/(6!7!) = 132 is divisible by 4;
7 is not in the sequence since 14!/(7!8!) = 429 is not divisible by 2.
From _Michael De Vlieger_, Dec 28 2022: (Start)
Table showing the binary expansion of a(n) for n = 1..15, replacing 0 with "." to accentuate the pattern of bits:
   n  a(n)  a(n)_2
  ----------------
   1    2       1.
   2    4      1..
   3    5      1.1
   4    8     1...
   5    9     1..1
   6   11     1.11
   7   16    1....
   8   17    1...1
   9   19    1..11
  10   23    1.111
  11   32   1.....
  12   33   1....1
  13   35   1...11
  14   39   1..111
  15   47   1.1111 (End)
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[2^(n+1) + 2^k - 1: k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 27 2017
    
  • Mathematica
    Select[Range[2048],IntegerQ[Log[2,BitAnd[ #+1,#-1]]]&] (* Wouter Meeussen, Nov 24 2007 *)
    Table[2^(n + 1) + 2^k - 1, {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 28 2022 *)
    Select[Range[2100],Boole[Divisible[CatalanNumber[#],{2,4}]]=={1,0}&] (* Harvey P. Dale, Jan 31 2024 *)
  • Python
    from itertools import count, islice
    def A099628_gen(): # generator of terms
        m = 1
        for n in count(1):
            m *= 2
            r, k = m-1,1
            for _ in range(n):
                yield r+k
                k *= 2
    A099628_list = list(islice(A099628_gen(),40)) # Chai Wah Wu, Nov 15 2022

Formula

As triangle, T(n,k) = 2^(n+1) + 2^k - 1 = A099627(n+1, k).

Extensions

Offset changed to 1 by N. J. A. Sloane, Jul 27 2017