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-10 of 14 results. Next

A372447 a(n) = A000523(A372443(n)); One less than the binary length of the n-th iterate of 27 with Reduced Collatz-function R.

Original entry on oeis.org

4, 5, 4, 5, 6, 6, 7, 6, 6, 7, 6, 7, 7, 7, 8, 8, 9, 8, 7, 7, 8, 8, 8, 8, 8, 9, 10, 10, 11, 9, 10, 11, 11, 9, 8, 8, 5, 4, 5, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 03 2024

Keywords

Crossrefs

Programs

A372446 a(n) = A372358(A372443(n)).

Original entry on oeis.org

14, 28, 10, 26, 18, 62, 116, 44, 14, 92, 50, 78, 60, 122, 82, 222, 260, 232, 114, 46, 44, 78, 252, 106, 138, 410, 354, 774, 1064, 218, 2, 1366, 336, 276, 228, 16, 8, 2, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 03 2024

Keywords

Comments

These are the bitmasks (or symmetric differences) obtained when the n-th iterate of 27 with Reduced Collatz-function R [= A372443(n), where R(n) = A000265(3*n+1)] is xored with that term of A086893 that has the same binary length. The binary expansions of the terms of A086893 are always of the form 10101...0101 (i.e., alternating 1's and 0's starting and ending with 1) when the binary length is odd, and of the form 110101...0101 (i.e., 1 followed by alternating 1's and 0's, and ending with 1) when n is even. Note that for all n >= 1, R(A086893(2n-1)) = 1, and R(A086893(2n)) = 5 (with R(5) = 1), so the first zero here, a(39) = 0 indicates that the iteration will soon have reached the terminal 1, and indeed, A372443(41) = 1.

Crossrefs

Column 14 of A372361.

Programs

A372453 a(n) = A372443(n) - A086893(1+A372447(n)).

Original entry on oeis.org

6, -12, 10, -6, -14, 22, -52, 36, 6, -76, 18, -58, 20, -38, -78, 54, -260, 104, -46, 38, 36, -58, 84, -22, 138, -134, -286, 254, -984, 58, 2, -1362, -336, -276, 92, -16, 8, 2, -18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 05 2024

Keywords

Comments

These are the differences obtained when the term of A086893 that has the same binary length as A372443(n) is subtracted from the latter. Here A372443(n) gives the n-th iterate of 27 with Reduced Collatz-function R, where R(n) = A000265(3*n+1).
Note that for all n >= 1, R(A086893(2n-1)) = 1, and R(A086893(2n)) = 5 (with R(5) = 1), so the first zero here, a(39) = 0 indicates that the iteration will soon have reached the terminal 1, and indeed, A372443(41) = 1.

Examples

			The term of A086893 that has same binary length as A372443(0) = 27 is 21 [as 21 = 10101_2 in binary, and 27 = 11011_2 in binary], therefore a(0) = 27-21 = 6.
The term of A086893 that has same binary length as A372443(1) = 41 is 53, therefore a(1) = 41-53 = -12.
		

Crossrefs

Programs

Formula

a(n) = A372443(n) - A086893(1+A000523(A372443(n))).

A372560 Array read by upward antidiagonals: A(n, k) = A371094(A(n-1, k)) for n > 1, k >= 1; A(1, k) = A372443(k-1).

Original entry on oeis.org

27, 165, 41, 8021, 501, 31, 12408149, 48469, 189, 47, 19607957362005, 299193685, 4565, 285, 71, 32439509492992549521282389, 7552911875069269, 1758549, 6869, 429, 107, 58947232705679751034215288252890081792789279233365, 3195535888075328282939605996885, 173230347605, 2643285, 10325, 645, 161
Offset: 1

Views

Author

Antti Karttunen, May 08 2024

Keywords

Examples

			Array begins:
n\k|        1          2        3        4        5         6           7
---+-----------------------------------------------------------------------
1  |       27,        41,      31,      47,      71,      107,        161,
2  |      165,       501,     189,     285,     429,      645,       1941,
3  |     8021,     48469,    4565,    6869,   10325,    31061,     374101,
4  | 12408149, 299193685, 1758549, 2643285, 7951701, 95769941, 9216283989,
		

Crossrefs

Cf. A371094, A372282, A372443 (the top row), A372444 (the leftmost column), A372561.

Programs

  • PARI
    up_to = 28;
    A000265(n) = (n>>valuation(n,2));
    A372443(n) = { my(x=27); while(n, x=A000265(3*x+1); n--); (x); };
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372560sq(n,k) = if(1==n,A372443(k-1),A371094(A372560sq(n-1,k)));
    A372560list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372560sq((a-(col-1)),col))); (v); };
    v372560 = A372560list(up_to);
    A372560(n) = v372560[n];

A372445 a(n) = A371092(A372443(n)).

Original entry on oeis.org

7, 6, 8, 12, 18, 27, 21, 16, 23, 18, 26, 39, 30, 44, 66, 99, 75, 28, 42, 63, 48, 71, 54, 80, 120, 180, 270, 405, 152, 228, 342, 513, 97, 73, 55, 11, 4, 6, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 01 2024

Keywords

Comments

a(n) gives the column index of A372443(n), or equally, of A372444(n) in array A257852.

Crossrefs

Column 14 of A372287, column 7 of A371103.

Programs

Formula

a(n) = A371092(A372443(n)) = A371092(A372444(n)).

A256598 Irregular triangle where row n contains the odd terms in the Collatz sequence beginning with 2n+1.

Original entry on oeis.org

1, 3, 5, 1, 5, 1, 7, 11, 17, 13, 5, 1, 9, 7, 11, 17, 13, 5, 1, 11, 17, 13, 5, 1, 13, 5, 1, 15, 23, 35, 53, 5, 1, 17, 13, 5, 1, 19, 29, 11, 17, 13, 5, 1, 21, 1, 23, 35, 53, 5, 1, 25, 19, 29, 11, 17, 13, 5, 1, 27, 41, 31, 47, 71, 107, 161, 121, 91, 137, 103, 155
Offset: 0

Views

Author

Bob Selcoe, Apr 03 2015

Keywords

Comments

The Collatz function is an integer-valued function given by n/2 if n is even and 3n+1 if n is odd. We build a Collatz sequence by beginning with a natural number and iterating the function indefinitely. It is conjectured that all such sequences terminate at 1.
In this triangle, row n is made up of the odd terms of the Collatz sequence beginning with 2n+1. Therefore, it is conjectured that this sequence is well-defined, i.e., that all rows terminate at 1.
The last index k in row n gives the number of iterations required for the Collatz sequence to terminate if even terms are omitted.
T(n,k)/T(n,k+1) is of form: ceiling(T(n,k)*3/2^j) for some j>=1. Therefore, the coefficients in each row may be read as a series of iterated ceilings, where j may vary. For example, row 3 has initial term 7, which is followed by ceiling(7*3/2), ceiling(ceiling(7*3/2)*3/2), ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4), ceiling(ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4)*3/8), ceiling(ceiling(ceiling(ceiling(ceiling(7*3/2)*3/2)*3/4)*3/8)*3/16).
The length of row n is A258145(n) (set to 0 if 1 is not reached after a finite number of steps). - Wolfdieter Lang, Aug 11 2021

Examples

			Triangle starts T(0,0):
n\k   0   1   2   3   4    5   6   7   8   9  10 ...
0:    1
1:    3   5   1
2:    5   1
3:    7   11  17  13  5    1
4:    9   7   11  17  13   5   1
5:    11  17  13  5   1
6:    13  5   1
7:    15  23  35  53  5    1
8:    17  13  5   1
9:    19  29  11  17  13   5   1
10:   21  1
11:   23  35  53  5    1
12:   25  19  29  11  17  13   5   1
...
n=13 starts with 27 and takes 41 steps: (27), 41, 31, 47, 71, 107,... 53, 5, 1, (see A372443).
Row 8 is [17, 13, 5, 1] because it is the subsequence of odd terms for the Collatz sequence starting with 17: [17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1].
		

Crossrefs

Cf. A372443 (row 13 up to its first 1).
Cf. also array A372283 showing the same terms in different orientation.

Programs

  • Mathematica
    f[n_] := NestWhileList[(3*# + 1)/2^IntegerExponent[3*# + 1, 2] &, 2*n + 1, # > 1 &]; Grid[Table[f[n], {n, 0, 12}]] (* L. Edson Jeffery, Apr 25 2015 *)
  • PARI
    row(n) = {my(oddn = 2*n+1, vl = List(oddn), x); while (oddn != 1, x = 3*oddn+1; oddn = x >> valuation(x, 2); listput(vl, oddn)); Vec(vl);}
    tabf(nn) = {for (n=0, nn, my(rown = row(n)); for (k=1, #rown, print1(rown[k], ", ")); print;);} \\ Michel Marcus, Oct 04 2019
  • Sage
    def Collatz(n):
        A = [n]
        b = A[-1]
        while b != 1:
            if is_even(b):
                A.append(b//2)
            else:
                A.append(3*b+1)
        return A
    [y for sublist in [[x for x in Collatz(2*n+1) if is_odd(x)] for n in [0..15]] for y in sublist] # Tom Edgar, Apr 04 2015
    

Formula

T(n,0) = 2n+1 and T(n,k) = A000265(3*T(n,k-1)+1) for k>0. - Tom Edgar, Apr 04 2015

A372283 Array read by upward antidiagonals: A(n, k) = R(A(n-1, k)) for n > 1, k >= 1; A(1, k) = 2*k-1, where Reduced Collatz function R(n) gives the odd part of 3n+1.

Original entry on oeis.org

1, 1, 3, 1, 5, 5, 1, 1, 1, 7, 1, 1, 1, 11, 9, 1, 1, 1, 17, 7, 11, 1, 1, 1, 13, 11, 17, 13, 1, 1, 1, 5, 17, 13, 5, 15, 1, 1, 1, 1, 13, 5, 1, 23, 17, 1, 1, 1, 1, 5, 1, 1, 35, 13, 19, 1, 1, 1, 1, 1, 1, 1, 53, 5, 29, 21, 1, 1, 1, 1, 1, 1, 1, 5, 1, 11, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 35, 25
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that in each column 1 will eventually appear. See also arrays A372287 and A372288.

Examples

			Array begins:
n\k| 1  2  3   4   5   6   7   8   9  10  11  12  13   14  15   16  17  18
---+-----------------------------------------------------------------------
1  | 1, 3, 5,  7,  9, 11, 13, 15, 17, 19, 21, 23, 25,  27, 29,  31, 33, 35,
2  | 1, 5, 1, 11,  7, 17,  5, 23, 13, 29,  1, 35, 19,  41, 11,  47, 25, 53,
3  | 1, 1, 1, 17, 11, 13,  1, 35,  5, 11,  1, 53, 29,  31, 17,  71, 19,  5,
4  | 1, 1, 1, 13, 17,  5,  1, 53,  1, 17,  1,  5, 11,  47, 13, 107, 29,  1,
5  | 1, 1, 1,  5, 13,  1,  1,  5,  1, 13,  1,  1, 17,  71,  5, 161, 11,  1,
6  | 1, 1, 1,  1,  5,  1,  1,  1,  1,  5,  1,  1, 13, 107,  1, 121, 17,  1,
7  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  5, 161,  1,  91, 13,  1,
8  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 121,  1, 137,  5,  1,
9  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  91,  1, 103,  1,  1,
10 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 137,  1, 155,  1,  1,
11 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 103,  1, 233,  1,  1,
12 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 155,  1, 175,  1,  1,
13 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 233,  1, 263,  1,  1,
14 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 175,  1, 395,  1,  1,
15 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 263,  1, 593,  1,  1,
16 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 395,  1, 445,  1,  1,
		

Crossrefs

Cf. A005408 (row 1), A075677 (row 2), A372443 (column 14).
Arrays derived from this one or related to:
A372287 the column index of A(n, k) in array A257852,
A372361 terms xored with binary words of the same length, either of the form 10101...0101 or 110101...0101, depending on whether the binary length is odd or even,
A372360 binary weights of A372361.
Cf. also array A371095 (giving every fourth column, 1, 5, 9, ...) and irregular array A256598 which gives the terms of each column, but only down to the first 1.

Programs

  • Mathematica
    With[{dmax = 15}, Table[#[[k, n-k+1]], {n, dmax}, {k, n}] & [Array[NestList[(3*# + 1)/2^IntegerExponent[3*# + 1, 2] &, 2*# - 1, dmax - #] &, dmax]]] (* Paolo Xausa, Apr 29 2024 *)
  • PARI
    up_to = 91;
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A372283sq(n,k) = if(1==n,2*k-1,R(A372283sq(n-1,k)));
    A372283list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372283sq((a-(col-1)),col))); (v); };
    v372283 = A372283list(up_to);
    A372283(n) = v372283[n];

Formula

For n > 1, A(n, k) = R(A372282(n-1, k)), where R(n) = (3*n+1)/2^A371093(n).
For all k >= 1, A(A258145(k-1), k) = 1 [which is the topmost 1 in each column].

A372444 The n-th iterate of 27 with A371094.

Original entry on oeis.org

27, 165, 8021, 12408149, 19607957362005, 32439509492992549521282389, 58947232705679751034215288252890081792789279233365, 259166427025070423330595967015238989905128148712607202753574381749095993394717720069452733214971221
Offset: 0

Views

Author

Antti Karttunen, May 01 2024

Keywords

Crossrefs

Cf. A371094.
Column 7 of A371102, column 14 of A372282.
Column 1 of A372560.
Sequences derived from this one:
A372443 obtained when Reduced Collatz-function R is applied to a(n-1), for n > 0,
A372445 column index of a(n) in array A257852,
A372448 the 2-adic valuation of 1 + 3*a(n), equal to row index of a(n) in array A257852,
A372449 binary lengths minus 1; their first differences: A372451,
A372452 number of terms of A086893 in the interval [a(n), a(1+n)],
A372454 the difference between a(n) and the term of A086893 with the same binary length.

Programs

  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372444(n) = { my(x=27); while(n, x=A371094(x); n--); (x); };

Formula

a(0) = 27; for n > 0, a(n) = A371094(a(n-1)).

A372288 Array read by upward antidiagonals: A(n, k) = A265745(A372282(n, k)), n,k >= 1, where A265745(n) is the sum of digits in "Jacobsthal greedy base".

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 5, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 5, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that each column will eventually settle to constant 1's, somewhere under its topmost row. This works as only the bisection A002450 of Jacobsthal numbers (A001045) contains numbers of the form 4k+1, while the other bisection contains only numbers of the form 4k+3, which do not occur among the range of A372351. See also the comments in A371094.

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13     14 15    16 17 18 19 20    21 22
---+----------------------------------------------------------------------------
1  | 1, 1, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3,     3, 3,    3, 3, 3, 3, 5,    5, 1,
2  | 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 1, 5, 5,     5, 3,    5, 3, 3, 3, 5,    5, 3,
3  | 1, 1, 1, 3, 3, 3, 1, 5, 1, 3, 1, 3, 3,     5, 3,    5, 5, 1, 3, 3,    5, 3,
4  | 1, 1, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3,     5, 3,    3, 3, 1, 3, 5,    5, 3,
5  | 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3,     5, 1,    5, 3, 1, 3, 3,    3, 3,
6  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,     3, 1,    5, 3, 1, 1, 5,    5, 3,
7  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    3, 3, 1, 1, 3,    5, 3,
8  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    3, 3,
9  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     3, 1,    5, 1, 1, 1, 3,    5, 1,
10 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    5, 1,
11 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1, 2155, 1, 1, 1, 1,    5, 1,
12 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1, 6251, 1,
13 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10347, 1,    5, 1, 1, 1, 1,    5, 1,
14 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    5, 1,
15 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    7, 1, 1, 1, 1,    5, 1,
16 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    7, 1,
		

Crossrefs

Cf. also array A372561 (formed by columns whose indices in this array are given by A372443).

Programs

A372449 a(n) = A000523(A372444(n)); One less than the length of binary expansion of the n-th iterate of 27 with A371094.

Original entry on oeis.org

4, 7, 12, 23, 44, 84, 165, 326, 650, 1297, 2590, 5177, 10349, 20695, 41386, 82766, 165527, 331048, 662093, 1324181, 2648358, 5296712, 10593418, 21186832, 42373658, 84747311, 169494616, 338989224, 677978441, 1355956875, 2711913744, 5423827481, 10847654953, 21695309901, 43390619796, 86781239588, 173562479173, 347124958346
Offset: 0

Views

Author

Antti Karttunen, May 04 2024

Keywords

Crossrefs

Programs

Formula

a(n) = A000523(A372444(n)).
a(0) = A372447(0) = 4, and for n > 0, a(n) = A372447(n) + 2*A372448(n-1).
Showing 1-10 of 14 results. Next