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.

A284600 a(n) = n/(largest prime power dividing n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 3, 1, 2, 1, 4, 1, 6, 1, 1, 3, 2, 5, 4, 1, 2, 3, 5, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 2, 5, 7, 3, 2, 1, 12, 1, 2, 7, 1, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 12, 5, 2, 3, 8, 1, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 30 2017

Keywords

Comments

a(n) = smallest positive number k such that n/k is a prime power.

Examples

			a(12) = 3 because 12 = 2^2*3 therefore 12/(largest prime power dividing 12) = 12/4 = 3.
		

Crossrefs

Has same beginning as A052128 and A114536 but is strictly different from those two sequences.

Programs

  • Maple
    f:= n ->  n /max(map(t -> t[1]^t[2], ifactors(n)[2])):
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Apr 09 2017
  • Mathematica
    Join[{1}, Table[n/Last[Select[Divisors[n], PrimePowerQ[#1] &]], {n, 2, 90}]]
  • Python
    from sympy import lcm
    def a003418(n): return 1 if n<1 else lcm(range(1, n + 1))
    def a(n):
        m=1
        while True:
            if a003418(m)%n==0: return m
            else: m+=1
    print([n//a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017

Formula

a(n) = n/A034699(n).
a(n) = 1 if n is a prime power (A000961).
a(n) = 2 if n is a twice odd prime power (A278568).