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 11-20 of 29 results. Next

A346592 Numbers k such that A006577(k^2) sets a new record.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 22, 35, 45, 49, 51, 77, 123, 143, 269, 419, 429, 765, 1011, 1395, 1989, 2165, 3335, 3827, 7179, 9005, 18010, 36020, 41453, 82906, 92099, 184198, 268509, 272767, 469347, 563273, 1126546, 1224197, 2172433, 2303171, 2825329, 5650658, 9295309, 10741519
Offset: 1

Views

Author

Hugo Pfoertner, Jul 28 2021

Keywords

Crossrefs

Programs

  • PARI
    a6577(n0)={my(n=n0,k=0);while(n>1,k++;n=if(n%2,3*n+1,n/2));k};
    a346592(limit)={msteps=0;for(k=1,limit,my(m=a6577(k^2));if(m>msteps,print1(k,", ");msteps=m))};
    a346592(1500000)

A346593 Numbers k such that A006577(k^3) sets a new record.

Original entry on oeis.org

2, 3, 6, 7, 14, 15, 25, 41, 45, 71, 79, 153, 233, 235, 470, 503, 707, 741, 1482, 2964, 3039, 3581, 7162, 14324, 27337, 54674, 61683, 123366, 168159, 254251, 302839, 605678, 622699, 947173, 1618687, 3237374, 6474748, 10995401, 13042083, 21767875, 43535750, 48584565
Offset: 1

Views

Author

Hugo Pfoertner, Jul 28 2021

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_]:=s[n]=(i=0;r=n;While[r!=1,i++;If[EvenQ@r,r=r/2,r=r*3+1]];i);
    lst={};max=1;Do[t=s[k^3];If[t>max,AppendTo[lst,k];max=t],{k,10^4}];lst (* Giorgos Kalogeropoulos, Jul 28 2021 *)
  • PARI
    a6577(n0)={my(n=n0,k=0);while(n>1,k++;n=if(n%2,3*n+1,n/2));k};
    a346593(limit)={msteps=0;for(k=1,limit,my(m=a6577(k^3));if(m>msteps,print1(k,", ");msteps=m))};
    a346593(1000000)

A138756 Indices of record values in A138753 (a "prime" variation of the Collatz (3n+1) problem).

Original entry on oeis.org

1, 2, 3, 8, 11, 17, 18, 27, 42, 72, 125, 219, 221, 401, 515, 556, 754, 841, 1146
Offset: 1

Views

Author

M. F. Hasler, Apr 01 2008

Keywords

Comments

"Indices of ..." is equivalent to "starting values for ..."

Crossrefs

Cf. A124123, A138750-A138754, A171938, A006877 (analog for Collatz problem).

Programs

Formula

a(n) = min { k | A138753(k) = A171938(n) }
Equals { m | A138753(k) < A138753(m) for all k

Extensions

a(15)-a(19) from Paolo Xausa, Jul 30 2023

A244638 In the '3x+1' problem, primes which as starting values set new records for number of steps to reach 1, where a step means either 'divide by two' or 'triple plus one and then divide by two'.

Original entry on oeis.org

2, 3, 7, 19, 31, 41, 73, 97, 193, 257, 313, 487, 859, 937, 1249, 2539, 3331, 3947, 5351, 5839, 7963, 9257, 12343, 21943, 31687, 45127, 60169, 78791, 115547, 180463, 213881, 234239, 270271, 376603, 875681, 1023871, 1252663, 1564063, 2585279, 4063723, 5649499, 9973919, 11200681, 39824647, 41464303, 73583071, 95592191, 226588897, 1359533387, 2263333321, 3349304527
Offset: 1

Author

Zak Seidov and Robert G. Wilson v, Jul 03 2014

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ NestWhileList[ If[ OddQ@ #, (3 # + 1)/2, #/2] &, n, # > 1 &]  mx = 0; p = 2; lst = {}; While[p < 10^10/2, a = f@ p; If[a > mx, mx = a; Print[{PrimePi@p, p, a - 1}]; AppendTo[ lst, p]]; p = NextPrime@ p]; lst

A248037 Numbers n such that the ratio of tripling steps to halving steps in the Collatz (3x+1) trajectory of n is greater than all previous ratios.

Original entry on oeis.org

2, 3, 7, 9, 27, 230631, 626331, 837799, 1723519, 3732423, 5649499, 6649279, 8400511, 63728127, 3743559068799, 100759293214567, 104899295810901231
Offset: 1

Author

Derek Orr, Sep 29 2014

Keywords

Comments

Equivalently, numbers n such that A006667(n)/A064433(n) > A006667(m)/A064433(m) for all 0 < m < n.
A006667(n) is the number of tripling steps in the Collatz (3x+1) problem and A064433(n) is the number of halving steps in the Collatz (3x+1) problem.
It is crucial to make A006667(n) the numerator as it can be zero when n = 2^k for some k > 0.
a(n) is odd for all n > 1.
The corresponding ratios are:
0.0000000000000000000000000000... (2)
0.4000000000000000000000000000... (3)
0.4545454545454545454545454545... (7)
0.4615384615384615384615384615... (9)
0.5857142857142857142857142857... (27)
0.5899280575539568345323741007... (230631)
0.5924764890282131661442006269... (626331)
0.5927051671732522796352583586... (837799)
0.5931232091690544412607449856... (1723519)
0.5935828877005347593582887700... (3732423)
0.5937500000000000000000000000... (5649499)
0.5961538461538461538461538461... (6649279)
0.5967365967365967365967365967... (8400511)
0.6030405405405405405405405405... (63728127)
0.6035196687370600414078674948... (3743559068799)
If we define a "tripling step" to also include a "halving step" afterwards (since 3*n+1 converts an odd number n into an even number, so a halving step will always follow), the ratios are still maximum at the a(n) values. However, the ratios themselves are different. The corresponding ratios in this case are:
0.000000000000000000000000000... (2)
0.666666666666666666666666666... (3)
0.833333333333333333333333333... (7)
0.857142857142857142857142857... (9)
1.413793103448275862068965517... (27)
1.438596491228070175438596491... (230631)
1.453846153846153846153846153... (626331)
1.455223880597014925373134328... (837799)
1.457746478873239436619718309... (1723519)
1.460526315789473684210526315... (3732423)
1.461538461538461538461538461... (5649499)
1.476190476190476190476190476... (6649279)
1.479768786127167630057803468... (8400511)
1.519148936170212765957446808... (63728127)
1.656946826758147512864493997... (3743559068799)
From Jon E. Schoenfield, Nov 21 2015: (Start)
Let T and H be the number of tripling steps and halving steps, respectively, in the entire Collatz (3x+1) trajectory of a number n. Since each tripling step increases the value by a factor greater than 3, and each halving step decreases it by a factor of exactly 2, we have n * 3^T / 2^H < 1, from which T/H < log(2)/log(3) - log_3(n)/H, so the ratio T/H cannot exceed log(2)/log(3) = 0.6309297535...
It seems likely that the present sequence is a subsequence of A006877 (which consists of values n whose trajectories are of record length). Taking as values of n the terms from the b-file for A006877, and generating their trajectories to obtain the corresponding values of H(n), it does not seem clear whether log_3(n)/H(n) is converging toward zero or toward some positive limit, perhaps around 0.020 (which would mean T/H < log(2)/log(3) - 0.020, i.e., T/H < 0.611).
The known terms n in A006877 at which log_3(n)/H(n) reaches a record low coincide almost exactly with the known terms of this sequence, the only exception thus far being a(11) = A006877(52) = 5649499, at which log_3(n)/H(n) is only slightly larger than it is at a(10) = A006877(51) = 3732423 (0.03685302 vs. 0.03682956). Given the values of log_3(n)/H(n) for the remaining known terms in A006877, it seems likely that
a(16) = A006877(110) = 100759293214567
and that a(17) exceeds A006877(130), which is 46785696846401151.
(End)
Note that a(17)=104899295810901231 has now been found by Eric Roosendaal's distributed project (see link below). - Dmitry Kamenetsky, Sep 23 2016
For n>=14, a(n) must be 7, 15, 27, or 31 (mod 32). This is because all other values provably have a ratio of tripling to halving steps of less than 0.6 (see program by Irvine and Consiglio Jr.). - Dmitry Kamenetsky, Sep 24 2016

Crossrefs

Programs

  • PARI
    Tratio(n)=c=0; d=0; while(n!=1,if(n==Mod(0,2),n=n/2;d++); if(n==Mod(1,2)&&n!=1,n=3*n+1;c++));c/d
    print1(2,", "); n=2; p=Tratio(2); while(n,t=Tratio(n+1); if(p>=t,n+=2); if(p
    				

Extensions

Corrected and extended by Sean A. Irvine, Derek Orr, and David Consiglio, Jr., Nov 23 2015
a(16) from David Consiglio, Jr. and Sean A. Irvine, Nov 26 2015
a(17) added by Dmitry Kamenetsky, Sep 23 2016

A274472 Number of iterations of the Collatz recursion required to reach a prime number.

Original entry on oeis.org

2, 0, 0, 1, 0, 1, 0, 2, 3, 1, 0, 2, 0, 1, 2, 3, 0, 4, 0, 2, 6, 1, 0, 3, 3, 1, 2, 2, 0, 3, 0, 4, 6, 1, 2, 5, 0, 1, 2, 3, 0, 7, 0, 2, 4, 1, 0, 4, 3, 4, 6, 2, 0, 3, 2, 3, 3, 1, 0, 4, 0, 1, 17, 5, 6, 7, 0, 2, 5, 3, 0, 6, 0, 1, 2, 2, 4, 3, 0, 4, 3, 1, 0, 8, 8, 1, 2
Offset: 1

Author

Matthew Campbell, Jun 24 2016

Keywords

Comments

If n is prime then a(n)=0. If n is composite then a(n)=A280929(n). - Dmitry Kamenetsky, Jan 11 2017

Crossrefs

Programs

  • Mathematica
    Table[Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, ! PrimeQ@ # &] - 1, {n, 120}] (* Michael De Vlieger, Jun 26 2016 *)
  • PARI
    a(n) = my(i=0, k=n); while(!ispseudoprime(k), if(k%2==0, k=k/2, k=3*k+1); i++); i
    for(n=1, 87, print1(a(n), ", ")) \\ Felix Fröhlich, Jun 24 2016

Extensions

More terms from Felix Fröhlich, Jun 24 2016

A288493 First differences of A006878 (record new trajectory lengths of Collatz function) (Hailstone sequence).

Original entry on oeis.org

1, 6, 1, 8, 3, 1, 3, 88, 1, 3, 3, 3, 3, 3, 3, 13, 1, 26, 8, 3, 1, 26, 8, 21, 24, 6, 8, 3, 3, 26, 3, 13, 16, 11, 3, 21, 8, 3, 57, 6, 21, 39, 16, 3, 3, 26, 3, 3, 21, 13, 16, 52, 21, 3, 3, 13, 1, 39, 205, 1, 3, 3, 8, 1, 21, 1, 13, 8, 42, 37, 44, 1, 21, 31, 26, 3, 6, 1, 8, 6, 8, 13, 52, 1, 13, 3, 8, 3, 13, 8, 52, 3, 26, 3, 3, 106, 1, 13, 3, 3, 16, 3, 13, 16, 21, 13, 8
Offset: 1

Author

David Rabahy, Jun 13 2017

Keywords

Comments

The sequence appears to return to 1 again and again forever when the minimal possible new record of just (previous record + 1) is reached at the latest possible value of 2X. Through 129 there are only 2 entries, a(17) and a(21), that are a minimal new record but aren't 2X.

Examples

			For n = 3 the difference between A006878(4) = 8 and A006878(3) = 7 is 1.
		

Crossrefs

Programs

  • Mathematica
    (* This script is not suitable to compute a large number of terms. *)
    terms = 40; steps[x0_] := steps[x0] = Block[{x = x0, nos = 0}, While[x != 1, If[Mod[x, 2] == 0, x = x/2, x = 3*x + 1]; nos++]; nos]; b[1] = 1; b[n_] := b[n] = Block[{x = b[n - 1] + 1}, record = steps[x - 1]; While[steps[x] <= record, x++]; x];
    A006877 = Table[Print[b[n]]; b[n], {n, 1, terms+1}];
    A006878 = steps /@ A006877;
    Differences[A006878] (* Jean-François Alcover, Jun 15 2017 *)

A346591 Composite numbers k such that A006577(k) sets a new record.

Original entry on oeis.org

4, 6, 9, 18, 25, 27, 54, 108, 129, 171, 231, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 106239, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799, 1117065, 1501353, 1723519
Offset: 1

Author

Hugo Pfoertner, Jul 28 2021

Keywords

Crossrefs

A006877 is the union of A244638 and this sequence.

Programs

  • Mathematica
    s[n_]:=s[n]=(i=0;r=n;While[r!=1,i++;If[EvenQ@r,r=r/2,r=r*3+1]];i);
    lst={};max=1;Do[If[!PrimeQ@k,t=s[k];If[t>max,AppendTo[lst,k];max=t]],{k,10^4}];lst (* Giorgos Kalogeropoulos, Jul 28 2021 *)
  • PARI
    a6577(n0)={my(n=n0,k=0);while(n>1,k++;n=if(n%2,3*n+1,n/2));k};
    a346591(limit)={msteps=0;forcomposite(c=4,limit,my(m=a6577(c));if(m>msteps,print1(c,", ");msteps=m))};
    a346591(2000000)

A352907 Records in the number of iterations in the 3x+1 sequences required to reach a power of 2.

Original entry on oeis.org

0, 3, 4, 12, 15, 16, 19, 107, 108, 111, 114, 117, 120, 123, 126, 139, 140, 166, 174, 177, 178, 204, 212, 233, 257, 263, 271, 274, 277, 303, 306, 319, 335, 346, 349, 370, 378, 381, 438, 444, 465, 504, 520, 523, 526, 552, 555, 558, 579, 592, 608, 660, 681, 684
Offset: 1

Author

Omar E. Pol, Apr 07 2022

Keywords

Comments

Records of the number of nonpowers of 2 in the sequences 3x+1.
Is this a finite sequence?

Crossrefs

Records in A208981.
Cf. A352939 (first differences).
Cf. A347270 (gives all 3x+1 sequences).

Programs

  • Mathematica
    f[n_] := -1 + Length @ NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, !IntegerQ @ Log[2, #] &]; Union @ FoldList[Max, Array[f, 10^5]] (* Amiram Eldar, Apr 08 2022 *)

Extensions

More terms from Alois P. Heinz, Apr 07 2022

A352939 First differences of the records in the number of iterations of the 3x+1 sequences required to reach a power of 2.

Original entry on oeis.org

3, 1, 8, 3, 1, 3, 88, 1, 3, 3, 3, 3, 3, 3, 13, 1, 26, 8, 3, 1, 26, 8, 21, 24, 6, 8, 3, 3, 26, 3, 13, 16, 11, 3, 21, 8, 3, 57, 6, 21, 39, 16, 3, 3, 26, 3, 3, 21, 13, 16, 52, 21, 3, 3, 13, 1, 39, 205, 1, 3, 3, 8, 1, 21, 1, 13, 8, 42, 37, 44, 1, 21, 31, 26, 3, 6, 1, 8, 6, 8, 13, 52, 1, 13, 3, 8, 3, 13, 8, 52, 3, 26, 3
Offset: 1

Author

Omar E. Pol, Apr 07 2022

Keywords

Comments

First differences of the records in the number of nonpowers of 2 in the sequences 3x+1.
Is this a finite sequence?
Closely related to A288493 (perhaps the same after initial terms). - R. J. Mathar, May 20 2022

Examples

			The first 10 terms of A208981 are 0, 0, 3, 0, 1, 4, 12, 0, 15, 2. The records are 0, 3, 4, 12, 15. The first differences of these records are 3, 1, 8, 3, the same as the first four terms of this sequence.
		

Crossrefs

First differences of A352907.
Cf. A347270 (gives all 3x+1 sequences).

Programs

  • Mathematica
    f[n_] := -1 + Length @ NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, ! IntegerQ @ Log[2, #] &]; Differences @ Union @ FoldList[Max, Array[f, 10^5]] (* Amiram Eldar, Apr 08 2022 *)

Extensions

More terms from Paolo Xausa, Jun 22 2022
Previous Showing 11-20 of 29 results. Next