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.

A284253 a(n) = n / A284252(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 11, 12, 13, 2, 15, 16, 17, 18, 19, 4, 21, 2, 23, 24, 25, 2, 27, 4, 29, 6, 31, 32, 3, 2, 35, 36, 37, 2, 3, 8, 41, 6, 43, 4, 45, 2, 47, 48, 49, 10, 3, 4, 53, 54, 55, 8, 3, 2, 59, 12, 61, 2, 63, 64, 65, 6, 67, 4, 3, 14, 71, 72, 73, 2, 75, 4, 77, 6, 79, 16, 81, 2, 83, 12, 85, 2, 3, 8, 89, 18, 91, 4, 3, 2, 95, 96, 97, 14, 9, 20, 101, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{p = First /@ FactorInteger[n]}, n / SelectFirst[p, # > p[[1]]^2 &, 1]]; Array[a, 120] (* Giovanni Resta, 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));
    for(n=1, 151, print1(n/a(n),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def a(n):
        pf = primefactors(n)
        if pf: min_pf2 = min(pf)**2
        for i in pf:
            if i > min_pf2: return i
        return 1
    print([n//a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284253 n) (/ n (A284252 n)))
    

Formula

a(n) = n / A284252(n).