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.

Showing 1-3 of 3 results.

A340407 a(n) gives the number of side-branches that will be passed, if A342369 is used to trace the Collatz tree backward starting at 6*n-2 with n > 0.

Original entry on oeis.org

2, 5, 1, 4, 5, 1, 4, 2, 1, 2, 3, 1, 5, 5, 1, 6, 2, 1, 2, 5, 1, 3, 3, 1, 3, 2, 1, 2, 4, 1, 6, 10, 1, 5, 2, 1, 2, 3, 1, 5, 8, 1, 4, 2, 1, 2, 4, 1, 3, 3, 1, 3, 2, 1, 2, 18, 1, 5, 4, 1, 6, 2, 1, 2, 3, 1, 4, 4, 1, 5, 2, 1, 2, 7, 1, 3, 3, 1, 3, 2, 1, 2, 7, 1, 4, 9, 1, 4, 2, 1
Offset: 1

Views

Author

Thomas Scheuerle, Mar 24 2021

Keywords

Comments

Recursion into A342369 means tracing the Collatz tree backward, starting at k = A342369(6*n-2), then k = A342369(k) until k is divisible by 3. At each A342369(k) = 3*m - 1, a new side-branch is connected which would start at 6*m-2. If A342369(k) reached a value divisible by three no further side-branches will be found.
This sequence is a rearrangement of A087088 such that all values at positions divisible by 3 are unchanged.

Examples

			n = 2:
6*n-2 = 10.
A342369(10) = 20. -> 7*3 - 1 -> A side-branch is connected.
A342369(20) = 13.
A342369(13) = 26. -> 9*3 - 1 -> A side-branch is connected.
A342369(26) = 17. -> 6*3 - 1 -> A side-branch is connected.
A342369(17) = 11. -> 4*3 - 1 -> A side-branch is connected.
A342369(11) = 7.
A342369(7) = 14. -> 5*3 - 1 -> A side-branch is connected.
A342369(14) = 9. -> divisible by 3 we stop here.
-> We found 5 connected side-branches, a(2) = 5.
		

Crossrefs

Programs

  • MATLAB
    function a = A340407( max_n )
        for n = 1:max_n
            c = 0;
            s = 6*n -2;
            while mod(s,3) ~= 0
                s = A342369( s );
                if mod(s,3) == 2
                    c = c+1;
                end
            end
            a(n) = c;
        end
    end
    function b = A342369( n )
        if mod(n,3) == 2
            b = (2*n - 1)/3;
        else
            b = 2*n;
        end
    end

Formula

a(n) > 0.
a(3*n) = 1.
a(9*n - b) = 2, b = {1, 8} row 2 of A342261. ( a(A056020(n)) = 2 ).
a(27*n - b) = 3, b = {2, 4, 5, 16} row 3 of A342261.
a(81*n - b) = 4, b = {13, 14, 22, 34, 38, 52, 74, 77} row 4 of A342261.
a(3^k*n - b) = k, b = row k of A342261.
( Sum_{k=1..j} a(k) )/j lim_{j->infinity} = 3 = Sum_{k=1..infinity} k*2^(k-1)/3^k.

A342842 All positive integer solutions m of equation A342369^k(6*p - 2) = m*3 + 2, sorted by p and k in ascending order, p has higher priority than k. p and k are positive integers. "^k" means recursion here.

Original entry on oeis.org

2, 1, 6, 8, 5, 3, 4, 10, 14, 9, 12, 16, 18, 24, 32, 21, 28, 22, 26, 17, 11, 7, 30, 40, 34, 38, 25, 42, 56, 37, 46, 50, 33, 44, 29, 19, 54, 72, 96, 128, 85, 58, 62, 41, 27, 36, 48, 64, 66, 88, 70, 74, 49, 78, 104, 69, 92, 61, 82, 86, 57, 76, 90, 120, 160, 94, 98, 65, 43
Offset: 1

Views

Author

Thomas Scheuerle, Mar 24 2021

Keywords

Comments

It is conjectured that this sequence is a permutation of the positive integers. If it does not contain all positive integers, then there exists a number of the form q = p*6 - 2, where no solution for j*3 - 1 = A006370^k(q) can be found for any j and any k. Such an example is not yet known.
If the sequence were to contain a positive integer more than once, this would mean that A340407 contains a term of uncountable size, which is not the case.
Let us assume here that this sequence is a permutation, then let a'(m) be the inverse permutation, such that a'(a(n)) = n.
Let p = A006370^k(6*(a(n) + 1) - 2) and choose k such that p is of the form m*6 + 4, then a'((p + 2)/6 - 1) < n.
Infinitely many formulas can be developed from this template: a(Sum_{k=1..3^d*n - b} A340407(k) + c) = e*n - f. c is here in the range 0 to d-1 if d-1 > 0. b can be any element of row d in A342261. For all combinations of d, b and c we may find a suitable e and f.

Crossrefs

Programs

  • MATLAB
    function a = A342842( max_p )
        c = 1;
        for p = 1:max_p
            s = 6*p -2;
            while mod(s,3) ~= 0
                s = A342369( s );
                if mod(s,3) == 2
                    a(c) = (s-2)/3;
                    c = c+1;
                end
            end
        end
    end
    function b = A342369( n )
        if mod(n,3) == 2
            b = (2*n - 1)/3;
        else
            b = 2*n;
        end
    end

Formula

a(1 + Sum_{k=1..n-1} A340407(k)) = 4*n-2.
a(Sum_{k=1..9*n-8} A340407(k)) = 24*n-23.
a(Sum_{k=1..9*n-1} A340407(k)) = 48*n-8.
a(n) = 8*(10^m - 1)/3 + 1 if n = Sum_{k=1..10^m} A340407(k).
a(n) = 4*10^m - 2 if n = -1 + Sum_{k=1..10^m} A340407(k).
a(n) = 4*10^m - 6 if n = -2 + Sum_{k=1..10^m} A340407(k).
a(n) = 5*10^m + (10^(n - 1) - 1)/3 - 13
if n = -3 + Sum_{k=1..10^m} A340407(k).
a(n) = 4*10^m - 10 if n = -4 + Sum_{k=1..10^m} A340407(k).

A342261 Irregular triangular array T(n,k) = m read by rows. Row n lists all solutions m < 3^n, where A340407(3^n*j - m) = n is true for all j > 0, sorted in ascending order.

Original entry on oeis.org

0, 1, 8, 2, 4, 5, 16, 13, 14, 22, 34, 38, 52, 74, 77, 20, 25, 40, 50, 88, 130, 146, 173, 185, 203, 209, 223, 229, 230, 238, 241, 130, 146, 173, 185, 203, 209, 223, 229, 230, 238, 241, 41, 61, 76, 104, 106, 121, 128, 157, 254, 266, 292, 311, 403, 412, 430, 445, 454, 493
Offset: 1

Views

Author

Thomas Scheuerle, Mar 26 2021

Keywords

Comments

Each row n has 2^(n-1) values.
In all rows other than the first row of T(n,k), there are exactly 2^(n-2) numbers of the form 3*p + 1 and the same number of numbers of the form 3*q - 1.
Each integer has a unique representation of the form 3^n*j - T(n,k).

Examples

			Triangle T(n,k) begins:
  0;
  1,   8;
  2,   4,  5, 16;
  13, 14, 22, 34, 38, 52, 74, 77;
		

Crossrefs

Cf. A340407.

Programs

  • MATLAB
    function t = A342261 (max_row)
        maxtest = 10;
        d = A340407(maxtest*3^max_row);
        for row = 1:max_row
            m = 0;
            for k = 1:2^(row-1)
                test = d((1:maxtest)*(3^row)-m);
                while ~all(test == test(1))||(test(1) ~= row)
                    m = m+1;
                    test = d((1:maxtest)*(3^row)-m);
                end
                t(row,k) = m;
                t = t+1;
            end
        end
    end
    function d = A340407 (max_p)
        for p = 1:max_p
            s = 6*p -2;
            c = 0;
            while mod(s,3) ~= 0
                s = A342369( s );
               if mod(s,3) == 2
                    c = c+1;
                end
            end
            d(p) = c;
        end
    end
    function b = A342369( n )
        if mod(n,3) == 2
            b = (2*n - 1)/3;
        else
            b = 2*n;
        end
    end
Showing 1-3 of 3 results.