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 17 results. Next

A198585 The second odd number appearing in the Collatz sequence starting with A198584(n).

Original entry on oeis.org

5, 5, 5, 85, 5, 341, 85, 5, 341, 85, 5, 341, 85, 5461, 5, 341, 21845, 85, 5461, 5, 341, 21845, 85, 5461, 5, 341, 21845, 85, 5461, 349525, 5, 341, 21845, 1398101, 85, 5461, 349525, 5, 341, 21845, 1398101, 85, 5461, 349525, 5, 341, 21845, 1398101, 85, 5461
Offset: 1

Views

Author

T. D. Noe, Oct 28 2011

Keywords

Comments

A198586 has the unique numbers appearing in this sequence.

Crossrefs

Formula

a(n) = A079813(1 + (-1 + b(n))^2 + c(n))*(A198586(2*(1 + c(n))) - A198586(3 - 2*(b(n) - c(n)))) + A198586(3 - 2*(b(n) - c(n))) where b(n) = ceiling(sqrt(n)/sqrt(3)) and c(n) = (-1+n-3*(b(n)-1)^2) mod (2*b(n)-1). - Alan Michael Gómez Calderón, Jan 22 2025

A062053 Numbers with exactly 3 odd integers in their Collatz (or 3x+1) trajectory.

Original entry on oeis.org

3, 6, 12, 13, 24, 26, 48, 52, 53, 96, 104, 106, 113, 192, 208, 212, 213, 226, 227, 384, 416, 424, 426, 452, 453, 454, 768, 832, 848, 852, 853, 904, 906, 908, 909, 1536, 1664, 1696, 1704, 1706, 1808, 1812, 1813, 1816, 1818, 3072, 3328, 3392, 3408, 3412, 3413, 3616
Offset: 1

Views

Author

Keywords

Comments

The Collatz (or 3x+1) function is f(x) = x/2 if x is even, 3x+1 if x is odd (A006370).
The Collatz trajectory of n is obtained by applying f repeatedly to n until 1 is reached.
A078719(a(n)) = 3; A006667(a(n)) = 2.

Examples

			The Collatz trajectory of 3 is (3,10,5,16,8,4,2,1), which contains 3 odd integers.
		

References

  • J. R. Goodwin, Results on the Collatz Conjecture, Sci. Ann. Comput. Sci. 13 (2003) pp. 1-16
  • J. Shallit and D. Wilson, The "3x+1" Problem and Finite Automata, Bulletin of the EATCS #46 (1992) pp. 182-185.

Crossrefs

Cf. A198584 (this sequence without the even numbers).
See also A198587.
Column k=3 of A354236.

Programs

  • Haskell
    import Data.List (elemIndices)
    a062053 n = a062053_list !! (n-1)
    a062053_list = map (+ 1) $ elemIndices 3 a078719_list
    -- Reinhard Zumkeller, Oct 08 2011
  • Mathematica
    Collatz[n_?OddQ] := (3n + 1)/2; Collatz[n_?EvenQ] := n/2; oddIntCollatzCount[n_] := Length[Select[NestWhileList[Collatz, n, # != 1 &], OddQ]]; Select[Range[4000], oddIntCollatzCount[#] == 3 &] (* Alonso del Arte, Oct 28 2011 *)

Formula

The two formulas giving this sequence are listed in Corollary 3.1 and Corollary 3.2 in J. R. Goodwin with the following caveats: the value x cannot equal zero in Corollary 3.2, one must multiply the formulas by all powers of 2 (2^1, 2^2, ...) to get the evens. - Jeffrey R. Goodwin, Oct 26 2011

A198586 a(n) = (4^A001651(n+1) - 1)/3: numbers (4^k-1)/3 for k > 1, not multiples of 3.

Original entry on oeis.org

5, 85, 341, 5461, 21845, 349525, 1398101, 22369621, 89478485, 1431655765, 5726623061, 91625968981, 366503875925, 5864062014805, 23456248059221, 375299968947541, 1501199875790165, 24019198012642645, 96076792050570581, 1537228672809129301
Offset: 1

Views

Author

T. D. Noe, Oct 30 2011

Keywords

Comments

Numbers coprime to 6 producing 2 odd numbers in the Collatz iteration.
Numbers appearing in A198585 (sorted and duplicates removed). These numbers occur in A002450, numbers of the form (4^k-1)/3, for k = 2, 4, 5, 7, 8, 10, ... (note that k a multiple of 3 does not appear).
A124477 \ {0,1} is a subset: for these n, 3n+1 = 2^(p-3) with p > 3 prime, whence also n !== 0 (mod 3). - M. F. Hasler, Oct 16 2018
These are exactly the odd non-multiples of 3 such 3n+1 = 2^m for some m, i.e., n = (2^m-1)/3. This is possible iff m = 2k, so we get n = (4^k-1)/3. Then n == 0 (mod 3) <=> 4^k == 1 (mod 9) <=> k == 0 (mod 3) <=> k not in A001651. This yields the FORMULA. (Multiples of 3 are excluded because the original definition implied that the terms are in the Collatz-orbit of another odd number, i.e., of the form n = (3x+1)/2^r, which is impossible for x a multiple of 3.) - M. F. Hasler, Oct 16 2018
From Wolfdieter Lang, Jan 14 2022: (Start)
a(n) mod 8 = 5. As subsequence of A002450 for n >= 1.
{a(n) mod 6} == repeat{5, 1}. See the first comment, and the periodicity modulo 6 of A002450 for n >= 1.
{a(n) mod 72} == repeat{5, 13, 53, 61, 29, 37}. Proof by induction: First with the bisection formulas, a(1+2*k) = (4^(2+3*k) - 1)/3 and a(2+2*k) = (4^(3*k+4) - 1)/3, for k >= 0, then trisection, using (4^9 - 1)/3 = 873819 = 9*9709. (End)

Crossrefs

Programs

  • Magma
    [4^(3*n  div 2 + 1) div 3: n in [1..25]]; // Vincenzo Librandi, Oct 20 2018
  • Mathematica
    e = 19; ex = Complement[Range[2,3*e], 3*Range[e]]; (4^ex - 1)/3
    (* Second program: *)
    Rest@ Map[(4^# - 1)/3 &, LinearRecurrence[{1, 1, -1}, {1, 2, 4}, 21]] (* Michael De Vlieger, Oct 17 2018 *)
  • PARI
    is(n)=gcd(n,6)==1&&(n=3*n+1)>>valuation(n,2)==1 \\ M. F. Hasler, Oct 16 2018
    
  • PARI
    A198586(n)=4^(3*n\2+1)\3 \\ M. F. Hasler, Oct 16 2018
    
  • PARI
    Vec(x*(5 + 80*x - 64*x^2) / ((1 - x)*(1 - 8*x)*(1 + 8*x)) + O(x^20)) \\ Colin Barker, Jan 17 2020
    

Formula

a(n) = (4^A001651(n+1) - 1)/3. - M. F. Hasler, Oct 16 2018
From Colin Barker, Jan 17 2020: (Start)
G.f.: x*(5 + 80*x - 64*x^2) / ((1 - x)*(1 - 8*x)*(1 + 8*x)).
a(n) = a(n-1) + 64*a(n-2) - 64*a(n-3) for n>3.
a(n) = (-1 + (-8)^n + 3*8^n) / 3.
(End)

Extensions

Definition corrected by M. F. Hasler, Oct 16 2018

A228871 Odd numbers producing 3 out-of-order odd numbers in the Collatz (3x+1) iteration.

Original entry on oeis.org

3, 227, 14563, 932067, 59652323, 3817748707, 244335917283, 15637498706147, 1000799917193443, 64051194700380387, 4099276460824344803, 262353693492758067427, 16790636383536516315363, 1074600728546337044183267, 68774446626965570827729123
Offset: 1

Views

Author

T. D. Noe, Sep 12 2013

Keywords

Comments

Sequence A198584 gives the first term of the Collatz sequence having exactly 3 odd numbers. This sequence is the subset of A198584 for which the second odd number is larger than the first. The second odd number is (2^(6*n - 2) - 1)/3, which always occurs as the third term of the sequence.
{a(n) mod 6} = {repeat(3, 5, 1)}, and a(n) mod 8 = 3 for all n. Proof from the formula of a(n) in terms of A198586 given below, using the modulo 72 congruence of the odd indexed part of A198586 given there. - Wolfdieter Lang, Jan 14 2022

Examples

			The number 3 has the Collatz iteration {3, 10, 5, 16, 8, 4, 2, 1}, which has three out-of-order odd numbers {3, 5, 1}.
		

Crossrefs

Cf. A198584 (Collatz iterations having 3 odd numbers).
Cf. A228872 (Collatz iterations producing 3 in-order odd numbers).
Cf. A198586.

Programs

  • Mathematica
    Table[(2*(2^(6*n - 2) - 1)/3 - 1)/3, {n, 15}]
  • PARI
    a(n)=4^(3*n-1)\3*2\3 \\ Charles R Greathouse IV, Mar 11 2017

Formula

a(n) = (64^n/2 - 5)/9. - Alois P. Heinz, Dec 08 2021
From Wolfdieter Lang, Jan 12 2022: (Start)
a(n) = (2*A198586(2*n-1) - 1)/3. See the Mathematica program.
G.f.: x*(3 + 32*x)/((1 - x)*(1 - 64*x)). (End)

A198587 Odd numbers producing 4 odd numbers in the Collatz iteration.

Original entry on oeis.org

17, 35, 69, 75, 141, 151, 277, 301, 565, 605, 1109, 1137, 1205, 2261, 2275, 2417, 2421, 4437, 4549, 4821, 4835, 4849, 9045, 9101, 9669, 9685, 9699, 17749, 18197, 19285, 19341, 19397, 19417, 36181, 36405, 38677, 38741, 38797, 38833, 38835, 70997, 72789, 72817
Offset: 1

Views

Author

T. D. Noe, Oct 31 2011

Keywords

Comments

Start with A385110. If k is in sequence then so is 4*k + 1. - Ralf Stephan, Jun 18 2025

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t = {}; Do[If[Length[Select[Collatz[n], OddQ]] == 4, AppendTo[t, n]], {n, 1, 100000, 2}]; t

A350053 a(n) = (2^(3*n + 3 + (-1)^n) - (6 + (-1)^n))/9, for n >= 1.

Original entry on oeis.org

3, 113, 227, 7281, 14563, 466033, 932067, 29826161, 59652323, 1908874353, 3817748707, 122167958641, 244335917283, 7818749353073, 15637498706147, 500399958596721, 1000799917193443, 32025597350190193, 64051194700380387
Offset: 1

Views

Author

Wolfdieter Lang, Jan 20 2022

Keywords

Comments

Labels of nodes at level L = 1 of the Collatz tree with only odd numbers congruent to 1, 3, and 7 modulo 8, named here CToddr.
a(n) is given by the successor of the non-leaf node labels of the (reduced) Collatz tree with odd numbers (named here CTodd) at level 1 given by A198586(n), for n >= 1. See a comment in A347834 for the construction of CTodd. (For all labels of CTodd at level 1 see {A002450(k)}_{k>=2}.) The present sequence gives the labels of the (further) reduced rooted tree CToddr, at level L = 1. Level L = 0 has the root labeled 1, and this node has a directed 1-cycle.
The successor of a node label u of the tree CTodd is given by (4*u - 1)/3 if u == 1 (mod 6), (2*u - 1)/3 if u == 5 (mod 6), and there is no successor if the label u == 3 (mod 6) (a leaf).
This sequence is motivated by a draft of Immo O. Kerner (see A347834 and the link).
Sorted set of all A385109(A198584(i)), i>0 (conjectured but easy to see). - Ralf Stephan, Jun 18 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := (2^(3*n + 3 + (-1)^n) - (6 + (-1)^n))/9; Array[a, 20] (* Amiram Eldar, Jan 21 2022 *) (* or *)
    LinearRecurrence[{0, 65, 0, -64}, {3, 113, 227, 7281}, 20] (* Georg Fischer, Sep 30 2022 *)
  • PARI
    a(n) = (2^(3*n + 3 + (-1)^n))\9 \\ Winston de Greef, Jan 28 2024

Formula

Bisection: a(2*k-1) = (2^(6*k-1) - 5)/9 = A228871(k), a(2*k) = (4^(3*k+2) - 7)/9 = A350054(k), for k >= 1.
a(n) = (2^(3*n+ 2 + b(n)) - (5 + b(n)))/9, with b(n) = 1 + (-1)^n = A010673(n-1), for n >= 1. See the name.
G.f.: Bisection: x*(3 + 32*x)/((1 - x)*(1 - 64*x)) and x*(113 - 64*x)/((1 - x)*(1 - 64*x)).
G.f.: x*(3 + 113*x + 32*x^2 - 64*x^3)/((1 - x^2)*(1 - 64*x^2)).

A198593 Odd numbers producing 10 odd numbers in the Collatz iteration.

Original entry on oeis.org

43, 87, 89, 173, 177, 179, 349, 355, 357, 385, 423, 693, 705, 709, 717, 729, 761, 769, 771, 777, 847, 1393, 1397, 1411, 1415, 1421, 1429, 1457, 1459, 1465, 1481, 1523, 1539, 1541, 1547, 1555, 1569, 1689, 1693, 1697, 2773, 2787, 2801, 2821, 2831, 2837, 2869
Offset: 1

Views

Author

T. D. Noe, Oct 31 2011

Keywords

Crossrefs

Cf. A198584.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t = {}; Do[If[Length[Select[Collatz[n], OddQ]] == 10, AppendTo[t, n]], {n, 1, 10000, 2}]; t

A228872 Odd numbers producing 3 decreasing odd numbers in the Collatz (3x+1) iteration.

Original entry on oeis.org

13, 53, 113, 213, 453, 853, 909, 1813, 3413, 3637, 7253, 7281, 13653, 14549, 29013, 29125, 54613, 58197, 58253, 116053, 116501, 218453, 232789, 233013, 464213, 466005, 466033, 873813, 931157, 932053, 1856853, 1864021, 1864133, 3495253, 3724629, 3728213
Offset: 1

Views

Author

T. D. Noe, Sep 12 2013

Keywords

Comments

Sequence A198584 gives the first term of the Collatz sequence having exactly 3 odd numbers. This sequence is the subset of A198584 for which the second odd number is smaller than the first.

Examples

			The number 13 has the Collatz iteration {13, 40, 20, 10, 5, 16, 8, 4, 2, 1}, which has three odd numbers in decreasing order {13, 5, 1}.
		

Crossrefs

Cf. A198584 (Collatz iterations having 3 odd numbers).
Cf. A228871 (Collatz iterations producing 3 out-of-order odd numbers).

Programs

  • Mathematica
    donQ[n_]:=Module[{od=Differences[Select[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&], OddQ]]}, Length[ od] ==2&&Max[od]<0]; Select[Range[1,373*10^4,2],donQ] (* Harvey P. Dale, Sep 23 2019 *)

A351122 Irregular triangle read by rows in which row n lists the number of divisions by 2 after tripling steps in the Collatz 3x+1 trajectory of 2n+1 until it reaches 1.

Original entry on oeis.org

1, 4, 4, 1, 1, 2, 3, 4, 2, 1, 1, 2, 3, 4, 1, 2, 3, 4, 3, 4, 1, 1, 1, 5, 4, 2, 3, 4, 1, 3, 1, 2, 3, 4, 6, 1, 1, 5, 4, 2, 1, 3, 1, 2, 3, 4, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 2, 2, 4, 3, 1, 1, 5, 4, 3, 1, 2, 3, 4
Offset: 1

Views

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Examples

			Triangle starts at T(1,0):
   n\k   0   1   2   3   4   5   6   7   8 ...
   1:    1   4
   2:    4
   3:    1   1   2   3   4
   4:    2   1   1   2   3   4
   5:    1   2   3   4
   6:    3   4
   7:    1   1   1   5   4
   8:    2   3   4
   9:    1   3   1   2   3   4
  10:    6
  11:    1   1   5   4
  12:    2   1   3   1   2   3   4
  13:    1   2   1   1   1   1   2   2   1   2   1   1   2  ... (see A372362)
  ...
For n=6, the trajectory of 2*n+1 = 13 is as follows. The tripling steps ("=>") are followed by runs of 3 and then 4 halvings ("->"), so row n=6 is 3, 4.
  13  =>  40 -> 20 -> 10 -> 5  =>  16 -> 8 -> 4 -> 2 -> 1
    triple   \------------/   triple  \---------------/
               3 halvings                4 halvings
Runs of halvings are divisions by 2^T(n,k). Row n=11 is 1, 1, 5, 4 and its steps starting from 2*n+1 = 23 reach 1 by a nested expression
  (((((((23*3+1)/2^1)*3+1)/2^1)*3+1)/2^5)*3+1)/2^4 = 1.
		

Crossrefs

Cf. A075680 (row lengths), A166549 (row sums), A351123 (row partial sums).
Cf. A256598.
Cf. A020988 (where row is [2*n]).
Cf. A198584 (where row length is 2), A228871 (where row is [1, x]).
Cf. A372362 (row 13, the first 41 terms).

Programs

  • PARI
    row(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ Michel Marcus, Jul 18 2022

Formula

T(n,k) = log_2( (3*A256598(n,k)+1) / A256598(n,k+1) ).

Extensions

Corrected by Michel Marcus, Jul 18 2022

A198588 Odd numbers producing 5 odd numbers in the Collatz iteration.

Original entry on oeis.org

11, 23, 45, 93, 181, 201, 369, 373, 401, 403, 725, 739, 753, 803, 805, 1477, 1493, 1507, 1605, 1611, 1613, 2901, 2957, 3013, 3033, 3213, 3221, 3223, 5909, 5973, 6029, 6065, 6067, 6421, 6445, 6453, 6465, 11605, 11829, 12053, 12131, 12133, 12853, 12885, 12893
Offset: 1

Views

Author

T. D. Noe, Oct 31 2011

Keywords

Crossrefs

Cf. A198584.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t = {}; Do[If[Length[Select[Collatz[n], OddQ]] == 5, AppendTo[t, n]], {n, 1, 20000, 2}]; t
Showing 1-10 of 17 results. Next