login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354774 For terms of A354169 that are the sum of two distinct powers of 2, the exponent of the larger power of 2. 7
1, 3, 4, 5, 6, 7, 9, 10, 4, 11, 13, 14, 6, 15, 17, 18, 19, 20, 21, 22, 5, 23, 25, 26, 27, 28, 29, 30, 7, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 23, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 31, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Taking first differences, then applying the RUNS transform gives [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 13, 1, 1, 1, 13, 1, 1, 1, 29, 1, 1, 1, 29, 1, 1, 1, 61, 1, 1, 1, 61, 1, 1, 1, 125, 1, 1, 1, 125, 1, 1, 1, 253, 1, 1, 1, 253, 1, 1, 1, 509, ...].
If the initial 4 is changed to a 1, this has an obvious regular structure, which could then be analyzed to give a conjectured generating function, just as was done for A354767. See link below.
A more precise conjecture is given in the Formula section.
LINKS
Michael De Vlieger, Thomas Scheuerle, Rémy Sigrist, N. J. A. Sloane, and Walter Trump, The Binary Two-Up Sequence, arXiv:2209.04108 [math.CO], Sep 11 2022.
Rémy Sigrist, C++ program
FORMULA
Conjecture from N. J. A. Sloane, Jun 29 2022: (Start)
The following is a conjectured explicit formula for a(n). Basically a(n) = n+2, except that there are four types of n which have a different formula, and there are 6 exceptional values for small n.
Here is the formula, which agrees with the first 10000 terms.
(I) If n = 3*2^(k-1)-3, k >= 2 then a(n) = (n+1)/2, except a(3) = a(9) = 4 and a(21) = 5.
(II) If n = 2^(k+1)-3, k >= 1 then a(n) = (n+1)/2, except a(5) = a(13) = 6 and a(29) = 7.
(III) If n = 3*2^(k-1)-2, k >= 2 then a(n) = n+1.
(IV) If n = 2^(k+1)-2, k >= 1 then a(n) = n+1.
(V) Otherwise a(n) = n+2. (End)
The conjecture is now known to be true. See De Vlieger et al. (2022). - N. J. A. Sloane, Aug 29 2022
PROG
(C++) See Links section.
(Python)
from itertools import count, islice
from collections import deque
from functools import reduce
from operator import or_
def A354774_gen(): # generator of terms
aset, aqueue, b, f = {0, 1, 2}, deque([2]), 2, False
while True:
for k in count(1):
m, j, j2, r, s = 0, 0, 1, b, k
while r > 0:
r, q = divmod(r, 2)
if not q:
s, y = divmod(s, 2)
m += y*j2
j += 1
j2 *= 2
if s > 0:
m += s*2**b.bit_length()
if m not in aset:
if (s := bin(m)[3:]).count('1') == 1:
yield len(s)
aset.add(m)
aqueue.append(m)
if f: aqueue.popleft()
b = reduce(or_, aqueue)
f = not f
break
A354774_list = list(islice(A354774_gen(), 30)) # Chai Wah Wu, Jun 27 2022
CROSSREFS
Sequence in context: A014615 A144046 A210934 * A194276 A184336 A183300
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 26 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)