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.

A376833 Second smallest prime factor of numbers m that are both squarefree and composite.

Original entry on oeis.org

3, 5, 7, 5, 7, 11, 13, 3, 11, 17, 7, 19, 13, 3, 23, 17, 11, 19, 29, 31, 13, 3, 23, 5, 37, 11, 3, 41, 17, 43, 29, 13, 31, 47, 19, 3, 5, 53, 5, 37, 3, 23, 59, 17, 61, 41, 43, 5, 19, 67, 3, 47, 71, 13, 29, 73, 7, 31, 79, 53, 23, 5, 83, 5, 3, 59, 89, 7, 61, 37, 3
Offset: 1

Views

Author

Michael De Vlieger, Oct 05 2024

Keywords

Examples

			Let b(n) = A120944(n).
a(1) = 3 since b(1) = 6, and 3 is the second smallest prime factor.
a(2) = 5 since b(2) = 10, and 5 is the second smallest prime factor.
Table showing select values of a(n):
    n   b(n)          a(n)
  -----------------------
   1    6 = 2*3        3
   2   10 = 2*5        5
   3   14 = 2*7        7
   4   15 = 3*5        5
   5   21 = 3*7        7
   6   22 = 2*11      11
   7   26 = 2*13      13
   8   30 = 2*3*5      3
  14   42 = 2*3*7      3
  22   66 = 2*3*11     3
  24   70 = 2*5*7      5
  82  210 = 2*3*5*7    3
		

Crossrefs

Programs

  • Mathematica
    Map[FactorInteger[#][[2, 1]] &, Select[Range[250], And[SquareFreeQ[#], CompositeQ[#]] &]]
  • Python
    from math import isqrt
    from sympy import primepi, mobius, primefactors
    def A376833(n):
        def f(x): return n+1+primepi(x)+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n+1, f(n+1)
        while m != k:
            m, k = k, f(k)
        return primefactors(m)[1] # Chai Wah Wu, Oct 06 2024

Formula

a(n) = A119288(A120944(n)).
For even squarefree semiprime A120944(n) = 2*p with odd prime p, a(n) = p sets a record in this sequence.