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.

Previous Showing 21-30 of 53 results. Next

A064433 Number of iterations of A064455 to reach 2 (or 1 in the case of 1).

Original entry on oeis.org

1, 1, 2, 6, 3, 5, 7, 12, 4, 14, 6, 11, 8, 8, 13, 13, 5, 10, 15, 15, 7, 7, 12, 12, 9, 17, 9, 71, 14, 14, 14, 68, 6, 19, 11, 11, 16, 16, 16, 24, 8, 70, 8, 21, 13, 13, 13, 67, 10, 18, 18, 18, 10, 10, 72, 72, 15, 23, 15, 23, 15, 15, 69, 69, 7, 20, 20, 20, 12, 12, 12, 66, 17, 74, 17
Offset: 1

Views

Author

Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Oct 01 2001

Keywords

Comments

Similar to 3x+1 series (A008908). Does this sequence converge to 2 for all values of n (true for all values of n up to 100000)? The inverse sequence using next n = n-int(n/2) for n even and n+int(n/2) for n odd leads to 3 (?) possible end sequences (1), (5, 7, 10) and (17, 25, 37, 55, 82, 41, 61, 91, 136, 68, 34)
Starting with a number n, the next value generated is n+int(n/2) if n is even, n-int(n/2) if n is odd; a(n) is the number of iteration for the initial value n to reach the limit of 1 to 2
Collatz's 3N+1 function as isometry over the dyadics is N->N/2 if even, but N->(3N+1)/2 if odd, including the (necessary) halving into each tripling step. Counting steps until reaching 1 in this way leads to this sequence instead of A008908. - Michael Vielhaber (vielhaber(AT)gmail.com), Nov 18 2009
The value at each step of a trajectory starting with n (n>1) is equal to the value plus one at the same step of the row starting with (n-1) of the irregular triangle of the abbreviated (Terras-modified) Collatz sequence (A070168). - K. Spage, Aug 07 2014

Examples

			a(4) = 6. Starting with 4, 4 is even so the next number is 4+int(4/2) = 6, 6 is even so next number is 6+int(6/2) = 9, 9 is odd so next number is 9-int(9/2) = 5, 5 is odd so next number is 5-int(5/2) = 3, 3 is odd so next number is 3-int(3/2)=2, so giving a sequence of 4,6,9,5,3,2: 6 numbers.
a(5) = 3. Starting with 5, A064455(5) = 3, A064455(3) = 2, so giving a trajectory of 5,3,2: 3 numbers. - _K. Spage_, Aug 07 2014
		

Crossrefs

Programs

  • Mathematica
    Table[Length@ NestWhileList[If[EvenQ@ #, 3 #/2, (# + 1)/2] &, n, # != 1 + Boole[n > 1] &], {n, 75}] (* Michael De Vlieger, Sep 24 2016 *)
  • PARI
    A064455(n) = {if(n%2, (n + 1)/2, 3*n/2)}
    A064433(n) = {my(c=1); if(n==1, 1, while(n!=2, n=A064455(n); c++); c)} \\ K. Spage, Aug 07 2014

Formula

a(n) = A006666(n-1) + 1. - K. Spage, Aug 04 2014

A092892 Smallest starting value in a Collatz '3x+1' sequence such that the sequence contains exactly n halving steps.

Original entry on oeis.org

1, 2, 4, 8, 5, 3, 6, 12, 24, 17, 11, 7, 14, 9, 18, 36, 25, 49, 33, 65, 43, 86, 57, 39, 78, 153, 105, 203, 135, 270, 185, 123, 246, 169, 329, 219, 159, 295, 569, 379, 283, 505, 377, 251, 167, 111, 222, 444, 297, 593, 395, 263, 175, 350, 233, 155, 103, 206, 137, 91, 182
Offset: 0

Views

Author

Hugo Pfoertner, Mar 11 2004

Keywords

Comments

First occurrence of n in A006666.
The graph of this sequence has features similar to those of A092893, but with the x-axis scaled by log(3)/log(2). - T. D. Noe, Apr 09 2007

Examples

			a(5)=3 because the Collatz sequence 3,10,5,16,8,4,2,1 is the first sequence containing 5 halving steps.
		

Crossrefs

Programs

A127789 Record indices of 2^h(n)/(3^t(n)*n), where h and t are the number of halving resp. tripling steps in the '3x + 1' problem.

Original entry on oeis.org

1, 3, 7, 9, 505, 559, 745, 993
Offset: 1

Views

Author

Paul Boddington, Apr 04 2007

Keywords

Comments

Original name: In the '3x + 1' problem we would expect a positive integer n to be approximately equal to 2^j / 3^k where j is the number of halving steps and k is the number of '3x + 1' steps required to reach 1. The numbers in this sequence are those for which 2^j / (n*3^k) sets a new record.
Eric Roosendaal calls 2^j / (n*3^k) the residue of n and conjectures that 993 yields the highest residue. - T. D. Noe, Apr 08 2007
It has been verified that the next value, if it exists, is larger than 2^32 ~ 4.3e9. We do not need an "escape clause" (as for A006577, A006666, A006667, ...) in this sequence since the unlikely case of a possibly undefined ratio is irrelevant for the list of records. - M. F. Hasler, May 07 2018

Crossrefs

Cf. A006370 (Collatz map), A014682 (condensed version using (3n+1)/2).
Cf. A006666 (halving steps), A006667 (tripling steps), A006577 (total).

Programs

  • PARI
    (c(n,c=[0,0])=while(n>1,bittest(n,0)&&c[1]++&&(n=n*3+1)&&next;n\=2;c[2]++);c); m=1;for(n=1,oo,m<<(t=c(n))[2]>n*3^t[1]||next;m=n*3^t[1]/2^t[2];print1(n", ")) \\ M. F. Hasler, May 07 2018

Extensions

New name from M. F. Hasler, May 07 2018

A206374 a(n) = (7*4^n - 1)/3.

Original entry on oeis.org

2, 9, 37, 149, 597, 2389, 9557, 38229, 152917, 611669, 2446677, 9786709, 39146837, 156587349, 626349397, 2505397589, 10021590357, 40086361429, 160345445717, 641381782869, 2565527131477, 10262108525909, 41048434103637, 164193736414549, 656774945658197
Offset: 0

Views

Author

Brad Clardy, Feb 07 2012

Keywords

Comments

First bisection of A062092 and A081253, second bisection of A097163. - Bruno Berselli, Feb 12 2012
Except a(0)=2, this is the 3rd row of table A178415. - Michel Marcus, Apr 13 2015

Crossrefs

Cf. A002450, A006666, A072197; A002042 (first differences), A178415, A347834.

Programs

  • Magma
    [(7*4^n-1)/3 : n in [0..30]];
    
  • Mathematica
    Table[(7(4^n) - 1)/3, {n, 0, 24}] (* Alonso del Arte, Feb 11 2012 *)
    CoefficientList[Series[(2-x)/(1-5*x+4*x^2),{x,0,30}],x] (* or *) LinearRecurrence[{5,-4},{2,9},30] (* Vincenzo Librandi, Mar 20 2012 *)
  • PARI
    vector(20,n,(7*4^(n-1)-1)/3) \\ Derek Orr, Apr 12 2015

Formula

G.f.: (2-x)/(1-5*x+4*x^2). - Bruno Berselli, Feb 12 2012
a(n) = A083597(n)+1. - Bruno Berselli, Feb 12 2012
a(n) = 4*a(n-1)+1 for n>0, a(0)=2. - Bruno Berselli, Oct 22 2015
a(n) = 7*A002450(n) + 2. - Yosu Yurramendi, Jan 24 2017
A006666(a(n)) = 2*n+11 for n > 0. - Juan Miguel Barga Pérez, Jun 18 2020
a(n) = 5*a(n-1) - 4*a(n-2) for n >= 2. - Wesley Ivan Hurt, Jun 30 2020
a(n) = A178415(3, n) = A347834(4, n-1), arrays, for n >= 1.- Wolfdieter Lang, Nov 29 2021

A332452 Starting from sigma(n), number of halving steps to reach 1 in '3x+1' problem, or -1 if this never happens.

Original entry on oeis.org

0, 5, 2, 11, 6, 7, 3, 12, 7, 14, 7, 13, 12, 8, 8, 67, 14, 23, 6, 7, 5, 15, 8, 14, 67, 7, 7, 14, 13, 16, 5, 68, 9, 71, 9, 59, 15, 14, 14, 13, 7, 10, 12, 8, 24, 16, 9, 69, 22, 13, 16, 18, 71, 15, 16, 15, 8, 13, 14, 9, 68, 10, 10, 31, 8, 17, 11, 69, 10, 17, 16, 76, 16, 23, 69, 12, 10, 9, 8, 14, 61, 69, 8, 16, 72, 20, 15, 14, 13, 16, 15, 9, 7, 17
Offset: 1

Views

Author

Antti Karttunen, Feb 16 2020

Keywords

Crossrefs

Programs

Formula

a(n) = A006666(A000203(n)).
a(n) = A332209(n) - A332453(n).

A375267 Number of iterations of the A375265 map to reach 1 starting from n, or -1 if 1 is never reached.

Original entry on oeis.org

0, 1, 1, 2, 5, 2, 16, 3, 2, 6, 14, 3, 9, 17, 6, 4, 12, 3, 20, 7, 17, 15, 15, 4, 23, 10, 3, 18, 18, 7, 106, 5, 15, 13, 13, 4, 21, 21, 10, 8, 109, 18, 29, 16, 7, 16, 104, 5, 24, 24, 13, 11, 11, 4, 112, 19, 21, 19, 32, 8, 19, 107, 18, 6, 27, 16, 27, 14, 16, 14, 102
Offset: 1

Views

Author

Paolo Xausa, Aug 09 2024

Keywords

Examples

			a(10) = 6 because the trajectory 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 consists of 6 steps.
		

Crossrefs

(Row lengths of A375266) - 1.

Programs

  • Mathematica
    A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True, 3*n + 1];
    Array[Length[NestWhileList[A375265, #, # > 1 &]] - 1 &, 100]

A082984 Numbers k for which the 3x+1 problem takes at least k halving and tripling steps to reach 1.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 11, 14, 15, 18, 19, 27, 31, 41, 47, 54, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95, 97, 108, 109, 110
Offset: 1

Views

Author

Hauke Worpel (hw1(AT)email.com), May 29 2003

Keywords

Comments

This sequence is almost certainly full; there are no more terms below 100000.
An exhaustive search revealed no further results up to 10^9. - Gonzalo Ciruelos, Aug 02 2013
If we do not count the initial number, then 1 and 2 do not appear in this sequence. It appears that no number k has a Collatz iteration requiring more than 5*k iterations. - T. D. Noe, Feb 21 2014

Examples

			3 is in the list because it takes A006577(3) = 7 steps to reach 1 (3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1).
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Select[Range[1000], Length[Collatz[#]] >= # &] (* T. D. Noe, Feb 21 2014 *)

A332454 Starting from sigma(n)+1, number of halving steps to reach 1 in '3x+1' problem, or -1 if this never happens.

Original entry on oeis.org

1, 2, 4, 3, 11, 7, 13, 4, 12, 14, 7, 13, 12, 16, 16, 5, 14, 7, 6, 20, 18, 15, 16, 14, 5, 20, 69, 22, 67, 73, 18, 6, 17, 71, 17, 13, 23, 14, 22, 59, 20, 75, 12, 8, 24, 73, 17, 69, 14, 67, 73, 18, 71, 61, 73, 61, 16, 59, 14, 33, 68, 75, 26, 7, 8, 74, 11, 31, 75, 74, 73, 19, 11, 23, 69, 12, 75, 33, 16, 30, 15, 31, 8, 35, 72, 20
Offset: 1

Views

Author

Antti Karttunen, Feb 16 2020

Keywords

Crossrefs

Programs

Formula

a(n) = A006666(A088580(n)) = A006666(1+sigma(n)).

A375909 Number of iterations of the Farkas map (A349407) to reach 1 starting from 2*n - 1.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Sep 02 2024

Keywords

Examples

			a(10) = 5 because the trajectory 19 -> 29 -> 15 -> 5 -> 3 -> 1 takes 5 steps.
		

Crossrefs

(Row lengths of A350279) - 1.

Programs

  • Mathematica
    FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
    Array[Length[FixedPointList[FarkasStep, 2*# - 1]] - 2 &, 100]

A101229 Perfect inverse "3x+1 conjecture" (See comments for rules).

Original entry on oeis.org

1, 2, 4, 1, 2, 4, 8, 16, 5, 10, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368
Offset: 1

Views

Author

Alexandre Wajnberg, Jan 22 2005

Keywords

Comments

Perfect inverse "3x+1 conjecture": rule 1: multiply n by 2 to give n' = 2n. rule 2: when n'=(3x+1), do n"= (n'-1)/3 (n" integer) Additional rule: rule 2 is applied once for any number n' (otherwise, the sequence beginning with 1 would be the cycle "1 2 4 1 2 4 1 2 4 1..."); then apply rule 1.
This gives a particular sequence of hailstone numbers which may be considered as a central axis for all the hailstone number sequences. The perfect inverse "3x+1 conjecture" falls rapidly into the sequence 3 6 12 24 48 96... which will never give a number to which apply the 2nd rule.
a(n) for n >= 11 written in base 2: 11, 110, 11000, 110000, ..., i.e.: 2 times 1, (n-11) times 0 (see A003953(n-10)). - Jaroslav Krizek, Aug 17 2009

Examples

			The first 4 is followed by 1 because 4 = 3*1 + 1, so rule 2: (4-1)/3 = 1;
the second 4 is followed by 8 because the 2nd rule has already been applied, so rule 1: 4*2 = 8.
		

References

  • R. K. Guy, Collatz's Sequence, Section E16 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 45); Coefficients(R!( x*(17*x^10+27*x^8+7*x^3-1)/(2*x-1) )); // G. C. Greubel, Mar 20 2019
    
  • Mathematica
    Rest[CoefficientList[Series[x*(17*x^10+27*x^8+7*x^3-1)/(2*x-1), {x, 0, 45}], x]] (* G. C. Greubel, Mar 20 2019 *)
    LinearRecurrence[{2},{1,2,4,1,2,4,8,16,5,10,3},40] (* Harvey P. Dale, May 06 2023 *)
  • PARI
    my(x='x+O('x^45)); Vec(x*(17*x^10+27*x^8+7*x^3-1)/(2*x-1)) \\ G. C. Greubel, Mar 20 2019
    
  • Sage
    a=(x*(17*x^10+27*x^8+7*x^3-1)/(2*x-1)).series(x, 45).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Mar 20 2019

Formula

a(n) = 3*2^(n-11) = 2^(n-11) + 2^(n-10) for n >= 11. - Jaroslav Krizek, Aug 17 2009
From Colin Barker, Apr 28 2013: (Start)
a(n) = 2*a(n-1) for n>11.
G.f.: x*(17*x^10+27*x^8+7*x^3-1) / (2*x-1). (End)

Extensions

More terms from Joshua Zucker, May 18 2006
Edited by G. C. Greubel, Mar 20 2019
Previous Showing 21-30 of 53 results. Next