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 10 results.

A261673 Records in A135730.

Original entry on oeis.org

0, 1, 4, 5, 11, 12, 16, 19, 22, 29, 37, 40, 91, 92, 105, 106, 119, 122, 125, 158, 166, 178, 181, 183, 218, 231, 234, 260, 296, 304, 310, 313, 321, 326, 329, 334, 337, 340, 366, 374, 380, 407, 415, 555, 561, 564, 565, 568, 594, 620, 623, 688, 689, 710, 718, 719
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2015

Keywords

Crossrefs

Extensions

More terms from Lars Blomberg, Sep 29 2015

A261674 Odd numbers which take a record number of steps to reach {1, 9, or 33} under iteration of the map described in the comments section of A135730.

Original entry on oeis.org

1, 3, 5, 11, 17, 35, 49, 65, 89, 113, 129, 173, 305, 609, 641, 1281, 1353, 1805, 2417, 2849, 3377, 5961, 7949, 11009, 13857, 14601, 19469, 22049, 36545, 43313, 77001, 95793, 108041, 108161, 128049, 128193, 170925, 227901, 252929, 299777, 532937, 609801, 722729
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2015

Keywords

Comments

The corresponding numbers of steps are listed in A261673.

Crossrefs

Extensions

More terms from Lars Blomberg, Sep 29 2015

A001281 Image of n under the map n->n/2 if n even, n->3n-1 if n odd.

Original entry on oeis.org

0, 2, 1, 8, 2, 14, 3, 20, 4, 26, 5, 32, 6, 38, 7, 44, 8, 50, 9, 56, 10, 62, 11, 68, 12, 74, 13, 80, 14, 86, 15, 92, 16, 98, 17, 104, 18, 110, 19, 116, 20, 122, 21, 128, 22, 134, 23, 140, 24, 146, 25, 152, 26, 158, 27, 164, 28, 170, 29, 176, 30, 182, 31, 188
Offset: 0

Views

Author

Keywords

Comments

On the set of positive integers, the orbit of any number seems to end in the orbit of 1, of 5 or of 17. Writing n=1+q*2^p with q odd, it is easily seen that for p=0,1 and p>3, some iterations of the map lead to a strictly smaller number (for n>17). The cases p=2 and p=3 may give rise to bigger loops (depending on the form of q). See sequences A135727-A135729 for maxima of the orbits and corresponding record indices. - M. F. Hasler, Nov 29 2007

References

  • R. K. Guy, Unsolved Problems in Number Theory, E16.

Crossrefs

Cf. A037082.
Cf. A037084, A039500-A039505, A135727-A135730. See also A006370, A006577 (Collatz 3x+1 problem).

Programs

  • Maple
    f := n-> if n mod 2 = 0 then n/2 else 3*n-1; fi;
  • Mathematica
    Table[If[OddQ[n], 3*n-1, n/2], {n, 0, 100}] (* T. D. Noe, Jun 27 2012 *)
  • PARI
    A001281(n)=if(n%2,3*n-1,n>>1) \\ M. F. Hasler, Nov 29 2007

Formula

f(n) = (7n-2-(5n-2)*cos(Pi*n))/4. - Robert W. Craigen (craigen(AT)fresno.edu)
G.f.: x*(2 + x + 4*x^2)/((1 - x)^2*(1 + x)^2). - Ilya Gutkovskiy, Aug 17 2016

A135727 Maximal value in orbit of n under the map A001281(x)=3x-1 if x odd, x/2 if x even.

Original entry on oeis.org

0, 2, 2, 8, 4, 20, 8, 20, 8, 56, 20, 32, 12, 56, 20, 44, 16, 272, 56, 56, 20, 272, 32, 272, 24, 272, 56, 80, 28, 128, 44, 272, 32, 488, 272, 104, 56, 272, 56, 128, 40, 272, 272, 128, 44, 272, 272, 140, 48, 488, 272
Offset: 0

Views

Author

M. F. Hasler, Nov 26 2007

Keywords

Comments

On the set of positive integers, the orbit of any number under A001281 seems to end in the orbit of 2, of 20 or of 272, which are the respective maxima of these cycles. Since any odd number increases under the map A001281, all elements of this sequence are even.

Crossrefs

Programs

  • PARI
    A135727(n)=local(m=n);if(n, while( n != 272 & n != 20 & n != 2, if( n%2, n=3*n-1; m=max(n,m), n>>=1)));m

A261671 If n even, a(n) = 6n+3, otherwise a(n) = n.

Original entry on oeis.org

3, 1, 15, 3, 27, 5, 39, 7, 51, 9, 63, 11, 75, 13, 87, 15, 99, 17, 111, 19, 123, 21, 135, 23, 147, 25, 159, 27, 171, 29, 183, 31, 195, 33, 207, 35, 219, 37, 231, 39, 243, 41, 255, 43, 267, 45, 279, 47, 291, 49, 303, 51, 315, 53, 327, 55, 339, 57, 351, 59, 363
Offset: 0

Views

Author

N. J. A. Sloane, Sep 02 2015

Keywords

Comments

Although the OEIS indexes sequences by consecutive integers, it is better to think of this sequence as defined on the odd numbers 1,3,5,7,... and given by f(4m+1)=12m+3, f(4m+3)=2m+1, that is, subtract 1 and divide by 2 if the result is odd, otherwise multiply by 3. This arises in analyzing A109732.
It is conjectured that starting with any positive odd number d and iterating f, we always eventually reach either 1, 9, or 33 (see Comments in A135730).

Crossrefs

Programs

  • Mathematica
    Table[If[EvenQ[n],6n+3,n],{n,0,60}] (* or *) LinearRecurrence[{0,2,0,-1},{3,1,15,3},70] (* Harvey P. Dale, Dec 30 2023 *)
  • PARI
    Vec((x^3+9*x^2+x+3)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Sep 13 2015

Formula

From Colin Barker, Sep 13 2015: (Start)
a(n) = (3+3*(-1)^n+7*n+5*(-1)^n*n)/2.
a(n) = 2*a(n-2) - a(n-4) for n>3.
G.f.: (x^3+9*x^2+x+3) / ((x-1)^2*(x+1)^2).
(End)

A135728 Record indices of A135727(n) = max{ A001281^k(n);k=0,1,2,3... } (3x-1 problem).

Original entry on oeis.org

0, 1, 3, 5, 9, 17, 33, 65, 129, 153, 321, 1425, 1601, 1889, 3393, 4097, 6929, 8193, 10497, 11025, 18273, 28161, 74585, 85265, 149345, 337761, 558341, 839429, 1022105, 1467393, 7932689, 8612097, 23911397, 58882625, 75567105, 293056017
Offset: 1

Views

Author

M. F. Hasler, Nov 26 2007

Keywords

Comments

This gives indices n for which A135727(n) is larger than all preceding values of that sequence. As in A135727(n), we include the fixed point 0 in the domain of A001281. Obviously, many but not all entries are of the form 2^k+1 and not all of such numbers are in the sequence (e.g. 257, 1025, 2049 are missing). Is there a simple way of characterizing the exceptions?

Crossrefs

Programs

  • PARI
    A135728(Nmax=10^4)=local(m=-1);for(n=0,Nmax,if(m+0A135727(n)),print1(n",")))

Extensions

a(19)-a(36) from Donovan Johnson, Nov 06 2010

A135729 Record indices of A135727(n)/n = max{ A001281^k(n);k=0,1,2,3... }/n (3x-1 problem).

Original entry on oeis.org

1, 3, 5, 9, 17, 65, 129, 153, 321, 1889, 4097, 10497, 11025, 28161, 149345, 558341, 1467393, 75567105, 299480577, 344371457, 677585217, 788620517, 1951587609, 2672464025, 15958182629, 52002133905, 187559691777, 213121397657
Offset: 1

Views

Author

M. F. Hasler, Nov 26 2007

Keywords

Comments

This subsequence of A135728 gives indices n for which A135727(n)/n (ratio of maximal value to starting value) is larger than for all preceding indices. Obviously, we cannot consider the index n=0 here.

Crossrefs

Programs

  • PARI
    A135729(Nmax=10^5)=local(m=0);for(n=1,Nmax,if(m+0A135727(n)/n),print1(n",")))

Extensions

a(15)-a(28) from Donovan Johnson, Nov 06 2010

A378845 Smallest starting x which takes n steps to reach the minimum of a cycle in the 3x-1 iteration.

Original entry on oeis.org

1, 2, 4, 7, 3, 6, 11, 19, 21, 13, 26, 9, 18, 35, 37, 73, 25, 49, 98, 33, 66, 131, 45, 90, 175, 127, 117, 85, 149, 57, 113, 199, 209, 133, 265, 89, 177, 65, 119, 237, 87, 159, 165, 329, 231, 225, 439, 309, 293, 585, 377, 391, 273, 261, 521, 1042, 671, 695, 485
Offset: 0

Views

Author

Kevin Ryde, Dec 09 2024

Keywords

Comments

Each step is x -> 3x-1 if x odd, or x -> x/2 if x even (A001281).
The number of steps is A135730(x) so that a(n) = x is the smallest x for which A135730(x) = n.
a(n) <= 2*a(n-1) since x = 2*a(n-1) is a candidate for a(n) by first step x -> x/2.
Even terms are always a(n) = 2*a(n-1) since any smaller even a(n) would imply a smaller a(n-1) after first step x -> x/2.
No term is of the form 12*k+4, since its first step to 6*k+2 is also where the first step from 2*k+1 goes and the latter is a smaller start.
a(n) >= (a(n-1) + 1)/3 is a lower bound since a(n) = x must at least have a first step 3x-1 which reaches somewhere with n-1 further steps, so 3x-1 >= a(n-1).
Equality a(n) = (a(n-1) + 1)/3 = x occurs iff that x is an odd integer and not a cycle minimum, so its first step is to 3x-1 = a(n-1) (as for example at n=11).

Crossrefs

Cf. A001281 (step), A135730 (number of steps).
Cf. A378846 (with halving steps), A378847 (with tripling steps).
Cf. A033491 (in 3x+1).

Programs

  • C
    /* See links. */

A377524 Number of steps for n to reach the minimum of its final cycle under iterations of the map (A123684): x->(3x-1)/2 if x odd, x/2 otherwise; or -1 if this never happens.

Original entry on oeis.org

0, 1, 3, 2, 0, 4, 2, 3, 7, 1, 5, 5, 6, 3, 7, 4, 0, 8, 5, 2, 5, 6, 2, 6, 10, 7, 4, 4, 8, 8, 4, 5, 12, 1, 9, 9, 9, 6, 10, 3, 6, 6, 7, 7, 14, 3, 11, 7, 11, 11, 8, 8, 12, 5, 8, 5, 20, 9, 9, 9, 5, 5, 13, 6, 25, 13, 13, 2, 14, 10, 14, 10, 10, 10, 7, 7, 11, 11, 11, 4
Offset: 1

Views

Author

Kevin Ge, Oct 28 2024

Keywords

Comments

The currently known cycle minimums are 1, 5, 17 and there are no known a(n) = -1 (trajectory never reaches a cycle).
This sequence is one way to extend A006666 (number of Collatz (3x+1)/2 steps) to the negative numbers.

Examples

			For n = 5, a(5) = 0 because 5 is already the minimum of its "final cycle".
For n = 12, a(12) = 6 because 12 takes 6 iterations to reach the minimum of its "final cycle": 12 -> 6 -> 3 -> 8 -> 4 -> 2 -> 1.
		

Crossrefs

Cf. A123684 ((3x-1)/2 map), A135730 (all steps).
Cf. A006666 (for (3x+1)/2).

Programs

  • Julia
    function three_x_minus_one_delay(n::Int)
        count = 0
        while (n != 1 && n != 5 && n != 17)
            if (isodd(n))
                n += n << 1 - 1
            end
            n >>= 1
            count += 1
        end
        return count
    end

A378833 Number of tripling steps in the 3x-1 trajectory from n to the minimum of its cycle, or -1 if n never reaches a cycle.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 4, 0, 1, 1, 3, 1, 2, 0, 0, 4, 2, 0, 3, 1, 1, 1, 6, 3, 1, 1, 2, 2, 2, 0, 7, 0, 4, 4, 5, 2, 3, 0, 3, 3, 1, 1, 8, 1, 5, 1, 6, 6, 3, 3, 4, 1, 4, 1, 9, 2, 2, 2, 2, 2, 6, 0, 12, 7, 7, 0, 5, 4, 5, 4, 5, 5, 2, 2, 3, 3, 3, 0, 7, 3, 3, 3, 8, 1, 13
Offset: 1

Views

Author

Kevin Ryde, Dec 08 2024

Keywords

Comments

The 3x-1 iteration is x -> 3x-1 if x odd, or x -> x/2 if x even (A001281).
The cycle minima presently known are 1, 5 and 17.
a(n) = 0 iff n = m*2^k where m is one of the cycle minima.

Crossrefs

Cf. A001281 (step), A135730 (total steps), A377524 (halving steps).

Formula

a(n) = A135730(n) - A377524(n), if a(n) != -1.
Showing 1-10 of 10 results.