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.

Previous Showing 21-23 of 23 results.

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

Original entry on oeis.org

0, 5, 9, 13, 15, 19, 21, 25, 29, 31, 33, 37, 41, 43, 45, 49, 53, 55, 59, 61, 65, 67, 69, 73, 77, 79, 83, 85, 89, 91, 93, 97, 101, 103, 107, 109, 113, 115, 119, 121, 125, 127, 131, 133, 137, 139, 141, 145, 149, 151, 155, 157, 161, 163, 167, 169, 173, 175, 179
Offset: 1

Views

Author

Rémy Sigrist and N. J. A. Sloane, Jun 06 2022

Keywords

Crossrefs

Cf. A057716, A136252, A354169, A354680 (corresponding terms), A354788, A354798.

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    from collections import deque
    from functools import reduce
    from operator import or_
    def A354798_gen(): # generator of terms
        aset, aqueue, b, f, i = {0,1,2}, deque([2]), 2, False, 2
        yield 0
        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:
                    i += 1
                    if m.bit_count() > 1:
                        yield i
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = reduce(or_,aqueue)
                    f = not f
                    break
    A354798_list = list(islice(A354798_gen(),30)) # Chai Wah Wu, Jun 06 2022

Formula

Conjecture from N. J. A. Sloane, Jul 15 2022: (Start)
The following is a conjectured explicit formula for a(n).
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.
The F(i) sequence begins 1, 13, 21, 29, 45, 61, 93, 125, 189, 253, 381, ... (cf. A136252 or A354788)
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.
The V(i) sequence begins 0, 41, 65, 89, 137, 185, 281, 377, 569, 761, ... (cf. A354789).
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
[0, 5, 9, 13, 15, 19, 21, 25, 29, 31, 33, 37]
Assume now that n >= F(1) = 13, and define i and j by F(i) <= n < F(i+1), n = F(i) + j.
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.
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:
0, 2, 4, 8, 12, 14, 18, 20, 24, 26, 30, 32, 36, 38, 42, 44, 48, 50, 54, 56, ...
The conjecture has been checked for the first 5000 terms.
(End)
The conjecture is now known to be true. See De Vlieger et al. (2022). - N. J. A. Sloane, Aug 29 2022

A355150 The Hamming weight of A354169, a(n) = A000120(A354169(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1
Offset: 0

Views

Author

Thomas Scheuerle, Jun 21 2022

Keywords

Comments

All the following conjectures are now known to be true. See De Vlieger et al. (2022). - N. J. A. Sloane, Aug 29 2022
Conjecture: It appears that this sequence may be computed by a fast algorithm:
We begin with an initial sequence 0,1,1,1,1,2. Let n be the index of the last element added. Then extend by the rules:
If a(n) = 2, a((n-3)/2) = 1, and a((n-1)/2) = 2 extend this sequence by 1,2.
If a(n) = 2, a((n-3)/2) = 2, a((n-1)/2) = 1, and a(n-2) = 1, extend this sequence by 1,2.
In all other cases extend this sequence by 1,1,1,2.
This conjecture was verified for n = 0..2^16 against the b-file provided by Michael De Vlieger. - Thomas Scheuerle, Jul 14 2022
[Typos corrected by N. J. A. Sloane, Jul 10 2022 at the suggestion of Michel Dekking.]
From Michel Dekking, Jul 12 2022: (Start)
Conjecture: It appears that this sequence is almost a periodic sequence, with period 6. Let x be the sequence defined below.
If n > 25, n == 2 (mod 6) is not an element of x then (written as words)
a(n)a(n+1)...a(n+5) = 111212.
If n > 25, n == 2 (mod 6) is an element of x then
a(n)a(n+1)...a(n+5) = 121112.
The sequence x = {32, 44, 68, 92, 140, 188, 284, ...} is a sparse sequence defined via the sequence A007283, given by A007283(n)=3*2^n, which has also been encountered in A354169. In fact, x(1) = 32, and
x(2n+2) - x(2n+1) = 3*2^(n+2) for n=0,1,2,....
x(2n+1) - x(2n) = 3*2^(n+2) for n=1,2,.... (End)
From Michel Dekking, Jul 23 2022: (Start)
Extending the sequence x to the right with the four numbers 5,8,14,21 we obtain sequence A354789.
So the sparse positions are given by 9*2^k - 4 for k even, and by 12*2^k - 4 for k odd, for k = 2,3,... (End)

Crossrefs

Programs

  • MATLAB
    function a = A355150( max_n ) % Note: a(0) is omitted here because
                                  % a(1) will be a(1) in the sequence.
        a = [1 1 1 1 2];
        m = length(a);
        while length(a) < max_n
            if (((a((m-3)/2) == 2)&&(a((m-1)/2) == 1)&&(a(m-2) == 1)) ...
                ||((a((m-3)/2) == 1)&&(a((m-1)/2) == 2)))
                a(m+1:m+2) = [1 2];
                m = m+2;
            else
                a(m+1:m+4) = [1 1 1 2];
                m = m+4;
            end
        end
    end

Formula

a(A354767(n)) = 1.
a(A354798(n+1)) != 2.

Extensions

Edited by N. J. A. Sloane, Jul 10 2022

A354793 Hamming weight of A354783(n).

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 2, 0, 1, 1, 3, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 3, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 3, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 2, 0, 1, 1, 3, 1, 2, 0, 2, 2, 3, 1, 3, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 2, 0, 1, 1, 3, 1, 2, 0, 2, 2, 3, 1, 3, 1, 2, 0, 1, 1, 2, 0, 2, 2, 3, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Jul 19 2022

Keywords

Comments

Conjecture: This sequence appears to have a simple structure. Encode it by making the following substitutions, in this order:
Replace the initial 28 terms 0011201120223120113120112022 by S (as usual, the start is irregular), then map:
3 1 3 -> 7
3 1 2 -> 6
1 2 0 1 1 2 0 2 2 -> 9
0 1 1 -> 2
0 2 2 -> 4
Then it appears that the encoded sequence is the concatenation of the following blocks:
S
79
79(6264)^1
79(6264)^1
79(6264)^3
79(6264)^3
79(6264)^15
79(6264)^15
79(6264)^31
79(6264)^31
79(6264)^63
79(6264)^63
79(6264)^127
79(6264)^127
...
This is probably not the most efficient encoding, but I was happy to find any one that revealed the structure.
From Michel Dekking, Jul 23 2022: (Start)
The following is another way to present the conjecture above, which shows the close connection with sequence A355150.
Conjecture: It appears that this sequence is almost a periodic sequence, with period 12. Let x:=A354789.
If n > 28, n == 5 (mod 12) is not an element of x then (written as words)
a(n)a(n+1)...a(n+11) = 312011312022.
If n > 28, n == 5 (mod 12) is an element of x then
a(n)a(n+1)...a(n+11) = 313120112022.
(End)

Crossrefs

Previous Showing 21-23 of 23 results.