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.

A284260 Greatest prime dividing n which is less than A020639(n)^2, where A020639(n) is the smallest prime dividing n, a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Crossrefs

Cf. A251726 (gives n > 1 such that a(n) = A006530(n)).

Programs

  • Mathematica
    Table[Last[Function[s, Select[s, # < First[s]^2 &]]@ FactorInteger[n][[All, 1]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    gpf(n) = if(n>1, vecmax(factor(n)[,1]),1);
    for(n=1, 150, print1(gpf(n/a(n)),", ")) \\ Indranil Ghosh, Mar 24 2017, after David A. Corneth
    
  • Python
    from sympy import primefactors
    def A(n):
        for i in primefactors(n):
            if i>min(primefactors(n))**2: return i
        return 1
    def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
    def gpf(n): return 1 if n<2 else max(primefactors(n))
    print([gpf(n//a(n)) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284260 n) (A006530 (A284255 n)))
    

Formula

a(n) = A006530(A284255(n)).