login
A334039
For any n > 0: start with x = n; for k = 1..n, if k divides x then divide x by k; a(n) corresponds to the final value of x.
1
1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 5, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 7, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 5, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1
OFFSET
1,4
COMMENTS
Every integer appears infinitely many times in this sequence.
LINKS
FORMULA
a(s) = 1 for any squarefree number s.
a(p^2) = p for any prime number p.
a(p^k) = p^A002262(k) for any k >= 0 and prime number p.
a(n!) = 1 for any n >= 0.
a(n! * k) = k for any n >= 1 and k = 1..n.
PROG
(PARI) a(n) = { fordiv (n, d, if (n%d==0, n\=d); if (n<=d, return (n))) }
CROSSREFS
Cf. A002262.
Sequence in context: A134505 A329376 A336643 * A076933 A071974 A056622
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 13 2020
STATUS
approved