A247648
Numbers whose binary expansion begins and ends with 1 and does not contain two adjacent zeros.
Original entry on oeis.org
1, 3, 5, 7, 11, 13, 15, 21, 23, 27, 29, 31, 43, 45, 47, 53, 55, 59, 61, 63, 85, 87, 91, 93, 95, 107, 109, 111, 117, 119, 123, 125, 127, 171, 173, 175, 181, 183, 187, 189, 191, 213, 215, 219, 221, 223, 235, 237, 239, 245, 247, 251, 253
Offset: 1
109 is in the sequence because its binary expansion is 1101101.
- Reinhard Zumkeller, Table of n, a(n) for n = 1..121392 (all terms < 2^24; first 1000 terms from Chai Wah Wu)
- Andreas M. Hinz and Paul K. Stockmeyer, Discovering Fibonacci Numbers, Fibonacci Words, and a Fibonacci Fractal in the Tower of Hanoi, The Fibonacci Quarterly (2019) Vol. 57, No. 5, 72-83.
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
- Stefan Witzel, On panel-regular ~A2 lattices, Geom. Dedicata 191, 85-135 (2017).
-
import Data.Set (singleton, deleteFindMin, insert)
a247648 n = a247648_list !! (n-1)
a247648_list = f $ singleton 1 where
f s = x : f (insert (4 * x + 1) $ insert (2 * x + 1) s')
where (x, s') = deleteFindMin s
-- Reinhard Zumkeller, Sep 25 2014
-
vitopart := proc (n) local L, i, j, N, p, t: N := 2*n: L := ListTools:-Reverse(convert(N, base, 2)): j := 0: for i to nops(L) do if L[i] = 0 then j := j+1: p[j] := numboccur(L[1 .. i], 1) end if end do: sort([seq(p[t], t = 1 .. j)], `>=`) end proc: a := proc (n) if n = 1 then 1 elif `mod`(n, 2) = 0 then a((1/2)*n) elif `mod`(n, 2) = 1 and `mod`((1/2)*n-1/2, 2) = 0 then a((1/2)*n-1/2)+1 else a((1/2)*n-1/2) end if end proc: A := {}: for n to 254 do if a(n) = nops(vitopart(n)) then A := `union`(A, {n}) else end if end do: A; # program is based on my comment; the command vitopart(n) yields the integer partition having viabin number n. # Emeric Deutsch, Aug 29 2017
-
Select[Range@ 256, And[First@ # == Last@ # == 1, NoneTrue[Map[Length, Select[Split[#], First@ # == 0 &]], # > 1 &]] &@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Aug 29 2017 *)
-
isok(k) = if (k%2, my(b=binary(k)); #select(x->(x==0), vector(#b-1, k, b[k]+b[k+1])) == 0); \\ Michel Marcus, Jun 15 2024
-
A247648_list = [n for n in range(1,10**5) if n % 2 and not '00' in bin(n)]
# Chai Wah Wu, Sep 25 2014
A247649
Number of terms in expansion of f^n mod 2, where f = 1/x^2 + 1/x + 1 + x + x^2 mod 2.
Original entry on oeis.org
1, 5, 5, 7, 5, 17, 7, 19, 5, 25, 17, 19, 7, 31, 19, 25, 5, 25, 25, 35, 17, 61, 19, 71, 7, 35, 31, 41, 19, 71, 25, 77, 5, 25, 25, 35, 25, 85, 35, 95, 17, 85, 61, 71, 19, 91, 71, 77, 7, 35, 35, 49, 31, 107, 41, 121, 19, 95, 71, 85, 25, 113, 77, 103
Offset: 0
The first few generations are:
..........X..........
........XXXXX........
......X.X.X.X.X......
....XX..X.X.X..XX.... (f^3)
..X...X...X...X...X..
XXXX.XXX.XXX.XXX.XXXX
...
f^3 mod 2 = x^6 + x^5 + x^2 + 1/x^2 + 1/x^5 + 1/x^6 + 1 has 7 terms, so a(3) = 7.
From _Omar E. Pol_, Mar 02 2015: (Start)
Also, written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
5;
5, 7;
5,17, 7,19;
5,25,17,19, 7,31,19,25;
5,25,25,35,17,61,19,71, 7,35,31,41,19,71,25,77;
5,25,25,35,25,85,35,95,17,85,61,71,19,91,71,77,7,35,35,49,31,107,41,121,19, ...
(End)
It follows from the Generalized Run Length Transform result mentioned in the comments that in each row the first quarter of the terms (and no more) are equal to 5 times the beginning of the sequence itself. It cannot be said that the rows converge (in any meaningful sense) to five times the sequence. - _N. J. A. Sloane_, Mar 03 2015
-
import sympy
from functools import reduce
from operator import mul
x = sympy.symbols('x')
f = 1/x**2+1/x+1+x+x**2
A247649_list, g = [1], 1
for n in range(1,1001):
s = [int(d,2) for d in bin(n)[2:].split('00') if d != '']
g = (g*f).expand(modulus=2)
if len(s) == 1:
A247649_list.append(g.subs(x,1))
else:
A247649_list.append(reduce(mul,(A247649_list[d] for d in s)))
# Chai Wah Wu, Sep 25 2014
A247647
Binary numbers that begin and end with 1 and do not contain two adjacent zeros.
Original entry on oeis.org
1, 11, 101, 111, 1011, 1101, 1111, 10101, 10111, 11011, 11101, 11111, 101011, 101101, 101111, 110101, 110111, 111011, 111101, 111111, 1010101, 1010111, 1011011, 1011101, 1011111, 1101011, 1101101, 1101111, 1110101, 1110111, 1111011, 1111101, 1111111, 10101011, 10101101, 10101111, 10110101, 10110111, 10111011, 10111101
Offset: 1
See
A247648 for the decimal equivalents.
-
a247647 = a007088 . a247648 -- Reinhard Zumkeller, Sep 25 2014
-
With[{upto=500},Map[FromDigits,Select[IntegerString[Range[1,upto,2],2],StringFreeQ[#,"00"]&]]] (* Paolo Xausa, Dec 06 2023 *)
-
A247647_list = [int(bin(n)[2:]) for n in range(1,10**5) if n % 2 and not '00' in bin(n)]
# Chai Wah Wu, Sep 25 2014
Original entry on oeis.org
1, 5, 7, 19, 25, 77, 103, 307, 409, 1229, 1639, 4915, 6553, 19661, 26215, 78643, 104857, 314573, 419431, 1258291, 1677721, 5033165, 6710887, 20132659, 26843545, 80530637, 107374183, 322122547, 429496729, 1288490189, 1717986919, 5153960755
Offset: 0
-
LinearRecurrence[{0,3,0,4}, {1,5,7,19}, 40] (* Georg Fischer, Aug 18 2021 *)
Showing 1-4 of 4 results.
Comments