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: William Hu

William Hu's wiki page.

William Hu has authored 3 sequences.

A375019 Positive integers n such that (1, n^2 - 1, n^2) is an abc triple.

Original entry on oeis.org

3, 7, 8, 9, 15, 17, 25, 26, 27, 31, 48, 49, 55, 63, 64, 80, 81, 97, 99, 125, 127, 161, 224, 225, 242, 243, 244, 251, 255, 288, 289, 325, 343, 351, 361, 449, 485, 487, 511, 512, 513, 575, 577, 624, 625, 649, 675, 676, 687, 721, 728, 729, 783, 960, 961, 999
Offset: 1

Author

William Hu, Aug 09 2024

Keywords

Comments

If a number appears in this sequence, so do all of its powers. This immediately implies that this sequence is infinite.
All the terms A216323(n), A216323(n)+1, and 2*A216323(n)+1 appear in this sequence.
The highest known quality abc triple of this form occurs with n = 49, with quality 1.4557, for the triple (1, 2400, 2401).

Examples

			For a(1) = 3: (a,b,c) = (1,8,9) is an abc triple. Reason: rad(1*8*9) = rad(72) = 6. Since 6 < 3^2, 3 is a term of this sequence.
		

Crossrefs

Programs

  • PARI
    is_a375019(n) = factorback(factorint((n-1)*n*(n+1))[,1]) < n^2 \\ Hugo Pfoertner, Aug 09 2024
  • Python
    """
    Note that this code generates all terms <= n, not the nth term.
    This code can be further optimized with an O(n log n) sieve, which we do not write here.
    """
    n = 10**5  # replace this number with whatever limit
    from sympy import primefactors, prod
    def rad(n): return 1 if n < 2 else prod(primefactors(n))
    # Function to help determine whether a value is a term.
    def is_term(k: int):
        # Calculate rad((k^2-1)*k^2) = rad((k-1)*k*(k+1)).
        rad_abc = rad(k-1) * rad(k) * rad(k+1)
        if k % 2 == 1:
            rad_abc //= 2  # 2 is double-counted as a prime factor. No other multiple-counts are possible.
        return rad_abc < k**2
    # The final sequence.
    a = list(filter(is_term, range(2, n+1))) # William Hu, Aug 09 2024
    

A367854 Indices at which record high values occur in A367821.

Original entry on oeis.org

1, 2, 4, 6, 72, 75, 152, 518, 631, 1585, 2512, 4217, 5275, 13895, 14678, 53367, 177828, 464159, 1154782, 2154435, 3162278, 4641589, 8483429, 8576959, 13894955, 15848932, 21544347, 68129207, 74989421, 100000001, 114504757, 170125428, 517947468, 1000000001
Offset: 1

Author

William Hu, Dec 02 2023

Keywords

Comments

Each term after a(1) = 1 is the smallest integer whose base-10 logarithm exceeds some ratio of integers N/D with D <= 21 = floor(1/(1 - log_10(9))); see Example section. - Jon E. Schoenfield, Dec 03 2023

Examples

			From _Jon E. Schoenfield_, Dec 03 2023: (Start)
The following table illustrates how the base-10 logarithm of each term from a(2) through a(17) is slightly larger than a ratio of integers N/D with D <= 21.
.
   n   a(n)    log_10(a(n))    N/D   log_10(a(n))*D
  --  ------  --------------  -----  --------------
   2       2  0.301029995...   3/10   3.01029995...
   3       4  0.602059991...   3/5    3.01029995...
   4       6  0.778151250...   7/9    7.00336125...
   5      72  1.857332496...  13/7   13.00132747...
   6      75  1.875061263...  15/8   15.00049010...
   7     152  2.181843587...  24/11  24.00027946...
   8     518  2.714329759...  19/7   19.00030831...
   9     631  2.800029359...  14/5   14.00014679...
  10    1585  3.200029266...  16/5   16.00014633...
  11    2512  3.400019635...  17/5   17.00009817...
  12    4217  3.625003601...  29/8   29.00002880...
  13    5275  3.722222463...  67/18  67.00000435...
  14   13895  4.142858551...  29/7   29.00000985...
  15   14678  4.166666883...  25/6   25.00000130...
  16   53367  4.727272789...  52/11  52.00000068...
  17  177828  5.250000144...  21/4   21.00000057...
  ...
E.g., log_10(a(17)) = log_10(177828) slightly exceeds 21/4; 10^(21/4) = 10^5 * 10^(1/4) = 100000 * 1.77827941..., so 177828^k is slightly farther above the nearest lower power of 10 than 177828^(k-4) is. This near-periodic behavior of the mantissas, with their slow upward creep at every 4th exponent, explains why none of the mantissas of 177828^k begin with 9 until k gets very large:
.
     k          177828^k
  -------  ------------------
        1  1.7782800e+0000005
        2  3.1622799e+0000010
        3  5.6234188e+0000015
        4  1.0000013e+0000021
        5  1.7782824e+0000026
        6  3.1622840e+0000031
        7  5.6234263e+0000036
        8  1.0000027e+0000042
        9  1.7782847e+0000047
       10  3.1622882e+0000052
       11  5.6234338e+0000057
      ...
       15  5.6234412e+0000078
       19  5.6234487e+0000099
       23  5.6234562e+0000120
      ...
  1417539  8.9999657e+7442079
  1417543  8.9999776e+7442100
  1417547  8.9999896e+7442121
  1417551  9.0000015e+7442142
(End)
		

Crossrefs

Cf. A367821.

Extensions

More terms from Jon E. Schoenfield, Dec 03 2023

A367821 a(n) = first exponent k such that n^k starts with 9 or -1 if n is a power of 10.

Original entry on oeis.org

-1, 53, 2, 78, 10, 176, 13, 21, 1, -1, 24, 25, 26, 34, 17, 39, 13, 39, 25, 53, 3, 32, 11, 21, 5, 12, 37, 29, 41, 2, 2, 89, 25, 15, 11, 88, 7, 12, 5, 78, 13, 8, 11, 45, 3, 3, 55, 22, 13, 10, 24, 60, 11, 15, 4, 4, 37, 17, 22, 176, 14, 5, 5, 26, 43, 39, 6, 6, 25, 13, 7
Offset: 1

Author

William Hu, Dec 01 2023

Keywords

Comments

First k such that log_10(9) <= fractional part of k*log_10(n) < 1.
For a non-power of 10, the leading digits of the powers of n follow Benford's law, therefore making 9 the least common leading digit of powers of n.

Examples

			a(2) = 53 because smallest power of 2 that starts with 9 is 2^53 = 9007199254740992. See A018856.
a(3) = 2 because 3^2 = 9.
		

Crossrefs

Cf. A018856, A098174, A367854 (record high indices).

Programs

  • PARI
    a(n) = my(t); if ((n==1) || (n==10) || (ispower(n,,&t) && (t==10)), -1, my(k=1); while (digits(n^k)[1] != 9, k++); k); \\ Michel Marcus, Dec 03 2023
  • Python
    def a(n: int) -> int:
        s = str(n)
        if n <= 1 or (s[0] == '1' and set(s[1:]) == {'0'}):
            return -1
        pwr, e = 1, 0
        while str(pwr)[0] != '9':
            pwr *= n
            e += 1
        return e