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.

A046028 Largest multiple prime factor of the n-th nonsquarefree number (A013929).

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 5, 3, 2, 2, 3, 2, 2, 3, 2, 7, 5, 2, 3, 2, 2, 3, 2, 2, 3, 5, 2, 2, 3, 2, 2, 3, 2, 2, 7, 3, 5, 2, 3, 2, 2, 3, 2, 11, 2, 5, 3, 2, 2, 3, 2, 2, 3, 7, 2, 5, 2, 3, 2, 2, 3, 2, 2, 13, 3, 2, 5, 2, 3, 2, 2, 3, 2, 7, 3, 5, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 11, 3, 2, 7, 2, 5, 3, 2, 2, 3
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a046028 n = a046028_list !! (n-1)
    a046028_list = f 1 where
       f x | null zs   = f (x + 1)
           | otherwise = (fst $ head zs) : f (x + 1)
           where zs = reverse $ filter ((> 1) . snd) $
                      zip (a027748_row x) (a124010_row x)
    -- Reinhard Zumkeller, Dec 29 2012
    
  • Mathematica
    Select[ FactorInteger[#]//Reverse, #[[2]]>1&, 1][[1, 1]]& /@ Select[ Range[300], !SquareFreeQ[#]& ] (* Jean-François Alcover, Nov 06 2012 *)
  • Python
    from math import isqrt
    from sympy import mobius, factorint
    def A046028(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        s = factorint(m)
        return next(p for p in sorted(s,reverse=True) if s[p]>1) # Chai Wah Wu, Jul 22 2024

Formula

a(n) = A249740(A013929(n)). - Amiram Eldar, Feb 11 2021