login
Numbers n such that n-th row in Pascal triangle contains an even number, i.e., A048967(n) > 0.
25

%I #48 Jun 30 2024 22:09:21

%S 2,4,5,6,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,

%T 30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,

%U 54,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77

%N Numbers n such that n-th row in Pascal triangle contains an even number, i.e., A048967(n) > 0.

%C Numbers n such that binary representation contains the bit string "10". Union of A043569 and A101082. - _Rick L. Shepherd_, Nov 29 2004

%C The asymptotic density of this sequence is 1 (Burns, 2016). - _Amiram Eldar_, Jan 26 2021

%H Reinhard Zumkeller, <a href="/A062289/b062289.txt">Table of n, a(n) for n = 1..10001</a>

%H Rob Burns, <a href="https://arxiv.org/abs/1611.03705">Asymptotic density of Catalan numbers modulo 3 and powers of 2</a>, arXiv:1611.03705 [math.NT], 2016.

%H Oliver Kullmann and Xishun Zhao, <a href="https://doi.org/10.1007/978-3-642-21581-0_5">On variables with few occurrences in conjunctive normal forms</a>, in: K. A. Sakallah and L. Simon (eds), International Conference on Theory and Applications of Satisfiability Testing, Springer, Berlin, Heidelberg, 2011, pp. 33-46; <a href="https://arxiv.org/abs/1010.5756">arXiv preprint</a>, arXiv:1010.5756 [cs.DM], 2010-2011.

%H Oliver Kullmann and Xishun Zhao, <a href="http://arxiv.org/abs/1505.02318">Parameters for minimal unsatisfiability: Smarandache primitive numbers and full clauses</a>, arXiv preprint, arXiv:1505.02318 [cs.DM], 2015.

%F a(n) = A057716(n+1) - 1.

%F a(n) = 2 if n=1, otherwise max{min{2*i, a(n-i+1) + i}: 1 < i <= n}.

%F A036987(a(n)) = 0. - _Reinhard Zumkeller_, Mar 06 2012

%F A007461(a(n)) mod 2 = 0. - _Reinhard Zumkeller_, Apr 02 2012

%F A102370(n) = A105027(a(n)). - _Reinhard Zumkeller_, Jul 21 2012

%F A261461(a(n)) = A261922(a(n)). - _Reinhard Zumkeller_, Sep 17 2015

%t ok[n_] := MatchQ[ IntegerDigits[n, 2], {___, 1, 0, ___}]; Select[ Range[100], ok] (* _Jean-François Alcover_, Dec 12 2011, after _Rick L. Shepherd_ *)

%o (Haskell)

%o a062289 n = a062289_list !! (n-1)

%o a062289_list = 2 : g 2 where

%o g n = nM n : g (n+1)

%o nM k = maximum $ map (\i -> i + min i (a062289 $ k-i+1)) [2..k]

%o -- Cf. link [Oliver Kullmann, Xishun Zhao], Def. 3.1, page 3.

%o -- _Reinhard Zumkeller_, Feb 21 2012, Dec 31 2010

%o (PARI) isok(m) = #select(x->((x%2)==0), vector(m+1, k, binomial(m, k-1))); \\ _Michel Marcus_, Jan 26 2021

%o (Python)

%o def A062289(n): return n+(m:=n.bit_length())-(not n>=(1<<m)-m) # _Chai Wah Wu_, Jun 30 2024

%Y Complement of A000225, so these might be called non-Mersenne numbers.

%Y A132782 is a subsequence.

%Y Cf. A048967, A057716, A043569, A101082.

%Y Cf. A007461, A036987, A102370, A105027.

%Y Cf. A261461, A261922.

%K nonn

%O 1,1

%A Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 02 2001

%E More terms from _Rick L. Shepherd_, Nov 29 2004