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

A304524 Consider the ratio res(p) = 2^A006666(p) / (p*3^A006667(p)) where p is prime. The prime numbers in this sequence are those for which res(p) sets a new record.

Original entry on oeis.org

2, 3, 7, 37, 43, 229, 271, 379, 673, 839, 1987, 5297, 25111, 44641, 50221, 94057, 334423, 1189057, 1759579, 2505337, 28153249, 46869157, 87780541, 584543567, 768901097
Offset: 1

Views

Author

Michel Lagneau, May 14 2018

Keywords

Comments

Is the sequence finite?
In the general case, the residue of a number n in the 3x+1 problem is defined as the ratio res(n) = 2^A006666(n) / (n*3^A006667(n)) (see A127789).
Conjecture: for all prime p, res(p) < res(993) = 2^61/(3^32*993) = 1.253142... (see A304174).

Examples

			From _Jon E. Schoenfield_, May 23 2018: (Start)
Let D = A006666(p) and U = A006667(p); then res(p) = 2^D/(p*3^U). It seems clear that res(993) - res(p) is converging toward a positive value:
.
          p |   D |  U |     res(p)      | res(993)-res(p)
  ----------+-----+----+-----------------+----------------
          2 |   1 |  0 | 1               | 0.2531421443...
          3 |   5 |  2 | 1.1851851851... | 0.0679569592...
          7 |  11 |  5 | 1.2039976484... | 0.0491444959...
         37 |  15 |  6 | 1.2148444741... | 0.0382976702...
         43 |  20 |  9 | 1.2389111604... | 0.0142309838...
        229 |  24 | 10 | 1.2407145246... | 0.0124276197...
        271 |  29 | 13 | 1.2425797507... | 0.0105623936...
        379 |  39 | 19 | 1.2480350469... | 0.0051070974...
        673 |  43 | 21 | 1.2494773856... | 0.0036647587...
        839 |  56 | 29 | 1.2514151532... | 0.0017269911...
       1987 |  62 | 32 | 1.2525114739... | 0.0006306704...
       5297 |  65 | 33 | 1.2529055685... | 0.0002365758...
      25111 |  72 | 36 | 1.2529406796... | 0.0002014647...
      44641 |  76 | 38 | 1.2529625095... | 0.0001796348...
      50221 |  73 | 36 | 1.2529656281... | 0.0001765162...
      94057 |  85 | 43 | 1.2529812032... | 0.0001609411...
     334423 |  90 | 45 | 1.2529882803... | 0.0001538640...
    1189057 |  95 | 47 | 1.2529909733... | 0.0001511710...
    1759579 | 113 | 58 | 1.2529910420... | 0.0001511023...
    2505337 | 104 | 52 | 1.2529915763... | 0.0001505680...
   28153249 | 117 | 58 | 1.2529917096... | 0.0001504347...
   46869157 | 132 | 67 | 1.2529917720... | 0.0001503722...
   87780541 | 144 | 74 | 1.2529919281... | 0.0001502162...
  584543567 | 161 | 83 | 1.2529919325... | 0.0001502118...
  768901097 | 182 | 96 | 1.2529919396... | 0.0001502047...
(End)
		

Crossrefs

Programs

  • Mathematica
    lst={2};Print["a(n)"," ","A006667(a(n))"," ","A006666(a(n))","       ","res(a(n))"];q=1;Collatz[n_]:=NestWhileList[If[EvenQ[#],#/2,3 #+1]&,Prime[n],#>1&];nn=10000;t={};n=0;While[Length[t]5000,Break[]];q=Prime[n]*3^od/2^ev]];lst

Extensions

a(23)-a(24) from Jon E. Schoenfield, May 19 2018

A381762 Numbers k such that S(k) sets a new record, where S(k) denotes the sum of the reciprocals of odd elements in the Collatz sequence which starts at k.

Original entry on oeis.org

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

Views

Author

Barak Manos, Mar 06 2025

Keywords

Comments

This sequence is conjectured to be finite.

Crossrefs

Cf. A304174.
Cf. A127789.

Programs

  • Mathematica
    f[n_] := Total[1/Select[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, # > 1 &], OddQ]]; seq[lim_] := Module[{s = {}, fm = 0, f1}, Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, lim}]; s]; seq[1000] (* Amiram Eldar, Mar 06 2025 *)
  • Python
    from fractions import Fraction
    def S(n):
        arr = []
        while True:
            n //= (n - (n & (n - 1)))
            arr.append(n)
            if n == 1:
                break
            n = 3 * n + 1
        return sum(Fraction(1, x) for x in arr)
    m = 0
    for n in range(1, 1000):
        k = S(n)
        if m < k:
            m = k
            print(n)
Showing 1-2 of 2 results.