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

A060445 "Dropping time" in 3x+1 problem starting at 2n+1 (number of steps to reach a lower number than starting value). Also called glide(2n+1).

Original entry on oeis.org

0, 6, 3, 11, 3, 8, 3, 11, 3, 6, 3, 8, 3, 96, 3, 91, 3, 6, 3, 13, 3, 8, 3, 88, 3, 6, 3, 8, 3, 11, 3, 88, 3, 6, 3, 83, 3, 8, 3, 13, 3, 6, 3, 8, 3, 73, 3, 13, 3, 6, 3, 68, 3, 8, 3, 50, 3, 6, 3, 8, 3, 13, 3, 24, 3, 6, 3, 11, 3, 8, 3, 11, 3, 6, 3, 8, 3, 65, 3, 34, 3, 6, 3, 47, 3, 8, 3, 13, 3, 6, 3, 8, 3
Offset: 0

Views

Author

N. J. A. Sloane, Apr 07 2001

Keywords

Comments

If the starting value is even then of course the next step in the trajectory is smaller (cf. A102419).
The dropping time can be made arbitrarily large: If the starting value is of form n(2^m)-1 and m > 1, the next value is 3n(2^m)-3+1. That divided by 2 is 3n(2^(m-1))-1. It is bigger than the starting value and of the same form - substitute 3n -> n and m-1 -> m, so recursively get an increasing subsequence of m odd values. The dropping time is obviously longer than that. This holds even if Collatz conjecture were refuted. For example, m=5, n=3 -> 95, 286, 143, 430, 215, 646, 323, 970, 485, 1456, 728, 364, 182, 91. So the subsequence in reduced Collatz variant is 95, 143, 215, 323, 485. - Juhani Heino, Jul 21 2017

Examples

			3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2, taking 6 steps, so a(1) = 6.
		

Crossrefs

A060565 gives the first lower number that is reached. Cf. A060412-A060415, A217934.
See A074473, A102419 for other versions of this sequence.
Cf. A122437 (allowable dropping times), A122442 (least k having dropping time A122437(n)).
Cf. A070165.

Programs

  • Haskell
    a060445 0 = 0
    a060445 n = length $ takeWhile (>= n') $ a070165_row n'
                where n' = 2 * n + 1
    -- Reinhard Zumkeller, Mar 11 2013
    
  • Mathematica
    nxt[n_]:=If[OddQ[n],3n+1,n/2]; Join[{0},Table[Length[NestWhileList[nxt, n,#>=n&]]-1, {n,3,191,2}]]  (* Harvey P. Dale, Apr 23 2011 *)
  • Python
    def a(n):
        if n<1: return 0
        n=2*n + 1
        N=n
        x=0
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            x+=1
            if nIndranil Ghosh, Apr 22 2017

Extensions

More terms from Jason Earls, Apr 08 2001 and from Michel ten Voorde Apr 09 2001
Still more terms from Larry Reeves (larryr(AT)acm.org), Apr 12 2001

A171490 Numbers for which the smallest number of steps to reach 1 in "3x+1" (or Collatz) problem is a prime.

Original entry on oeis.org

1, 5, 7, 12, 14, 16, 29, 51, 56, 58, 60, 64, 65, 67, 74, 75, 78, 83, 87, 90, 100, 102, 104, 106, 109, 115, 118, 119, 122, 128, 130, 132, 134, 141, 142, 147, 161, 166, 173, 176, 187, 188, 200, 212, 219, 221, 231, 234, 239, 241, 251, 259, 264, 293, 313, 314, 316
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 10 2009

Keywords

Comments

Positions of primes in A033491. [R. J. Mathar, Nov 01 2010]

Examples

			1st Collatz sequence with a(1)=1 step starts with 2=prime(1): 2-1;
1st Collatz sequence with a(3)=7 steps starts with 3=prime(2): 3-10-5-16-8-4-2-1;
prime(6)=13 has Collatz sequence with 9 steps: 13-40-20-10-5-16-8-4-2-1, so has the smaller composite 12 < 13: 12-6-3-10-5-16-8-4-2-1 => 9 not a term of sequence;
1st Collatz sequence with a(5)=14 steps starts with 11=prime(5): 11-34-17-52-26-13-40-20-10-5-16-8-4-2-1.
		

References

  • R. K. Guy, "Collatz's Sequence" in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994
  • Clifford A. Pickover, Wonders of Numbers, Oxford University Press, pp. 116-118, 2001

Crossrefs

Extensions

Terms > 187 from R. J. Mathar, Nov 01 2010
Name edited by Michel Marcus, Jul 07 2018

A350082 Smallest odd number > n with n in its Collatz successors, or 0 if no such odd number exists. a(1) = 1.

Original entry on oeis.org

1, 3, 0, 5, 7, 0, 9, 9, 0, 11, 19, 0, 17, 37, 0, 17, 19, 0, 25, 23, 0, 25, 27, 0, 33, 29, 0, 37, 33, 0, 41, 75, 0, 37, 41, 0, 43, 39, 0, 41, 109, 0, 57, 51, 0, 47, 55, 0, 57, 133, 0, 57, 55, 0, 73, 57, 0, 59, 123, 0, 63, 109, 0, 75, 115, 0, 89, 181, 0, 71, 73
Offset: 1

Views

Author

Ruud H.G. van Tol, Jan 22 2022

Keywords

Comments

a(n) = 0 when n == 0 (mod 3) since such an n has no odd predecessor (only n*2^x). But n !== 0 (mod 3) always has some odd predecessor > n.

Examples

			a(2) = 3, because 3 is the smallest odd number > 2 that has 2 as a successor: 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2.
a(3) = 0 because 3 is not a successor of anything. A060565 contains no 3, nor multiples of 3.
a(11) = 19, because the trajectories of 13, 15, 17 don't contain 11, and 11 is a successor of 19:
  13 -> 40..5 -> 16..1;
  15 -> 46..23 -> 70..35 -> 106..53 -> 160..5 -> 16..1;
  17 -> 52..13;
  19 -> 58..29 -> 88..11.
		

Crossrefs

Cf. A060565.

Programs

  • PARI
    a(n)= if(1==n, return(1)); if(!(n%3), return(0)); my(v0=if(n%2, n+2, n+1)); while(1, my(v=v0); while(v>1 && v!=n, v=if(v%2, 3*v+1, v/2)); if(v==n, return(v0)); v0+=2)

A171619 Primes in A171490.

Original entry on oeis.org

5, 7, 29, 67, 83, 109, 173, 239, 241, 251, 293, 313, 337, 367, 571, 613, 769, 821, 877, 941, 947, 1031, 1069, 1103, 1511, 1693, 1759, 1901, 2011
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 13 2009

Keywords

Comments

Terms of sequence are primes in growing order where smallest number of steps m to reach 1 in "3x+1" (or Collatz) problem is a prime too.

Examples

			(1) 1st Collatz sequence with 5=prime(3) steps starts with 5=prime(3): 5-16-8-4-2-1, gives a(1)=5.
(2) 1st Collatz sequence with 7=prime(4) steps starts with 3=prime(2): 3-10-5-16-8-4-2-1, gives a(2)=7.
(3) 1st Collatz sequence with 29=prime(10) steps starts with 43=prime(14): 43-130-65-196-98-49-148-74-37-112-56-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1, gives a(3)=29.
(4) List of prime steps m for above a(n): 5, 3, 43, 167, 233, 41, 937, 14831, 9887, 7963, 73063, 45127, 78791, 225023, 6956969, 10998599, 126357223, 859130059, 2845683047, 322623647, 95592191, 8363817307, 28677246203, 38590505339, 35521451596571, 478672174364191, 1168778549494463, 6376392739978081, 103147916159472367.
		

References

  • R. K. Guy, "Collatz's Sequence" in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994.
  • Clifford A. Pickover, Wonders of Numbers, Oxford University Press, pp. 116-118, 2001.
  • Guenther J. Wirsching, The Dynamical System Generated by the 3n+1 Function, Springer-Verlag, Berlin, 1998.

Crossrefs

Extensions

Missing term a(7)=173 inserted by Georg Fischer, Oct 26 2022
a(23)-a(29) (using Eric Roosendaal's data) by Tyler Busby, Feb 11 2023
Showing 1-4 of 4 results.