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

A198584 Odd numbers producing exactly 3 odd numbers in the Collatz (3x+1) iteration.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Oct 28 2011

Keywords

Comments

One of the odd numbers is always 1. So besides a(n), there is exactly one other odd number, A198585(n), which is a term in A002450.
Sequences A228871 and A228872 show that there are two sequences here: the odd numbers in order and out of order. - T. D. Noe, Sep 12 2013
Start with the numbers in A350053. If k is in sequence then so is 4*k+1. - Ralf Stephan, Jun 18 2025

Examples

			The Collatz iteration of 113 is 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1, which shows that 113, 85, and 1 are the three odd terms.
		

Crossrefs

Cf. A062053 (numbers producing 3 odds in their Collatz iteration).
Cf. A092893 (least number producing n odd numbers).
Cf. A198586-A198593 (odd numbers producing 2-10 odd numbers).

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t = {}; Do[If[Length[Select[Collatz[n], OddQ]] == 3, AppendTo[t, n]], {n, 1, 10000, 2}]; t
  • Python
    # get n-th term in sequence
    def isqrt(n):
      i=0
      while(i*i<=n):
        i+=1
      return i-1
    for n in range (200):
      s = isqrt(3*n)//3
      a = s*3
      b = (a*a)//3
      c = n-b
      d = 4*(n*3+a+(c4*s+1)+(c>5*s+1))+5
      e = isqrt(d)
      f = e-1-( (d-e*e) >> 1 )
      r = ((((8<André Hallqvist, Jul 25 2019
    
  • Python
    # just prints the sequence
    for a in range (5,100,1):
      for b in range(a-8+4*(a&1),0,-6):
        print(( ((1<André Hallqvist, Aug 14 2019

Formula

Numbers of the form (2^m*(2^n-1)/3-1)/3 where n == 2 (mod 6) if m is even and n == 4 (mod 5) if m is odd. - Charles R Greathouse IV, Sep 09 2022
a(n) = (16*2^floor(b(n)) - 2^(2*floor((b(n) - 1)/2) + 3*floor(b(n)) - 6*(floor(b(n)/2) - floor((floor(b(n))^2 + 20)/12) + n) - 2))/9 - 1/3 where b(n) = sqrt(3)*sqrt(4*n - 3). - Alan Michael Gómez Calderón, Feb 02 2025

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)).

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 *)

A350054 a(n) = (4^(3*n+2) - 7)/9.

Original entry on oeis.org

113, 7281, 466033, 29826161, 1908874353, 122167958641, 7818749353073, 500399958596721, 32025597350190193, 2049638230412172401, 131176846746379033713, 8395318191768258157681, 537300364273168522091633, 34387223313482785413864561
Offset: 1

Views

Author

Wolfdieter Lang, Jan 20 2022

Keywords

Comments

Bisection of A350053, namely the even part. The odd part is given in A228871.

Crossrefs

Programs

  • Mathematica
    Table[(4^(3*n + 2) - 7)/9, {n, 1, 14}] (* Amiram Eldar, Jan 21 2022 *)
  • PARI
    a(n) = (4^(3*n+2) - 7)/9 \\ Winston de Greef, Jan 27 2024

Formula

a(n) = (2^(6*n+4) - 7)/9, n >= 1.
G.f.: x*(113 - 64*x)/((1 - x)*(1 - 64*x)).
a(n) = 112*A133853(n) + 1. - Hugo Pfoertner, Jan 21 2022

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
Showing 1-5 of 5 results.