cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A354798 Indices of terms in A354169 that are not powers of 2.

This page as a plain text file.
%I A354798 #34 Nov 29 2023 13:08:17
%S A354798 0,5,9,13,15,19,21,25,29,31,33,37,41,43,45,49,53,55,59,61,65,67,69,73,
%T A354798 77,79,83,85,89,91,93,97,101,103,107,109,113,115,119,121,125,127,131,
%U A354798 133,137,139,141,145,149,151,155,157,161,163,167,169,173,175,179
%N A354798 Indices of terms in A354169 that are not powers of 2.
%H A354798 Rémy Sigrist, <a href="/A354798/b354798.txt">Table of n, a(n) for n = 1..10000</a>
%H A354798 Michael De Vlieger, Thomas Scheuerle, Rémy Sigrist, N. J. A. Sloane, and Walter Trump, <a href="http://arxiv.org/abs/2209.04108">The Binary Two-Up Sequence</a>, arXiv:2209.04108 [math.CO] [math.CO], Sep 11 2022.
%H A354798 Rémy Sigrist, <a href="/A354798/a354798.gp.txt">PARI program</a>
%F A354798 Conjecture from _N. J. A. Sloane_, Jul 15 2022: (Start)
%F A354798 The following is a conjectured explicit formula for a(n).
%F A354798 Define the "fence posts" by F(0) = 1, F(2i+1) = 2^(i+4) - 3 for i >= 0, F(2i) = 3*2^(i+2) - 3 for i >= 1.
%F A354798 The F(i) sequence begins 1, 13, 21, 29, 45, 61, 93, 125, 189, 253, 381, ... (cf. A136252 or A354788)
%F A354798 The value of a(n) at n = F(i) is V(i) = 0 if i = 0, V(i) = 3*F(i)+2 if i >= 1.
%F A354798 The V(i) sequence begins 0, 41, 65, 89, 137, 185, 281, 377, 569, 761, ... (cf. A354789).
%F A354798 The first 12 terms of the sequence are irregular, so we simply define a(n) for F(0) = 1 <= n <= 12 to be the n-th term of
%F A354798   [0, 5, 9, 13, 15, 19, 21, 25, 29, 31, 33, 37]
%F A354798 Assume now that n >= F(1) = 13, and define i and j by F(i) <= n < F(i+1), n = F(i) + j.
%F A354798 Then we conjecture that a(n) = V(i) + f(j) where f(0) .. f(3) are 0,2,4,8, and for j >= 4, f(j) = 3*j if j is even, f(j) = 3*j-1 if j is odd.
%F A354798 The f(i), i >= 0, sequence is independent of n (to find a(n) we use only an initial segment of f(n)), and begins:
%F A354798 0, 2, 4, 8, 12, 14, 18, 20, 24, 26, 30, 32, 36, 38, 42, 44, 48, 50, 54, 56, ...
%F A354798 The conjecture has been checked for the first 5000 terms.
%F A354798 (End)
%F A354798 The conjecture is now known to be true. See De Vlieger et al. (2022). - _N. J. A. Sloane_, Aug 29 2022
%o A354798 (PARI) See Links section.
%o A354798 (Python)
%o A354798 from itertools import count, islice
%o A354798 from collections import deque
%o A354798 from functools import reduce
%o A354798 from operator import or_
%o A354798 def A354798_gen(): # generator of terms
%o A354798     aset, aqueue, b, f, i = {0,1,2}, deque([2]), 2, False, 2
%o A354798     yield 0
%o A354798     while True:
%o A354798         for k in count(1):
%o A354798             m, j, j2, r, s = 0, 0, 1, b, k
%o A354798             while r > 0:
%o A354798                 r, q = divmod(r,2)
%o A354798                 if not q:
%o A354798                     s, y = divmod(s,2)
%o A354798                     m += y*j2
%o A354798                 j += 1
%o A354798                 j2 *= 2
%o A354798             if s > 0:
%o A354798                 m += s*2**b.bit_length()
%o A354798             if m not in aset:
%o A354798                 i += 1
%o A354798                 if m.bit_count() > 1:
%o A354798                     yield i
%o A354798                 aset.add(m)
%o A354798                 aqueue.append(m)
%o A354798                 if f: aqueue.popleft()
%o A354798                 b = reduce(or_,aqueue)
%o A354798                 f = not f
%o A354798                 break
%o A354798 A354798_list = list(islice(A354798_gen(),30)) # _Chai Wah Wu_, Jun 06 2022
%Y A354798 Cf. A057716, A136252, A354169, A354680 (corresponding terms), A354788, A354798.
%K A354798 nonn,base
%O A354798 1,2
%A A354798 _Rémy Sigrist_ and _N. J. A. Sloane_, Jun 06 2022