A053738 If k is in sequence then 2*k and 2*k+1 are not (and 1 is in the sequence); numbers with an odd number of digits in binary.
1, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Manfred Madritsch and Stephan Wagner, A central limit theorem for integer partitions, Monatsh. Math., Vol. 161, No. 1 (2010), pp. 85-114; alternative link. Section 4.3.
Programs
-
Maple
seq(seq(i,i=4^k..2*4^k-1),k=0..5); # Robert Israel, Dec 28 2016
-
Mathematica
Select[Range[110],OddQ[IntegerLength[#,2]]&] (* Harvey P. Dale, Sep 29 2012 *)
-
PARI
isok(n, b=4) = digits(n, b)[1] == 1; \\ Michel Marcus, Dec 05 2013
-
PARI
a(n) = n + 1<
Kevin Ryde, Mar 27 2021
Formula
G.f.: x/(1-x)^2 + Sum_{k>=1} 2^(2k-1)*x^((4^k+2)/3)/(1-x). - Robert Israel, Dec 28 2016
Comments