%I #33 Jan 31 2024 17:21:50
%S 2,4,5,8,9,11,16,17,19,23,32,33,35,39,47,64,65,67,71,79,95,128,129,
%T 131,135,143,159,191,256,257,259,263,271,287,319,383,512,513,515,519,
%U 527,543,575,639,767,1024,1025,1027,1031,1039,1055,1087,1151,1279,1535,2048
%N 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.
%C 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
%H Michael De Vlieger, <a href="/A099628/b099628.txt">Table of n, a(n) for n = 1..11175</a> (rows 2..150)
%H Barry Brent, <a href="https://arxiv.org/abs/2212.12515">On the constant terms of certain meromorphic modular forms for Hecke groups</a>, arXiv:2212.12515 [math.NT], 2022.
%H Barry Brent, <a href="https://doi.org/10.20944/preprints202306.1164.v6">On the Constant Terms of Certain Laurent Series</a>, Preprints (2023) 2023061164.
%H Michael De Vlieger, <a href="/A099628/a099628.png">Log log scatterplot of a(n)</a>, n = 1..1830.
%H Michael De Vlieger, <a href="/A099628/a099628_1.png">Bitmap showing the binary expansion of a(n)</a> n = 1..300 (24 rows), bits arranged from least to most significant from bottom, n increasing toward the right, where black = 1 and white = 0.
%F As triangle, T(n,k) = 2^(n+1) + 2^k - 1 = A099627(n+1, k).
%e As triangle, rows start
%e 2;
%e 4, 5;
%e 8, 9, 11;
%e 16, 17, 19, 23;
%e 32, 33, 35, 39, 47;
%e ...
%e 5 is in the sequence since 10!/(5!6!) = 42 is divisible by 2 but not 4;
%e 6 is not in the sequence since 12!/(6!7!) = 132 is divisible by 4;
%e 7 is not in the sequence since 14!/(7!8!) = 429 is not divisible by 2.
%e From _Michael De Vlieger_, Dec 28 2022: (Start)
%e Table showing the binary expansion of a(n) for n = 1..15, replacing 0 with "." to accentuate the pattern of bits:
%e n a(n) a(n)_2
%e ----------------
%e 1 2 1.
%e 2 4 1..
%e 3 5 1.1
%e 4 8 1...
%e 5 9 1..1
%e 6 11 1.11
%e 7 16 1....
%e 8 17 1...1
%e 9 19 1..11
%e 10 23 1.111
%e 11 32 1.....
%e 12 33 1....1
%e 13 35 1...11
%e 14 39 1..111
%e 15 47 1.1111 (End)
%t Select[Range[2048],IntegerQ[Log[2,BitAnd[ #+1,#-1]]]&] (* _Wouter Meeussen_, Nov 24 2007 *)
%t Table[2^(n + 1) + 2^k - 1, {n, 0, 10}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Dec 28 2022 *)
%t Select[Range[2100],Boole[Divisible[CatalanNumber[#],{2,4}]]=={1,0}&] (* _Harvey P. Dale_, Jan 31 2024 *)
%o (Magma) /* As triangle */ [[2^(n+1) + 2^k - 1: k in [0..n]]: n in [0.. 15]]; // _Vincenzo Librandi_, Jul 27 2017
%o (Python)
%o from itertools import count, islice
%o def A099628_gen(): # generator of terms
%o m = 1
%o for n in count(1):
%o m *= 2
%o r, k = m-1,1
%o for _ in range(n):
%o yield r+k
%o k *= 2
%o A099628_list = list(islice(A099628_gen(),40)) # _Chai Wah Wu_, Nov 15 2022
%Y Cf. A000108, A048881, A099627.
%K easy,nonn,tabl
%O 1,1
%A _Henry Bottomley_, Oct 25 2004
%E Offset changed to 1 by _N. J. A. Sloane_, Jul 27 2017
|