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-8 of 8 results.

A238475 Rectangular array with all start numbers Me(n, k), k >= 1, for the Collatz operation ud^(2*n), n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

1, 9, 5, 17, 37, 21, 25, 69, 149, 85, 33, 101, 277, 597, 341, 41, 133, 405, 1109, 2389, 1365, 49, 165, 533, 1621, 4437, 9557, 5461, 57, 197, 661, 2133, 6485, 17749, 38229, 21845, 65, 229, 789, 2645, 8533, 25941, 70997, 152917, 87381
Offset: 1

Views

Author

Wolfdieter Lang, Mar 10 2014

Keywords

Comments

The two operations on natural numbers m used in the Collatz 3x+1 conjecture (see the links) are here (following the M. Trümper reference) denoted by u for 'up' and d for 'down': u m = 3*m+1, if m is odd, and d m = m/2 if m is even. The present array gives all positive start numbers Me(n, k), k >= 1, for Collatz sequences following the pattern (word) ud^(2*n), for n >= 1, which end in an odd number. The end number does not depend on n and it is given by Ne(k) = 6*k - 5.
This rectangular array is Example 2.1. with x = 2*n, n >= 1, of the M. Trümper reference, pp. 4-5, written as a triangle by taking NE-SW diagonals. The case x = 2*n+1, n >= 0, for the word ud^(2*k+1) appears as array and triangle in A238476.
The first row sequences of the array Me (they become columns in the triangle Te) are A017077, A238477, A239123, ...
Note that there are also Collatz sequences starting with an odd number, following the pattern ud^(2*n) which end in an even number. For example, take n=1 and the sequence [5, 16, 8, 4]. Such sequences are here not considered.

Examples

			The rectangular array Me(n, k) begins:
n\k      1       2       3        4       5        6        7        8        9       10 ...
1:       1       9      17       25      33       41       49       57       65       73
2:       5      37      69      101     133      165      197      229      261      293
3:      21     149     277      405     533      661      789      917     1045     1173
4:      85     597    1109     1621    2133     2645     3157     3669     4181     4693
5:     341    2389    4437     6485    8533    10581    12629    14677    16725    18773
6:    1365    9557   17749    25941   34133    42325    50517    58709    66901    75093
7:    5461   38229   70997   103765  136533   169301   202069   234837   267605   300373
8:   21845  152917  283989   415061  546133   677205   808277   939349  1070421  1201493
9:   87381  611669 1135957  1660245 2184533  2708821  3233109  3757397  4281685  4805973
10: 349525 2446677 4543829  6640981 8738133 10835285 12932437 15029589 17126741 19223893
...
The triangle Te(m, n) begins (zeros are not shown):
m\n   1    2    3     4      5      6       7       8       9      10 ...
1:    1
2:    9    5
3:   17   37   21
4:   25   69  149    85
5:   33  101  277   597    341
6:   41  133  405  1109   2389   1365
7:   49  165  533  1621   4437   9557    5461
8:   57  197  661  2133   6485  17749   38229   21845
9:   65  229  789  2645   8533  25941   70997  152917   87381
10:  73  261  917  3157  10581  34133  103765  283989  611669  349525
...
----------------------------------------------------------------------------------------------
n=1, ud^2, k=1: Me(1, 1) = 1 = Te(1, 1), Ne(1) = 1 with the Collatz sequence [1, 4, 2, 1] of length 4.
n=1, ud^2, k=2: Me(1, 2) = 9 = Te(2, 1), Ne(2) = 7 with the Collatz sequence [9, 28, 14, 7] of length 4.
n=2, ud^4, k=1: Me(2, 1) = 5 = Te(2, 2), Ne(1) = 1 with the length 6 Collatz sequence [5, 16, 8, 4, 2, 1].
n=5, ud^(10), k=2: Me(5, 2) =  2389  = Te(6,5),  Ne(2) = 7 with the Collatz sequence [2389, 7168, 3584, 1792, 896, 448, 224, 112, 56, 28, 14, 7] of length 12.
		

Crossrefs

Formula

The array: Me(n, k) = 2^(2*n+1)*k - (5*2^(2*n)+1)/3 for n >= 1 and k >= 1.
The triangle: Te(m, n) = Me(n, m-n+1) = 2*4^n*(m-n) + (4^n-1)/3 for m >= n >= 1 and 0 for m < n.

A239126 Rectangular array showing the starting values M(n, k), k >= 1, for the Collatz operation (ud)^n, n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

3, 7, 7, 11, 15, 15, 15, 23, 31, 31, 19, 31, 47, 63, 63, 23, 39, 63, 95, 127, 127, 27, 47, 79, 127, 191, 255, 255, 31, 55, 95, 159, 255, 383, 511, 511, 35, 63, 111, 191, 319, 511, 767, 1023, 1023, 39, 71, 127, 223, 383, 639, 1023, 1535, 2047, 2047
Offset: 1

Views

Author

Wolfdieter Lang, Mar 13 2014

Keywords

Comments

The companion array and triangle for the odd end numbers N(n, k) is given in A239127.
The two operations on natural numbers m used in the Collatz 3x+1 conjecture are here (following the M. Trümper paper given in the link) denoted by u for 'up' and d for 'down': u m = 3*m+1, if m is odd, and d m = m/2 if m is even. The present array gives all start numbers M(n, k) for the Collatz word (ud)^n = s^n (s = ud is useful because, except for the one letter word u, at least one d follows a letter u), with n >= 1, and k >= 1. Such Collatz sequences have the maximal number of u's (grow fastest).
This rectangular array is M of Example 2.2. with x=y = n, n >= 1, of the M. Trümper reference, pp. 7-8, written as a triangle by taking NE-SW diagonals. The Collatz sequence starting with M(n, k) has length 2*n+1 for each k and it ends in the odd number N(n, k) given in A239127.
The first row sequences of the array M (columns of triangle TM) are A004767, A004771, A125169, A239128, ...

Examples

			The rectangular array M(n, k) begins:
n\k     1    2    3    4     5     6     7     8     9    10 ...
1:      3    7   11   15    19    23    27    31    35    39
2:      7   15   23   31    39    47    55    63    71    79
3:     15   31   47   63    79    95   111   127   143   159
4:     31   63   95  127   159   191   223   255   287   319
5:     63  127  191  255   319   383   447   511   575   639
6:    127  255  383  511   639   767   895  1023  1151  1279
7:    255  511  767 1023  1279  1535  1791  2047  2303  2559
8:    511 1023 1535 2047  2559  3071  3583  4095  4607  5119
9:   1023 2047 3071 4095  5119  6143  7167  8191  9215 10239
10:  2047 4095 6143 8191 10239 12287 14335 16383 18431 20479
...
The triangle TM(m, n) begins (zeros are not shown):
m\n   1    2     3     4     5     6      7      8      9    10 ...
1:    3
2:    7    7
3:   11   15    15
4:   15   23    31    31
5:   19   31    47    63    63
6:   23   39    63    95   127   127
7:   27   47    79   127   191   255    255
8:   31   55    95   159   255   383    511    511
9:   35   63   111   191   319   511    767   1023   1023
10:  39   71   127   223   383   639   1023   1535   2047  2047
...
---------------------------------------------------------------------
n=1, ud, k=1: M(1, 1) = 3 = TM(1, 1), N(1,1) = 5 with the Collatz sequence  [3, 10, 5] of length 3.
n=1, ud, k=2: M(1, 2) = 7 = TM(2, 1), N(1,2) = 11 with the Collatz sequence  [7, 22, 11] of length 3.
n=4, (ud)^4, k=2: M(4, 2) = 63 = TM(5, 4), N(4,2) = 323 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323] of length 9.
n=5, (ud)^5, k=1: M(5, 1) = 63 =  TM(5, 5), N(5,1) = 485 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323, 970, 485] of length 11.
		

Crossrefs

Formula

The array: M(n, k) = 2^(n+1)*k - 1 for n >= 1 and k >= 1.
The triangle: TM(m, n) = M(n, m-n+1) = 2^(n+1)*(m-n+1) - 1 for m >= n >= 1 and 0 for m < n.
a(n) = 4*A087808(A130328(n-1)) - 1 (conjectured). - Christian Krause, Jun 15 2021

A112695 Number of steps needed to reach 4,2,1 in Collatz' 3*n+1 conjecture.

Original entry on oeis.org

1, 2, 5, 0, 3, 6, 14, 1, 17, 4, 12, 7, 7, 15, 15, 2, 10, 18, 18, 5, 5, 13, 13, 8, 21, 8, 109, 16, 16, 16, 104, 3, 24, 11, 11, 19, 19, 19, 32, 6, 107, 6, 27, 14, 14, 14, 102, 9, 22, 22, 22, 9, 9, 110, 110, 17, 30, 17, 30, 17, 17, 105, 105, 4, 25, 25, 25, 12, 12, 12
Offset: 1

Views

Author

Wolfdieter Lang, Oct 31 2005

Keywords

Comments

a(n) = number of iterations of the Collatz 3*x+1 map applied to n until the conjectured 4,2,1 sequence is reached.

Examples

			a(1)=1 because the sequence for n=1 is 1,4,2,1.
a(4)=0 from 4,2,1.
a(7)=14 from 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.
		

References

  • C. A. Pickover, Dr. Googols wundersame Welt der Zahlen, Deutscher Taschenbuch Verlag, Kap. 14, pp. 87, 193. German translation of: Wonders of numbers - Adventures in Mathematics, Mind and Meaning, Oxford University Press 2003.

Crossrefs

Essentially the same sequence as A139399.

Programs

  • Mathematica
    f[n_] := If[EvenQ[n], n/2, 3 n + 1];
    a[n_] := Length[NestWhileList[f, n, {#1, #2, #3} != {4, 2, 1}&, 3]] - 3;
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Aug 08 2022 *)

Formula

a(n) = A006577(n) - 2, n >= 3, a(1)=1, a(2)=2.

A238476 Rectangular array with all start numbers Mo(n, k), k >= 1, for the Collatz operation ud^(2*n-1), n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

3, 7, 13, 11, 29, 53, 15, 45, 117, 213, 19, 61, 181, 469, 853, 23, 77, 245, 725, 1877, 3413, 27, 93, 309, 981, 2901, 7509, 13653, 31, 109, 373, 1237, 3925, 11605, 30037, 54613, 35, 125, 437, 1493, 4949, 15701, 46421, 120149, 218453
Offset: 1

Views

Author

Wolfdieter Lang, Mar 10 2014

Keywords

Comments

The two operations on natural numbers m used in the Collatz 3x+1 conjecture are here denoted (with M. Trümper, see the link) by u for 'up' and d for 'down': u m = 3*m+1, if m is odd, and d m = m/2 if m is even. The present array gives all start numbers Mo(n, k), k >= 1, for Collatz sequences following the pattern (word) ud^(2*n-1), with n >= 1, ending in an odd number. This end number does not depend on n and it is given by No(k) = 6*k - 1. This Collatz sequence has length 1 + (1 + 2*n - 1) = 2*n + 1.
This rectangular array is Example 2.1. with x = 2*n-1, n >= 1, of the M. Trümper reference, pp. 4-5, written as a triangle by taking NE-SW diagonals. The case x = 2*n, n >= 1, for the word ud^(2*n) appears as array and triangle A238475.
The first rows of array Mo (columns of triangle To) are A004767, A082285, A239124, ...

Examples

			The rectangular array Mo(n, k) begins:
n\k      1        2        3        4        5        6        7        8        9        10 ...
1:       3        7       11       15       19       23       27       31       35        39
2:      13       29       45       61       77       93      109      125      141       157
3:      53      117      181      245      309      373      437      501      565       629
4:     213      469      725      981     1237     1493     1749     2005     2261      2517
5:     853     1877     2901     3925     4949     5973     6997     8021     9045     10069
6:    3413     7509    11605    15701    19797    23893    27989    32085    36181     40277
7:   13653    30037    46421    62805    79189    95573   111957   128341   144725    161109
8:   54613   120149   185685   251221   316757   382293   447829   513365   578901    644437
9:  218453   480597   742741  1004885  1267029  1529173  1791317  2053461  2315605   2577749
10: 873813  1922389  2970965  4019541  5068117  6116693  7165269  8213845  9262421  10310997
...
---------------------------------------------------------------------------------------------
The triangle To(m, n) begins (zeros are not shown):
m\n    1    2    3     4     5      6      7       8       9      10 ...
1:     3
2:     7   13
3:    11   29   53
4:    15   45  117   213
5:    19   61  181   469   853
6:    23   77  245   725  1877   3413
7:    27   93  309   981  2901   7509  13653
8:    31  109  373  1237  3925  11605  30037   54613
9:    35  125  437  1493  4949  15701  46421  120149  218453
10:   39  141  501  1749  5973  19797  62805  185685  480597  873813
...
n=1, ud, k=1: Mo(1, 1) = 3 = To(1, 1), No(1) = 5 with the Collatz sequence [3, 10, 5] of length 3.
n=1, ud, k=2: Mo(1, 2) = 7 = Te(2, 1), No(2) = 11 with the Collatz sequence [7, 22, 11] of length 3.
n=5, ud^9, k=2: Mo(5, 2) = 1877 = Te(6,5), No(2) = 11 with the Collatz sequence [1877, 5632, 2816, 1408, 704, 352, 176, 88, 44, 22, 11] of length 11.
		

Crossrefs

Formula

Mo(n, k) = 2^(2*n)*k - (2^(2*n-1)+1)/3 for n >= 1 and k >= 1.
To(m, n) = Mo(n, m-n+1) = 2^(2*n)*(m-n+1) - (2^(2*n-1)+1)/3 for m >= n >= 1 and 0 for m < n.

A239127 Rectangular companion array to M(n,k), given in A239126, showing the end numbers N(n, k), k >= 1, for the Collatz operation (ud)^n, n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

5, 11, 17, 17, 35, 53, 23, 53, 107, 161, 29, 71, 161, 323, 485, 35, 89, 215, 485, 971, 1457, 41, 107, 269, 647, 1457, 2915, 4373, 47, 125, 323, 809, 1943, 4373, 8747, 13121, 53, 143, 377, 971, 2429, 5831, 13121, 26243, 39365, 59, 161, 431, 1133, 2915, 7289, 17495, 39365, 78731, 118097
Offset: 1

Views

Author

Wolfdieter Lang, Mar 13 2014

Keywords

Comments

The companion array and triangle for the odd start numbers M(n, k) is given in A239126.
See the comments on A239126 for the Collatz 3x+1 problem and the u and d operations.
This rectangular array is N of the Example 2.2. with x=y = n, n >= 1, of the M. Trümper reference, pp. 7-8, written as a triangle by taking NE-SW diagonals. The Collatz sequence starting with odd M(n, k) from A239126 and ending in odd N(n, k) has length 2*n+1 for each k.
The first row sequences of the array N (columns of triangle TN) are A016969, A239129, ...

Examples

			The rectangular array N(n, k) begins:
n\k      1      2      3      4      5      6     7       8       9      10 ...
1:       5     11     17     23     29     35     41     47      53      59
2:      17     35     53     71     89    107    125    143     161     179
3:      53    107    161    215    269    323    377    431     485     539
4:     161    323    485    647    809    971   1133   1295    1457    1619
5:     485    971   1457   1943   2429   2915   3401   3887    4373    4859
6:    1457   2915   4373   5831   7289   8747  10205  11663   13121   14579
7:    4373   8747  13121  17495  21869  26243  30617  34991   39365   43739
8:   13121  26243  39365  52487  65609  78731  91853 104975  118097  131219
9:   39365  78731 118097 157463 196829 236195 275561 314927  354293  393659
10: 118097 236195 354293 472391 590489 708587 826685 944783 1062881 1180979
...
-------------------------------------------------------------------------------
The triangle TN(m, n) begins (zeros are not shown):
m\n   1   2  3     4    5    6     7     8     9     10 ...
1:    5
2:   11  17
3:   17  35  53
4:   23  53 107  161
5:   29  71 161  323  485
6:   35  89 215  485  971 1457
7:   41 107 269  647 1457 2915  4373
8:   47 125 323  809 1943 4373  8747 13121
9:   53 143 377  971 2429 5831 13121 26243 39365
10:  59 161 431 1133 2915 7289 17495 39365 78731 118097
...
n=1, ud, k=1: M(1, 1) = 3 = TM(1, 1), N(1,1) = 5 with the Collatz sequence  [3, 10, 5] of length 3.
n=1, ud, k=2: M(1, 2) = 7 = TM(2, 1), N(1,2) = 11 with the Collatz sequence  [7, 22, 11] of length 3.
n=4, (ud)^4, k=2: M(4, 2) = 63 = TM(5, 4), N(4,2) = 323 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323] of length 9.
n=5, (ud)^5, k=1: M(5, 1) = 63 =  TM(5, 5), N(5,1) = 485 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323, 970, 485]  of length 11.
		

Crossrefs

Formula

The array: N(n, k) = 2*3^n*k - 1 for n >= 1 and k >= 1.
The triangle: TN(m, n) = N(n, m-n+1) = 2*3^n*(m-n+1) - 1 for m >= n >= 1 and 0 for m < n.

A006460 Image of n after 3k iterates of '3x+1' map (k large).

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 2, 1, 2, 1, 4, 1, 1, 4, 4, 2, 1, 4, 4, 2, 2, 1, 1, 2, 4, 2, 1, 1, 1, 1, 2, 4, 4, 2, 2, 1, 1, 1, 2, 4, 2, 4, 4, 2, 2, 2, 4, 4, 1, 1, 1, 4, 4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 4, 1, 1, 1, 1, 4, 4, 4, 1, 2, 2, 2, 4, 2, 2, 4, 4, 1, 2, 4, 4, 1, 1, 1, 1, 4, 1, 4, 4, 4, 4, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 4
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, E16.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006370, A076052 (partial sums), A139399.

Programs

  • Haskell
    a006460 = f 0 where
       f k x | mod k 3 == 0 && x `elem` [1, 2, 4] = x
             | otherwise                          = f (k+1) (a006370 x)
    -- Reinhard Zumkeller, Nov 16 2013
  • Mathematica
    f[n_] := If[EvenQ[n], n/2, 3 n + 1];
    a[n_] := With[{ff = NestWhileList[f, n, {#1, #2, #3} != {4, 2, 1}&, 3]}, ff[[Switch[Mod[Length[ff], 3], 0, -3, 1, -1, 2, -2]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Aug 08 2022 *)

Formula

For n > 2: a(n) = 4 if L = 0, otherwise L, where L = A139399(n) mod 3. - Reinhard Zumkeller, Nov 16 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 27 2001

A335870 a(n) is the least k > 0 such that T^k(n) = T^(2*k)(n) (where T^k denotes the k-th iterate of A006370, the Collatz map); a(n) = -1 if no such k exists.

Original entry on oeis.org

1, 3, 3, 6, 3, 3, 6, 15, 3, 18, 6, 12, 9, 9, 15, 15, 3, 12, 18, 18, 6, 6, 15, 15, 9, 21, 9, 111, 18, 18, 18, 105, 3, 24, 12, 12, 21, 21, 21, 33, 6, 108, 6, 27, 15, 15, 15, 102, 9, 24, 24, 24, 9, 9, 111, 111, 18, 30, 18, 30, 18, 18, 105, 105, 6, 27, 27, 27, 12
Offset: 0

Views

Author

Rémy Sigrist, Jun 28 2020

Keywords

Comments

If the Collatz conjecture is true, then a(n) > 0 for all n >= 0.

Examples

			For n = 3 we have:
    k  T^k(3)  T^(2*k)(3)
    -  ------  ----------
    1      10           5
    2       5           8
    3      16           2
    4       8           4
    5       4           1
    6       2           2
so a(3) = 6.
		

Crossrefs

Programs

  • PARI
    a(n, T=x->if (x%2, 3*x+1, x/2)) = my (x1=n, x2=n); for (k=1, oo, x1=T(x1); x2=T(T(x2)); if (x1==x2, return (k)))

A346369 a(n) is the number of steps the Collatz trajectory of -n takes to reach a cycle, or -1 if no cycle is ever reached.

Original entry on oeis.org

0, 0, 3, 1, 0, 4, 0, 2, 7, 0, 5, 5, 5, 0, 8, 3, 0, 8, 3, 0, 6, 6, 1, 6, 0, 6, 3, 1, 9, 9, 4, 4, 11, 0, 9, 9, 0, 4, 12, 1, 0, 7, 7, 7, 5, 2, 12, 7, 9, 0, 7, 7, 15, 4, 0, 2, 28, 10, 10, 10, 0, 5, 15, 5, 36, 12, 3, 0, 18, 10, 18, 10, 7, 0, 5, 5, 13, 13, 13, 2, 18
Offset: 1

Views

Author

Felix Fröhlich, Jul 14 2021

Keywords

Comments

The analog of A139399 for negative starting values.
Is a(n) > -1 for all n?

Examples

			For n = 5: The trajectory of -5 starts -5, -14, -7, -20, -10, -5, -14, -7, -20, -10, -5, ..., with -5 already being part of the cycle {-5, -14, -7, -20, -10}, so a(5) = 0.
For n = 6: The trajectory of -6 starts -6, -3, -8, -4, -2, -1, -2, -1, -2, -1, -2, ..., reaching a term of the cycle {-2, -1} after 4 steps, so a(6) = 4.
		

Crossrefs

Programs

  • PARI
    a006370(n) = if(n%2==0, n/2, 3*n+1)
    trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a006370(v[#v]))); v
    a(n) = my(t, v=[]); for(k=1, oo, t=trajectory(-n, k); for(x=1, #t, if(x < #t && t[x]==t[#t], return(x-1))))

Formula

a(n) = A224166(n) - A224254(n) = 1 + A224183(n) - A224254(n). - Pontus von Brömssen, Jul 24 2021
Showing 1-8 of 8 results.