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.

A079068 Largest prime less than greatest prime factor of n but not dividing n, or 1 if no such prime exists.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 20 2002

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) local p, s; s:= numtheory[factorset](n);
          if s={} then return 1
        else p:= max(s);
             do if p=2 then return 1 else p:= prevprime(p) fi;
                if not p in s then return p fi
             od
          fi
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 03 2019
  • Mathematica
    a[n_] := Module[{p}, For[p = NextPrime[FactorInteger[n][[-1, 1]], -1], p>1, p = NextPrime[p, -1], If[!Divisible[n, p], Return[p]]]; 1];
    Array[a, 100] (* Jean-François Alcover, Nov 04 2020 *)