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.

User: Matthew Russell Downey

Matthew Russell Downey's wiki page.

Matthew Russell Downey has authored 2 sequences.

A360425 Indices of records in A018804.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 28, 30, 36, 40, 42, 48, 54, 56, 60, 72, 80, 84, 90, 105, 108, 120, 140, 144, 168, 180, 210, 240, 252, 270, 280, 288, 300, 330, 336, 360, 420, 480, 504, 540, 600, 630, 660, 720, 840, 990, 1008, 1080, 1200, 1260, 1440
Offset: 1

Author

Matthew Russell Downey, Feb 08 2023

Keywords

Comments

a(n) seems to be divisible by any positive integer as n approaches infinity. Example: There seem to be 6 terms without a 2 (i.e., 1, 3, 5, 9, 15, 105), 14 terms without a 3 (as large as 280), 22 terms without a factor of 4 (as large as 6930), and 29 terms without a 5 (as large as 3276). True for a(n) < 10^8.
For any term a(n) > 1, it seems that there exists at least one term a(x) such that a(x) * prime(y) = a(n) where prime(y) <= (7/2) * A053669(a(x)). True for a(n) < 10^8.
The ratio of prime(n)/a(n) for indices {1..8, 11, 15, 17} is almost 2 (with an error of at most 1 on the numerator). The exact ratios are 2/1, 3/2, 5/3, 7/4, 11/5, 13/6, 17/8, 19/9, 31/15, 47/24, 59/30. - Matthew Russell Downey, Jul 25 2023

Examples

			A018804(36) = 168 is the largest value among the first 36 terms of A018804, so 36 is a term here; since it is the 18th value that sets a new record, a(18) = 36.
		

Crossrefs

Indices of records in A018804. Cf. A000040.

Programs

  • Mathematica
    f[p_, e_] := (e*(p - 1)/p + 1)*p^e; pil[n_] := Times @@ (f @@@ FactorInteger[n]); seq[nmax_] := Module[{p, pm = 0, s = {}}, Do[If[(p = pil[n]) > pm, pm = p; AppendTo[s, n]], {n, 1, nmax}]; s]; seq[1200] (* Amiram Eldar, Feb 13 2023 *)
  • PARI
    f(n) = sumdiv(n, d, n*eulerphi(d)/d); \\ A018804
    lista(nn) = my(r=0, list=List()); for (n=1, nn, my(m=f(n)); if (m > r, listput(list, n); r = m);); Vec(list); \\ Michel Marcus, Feb 26 2023
  • Python
    from sympy import factorint
    from math import prod
    def A018804(m): return prod(p**(e-1)*((p-1)*e+p) for p, e in factorint(m).items())
    record = 0
    for m in range(1, 2000):
      value = A018804(m)
      if value > record:
        record = value
        print(m, end=", ")
    

Formula

Conjecture: a(n) ~ exp(4*(n-1)/21). - Matthew Russell Downey, Jul 25 2023

A339614 Inputs n that yield a record-breaking value of A008908(n)/(log_2(n)+1) for the Collatz conjecture.

Original entry on oeis.org

1, 3, 7, 9, 27, 26623, 35655, 52527, 142587, 156159, 230631, 626331, 837799, 1723519, 3542887, 3732423, 5649499, 6649279, 8400511, 63728127, 3743559068799, 100759293214567, 104899295810901231
Offset: 1

Author

Matthew Russell Downey, Dec 10 2020

Keywords

Comments

The metric A008908(n)/(log_2(n)+1) is always equal to 1 for any power of 2 (where 1 is the smallest possible value).

Examples

			a(1) = 1, which is trivial, because the first element in any sequence is record setting.
a(5) = 27, because A008908(n)/(log_2(n)+1) yields a maximum value at n=27 among the first 27 elements, and there are 4 record-breaking elements beforehand.
		

Crossrefs

Programs

  • Python
    import math
    oeis_A006877 = [1, 2, 3, 6, 7, 9, 18, 25, 27, 54, 73, 97, 129, 171, 231, 313, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 10623, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799, 1117065, 1501353, 1723519, 2298025, 3064033, 3542887, 3732423, 5649499, 6649279, 8400511, 11200681, 14934241, 15733191, 31466382, 36791535, 63728127]
    def stopping_time(n):
        time = 1
        while n>1:
            n = 3*n + 1 if n & 1 else n//2
            time += 1
        return time
    def stopping_time_metric(n):
        time = stopping_time(n)
        logarithmic_distance = (math.log(n, 2)+1)
        return float(time/logarithmic_distance)
    result = []
    record_input = oeis_A006877[0]
    record_stopping_time_metric = stopping_time_metric(record_input)
    result.append(record_input)
    for n in range(1, len(oeis_A006877)):
        current_input = oeis_A006877[n]
        current_stopping_time_metric = stopping_time_metric(current_input)
        if current_stopping_time_metric > record_stopping_time_metric:
            record_input = current_input
            record_stopping_time_metric = current_stopping_time_metric
            result.append(record_input)
    for n in range(len(result)):
        print(result[n], end=", ")