|
|
A005730
|
|
Related to n-th powers of polynomials.
(Formerly M0183)
|
|
4
|
|
|
1, 1, 1, 2, 1, 12, 1, 2, 3, 10, 1, 12, 1, 14, 15, 2, 1, 12, 1, 10, 21, 22, 1, 12, 5, 26, 3, 14, 1, 60, 1, 2, 33, 34, 35, 12, 1, 38, 39, 10, 1, 84, 1, 22, 15, 46, 1, 12, 7, 10, 51, 26, 1, 12, 55, 14, 57, 58, 1, 60, 1, 62, 21, 2, 65, 132, 1, 34, 69, 70, 1, 12, 1, 74, 15, 38, 77, 156, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
The originally published terms of this sequence were incorrect for a small number of n, the smallest of which is n=14 (see the paper of Zhu for more details). - Daniel Zhu, Feb 16 2024
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 if n is prime, a(n) = 2*s(n) if n is divisible by 6, a(n) = s(n) otherwise, where s(n) is the squarefree kernel of n (A007947); i.e., s(1)=1 and if n = Product(p_i^(e_i)) then s(n) = Product(p_i) [From Zhu]. - Sean A. Irvine, Aug 18 2016 [Corrected by Daniel Zhu, Feb 16 2024]
|
|
MAPLE
|
A7947:= proc(n) convert(numtheory:-factorset(n), `*`) end:
f:= proc(n) if isprime(n) then 1 elif n mod 6 = 0 then 2*A7947(n) else A7947(n) fi end proc:
|
|
MATHEMATICA
|
a[n_] := If[PrimeQ[n], 1, With[{s = Times @@ FactorInteger[n][[All, 1]]}, If[Mod[n, 6] == 0, 2s, s]]];
|
|
PROG
|
(Python)
from math import prod
from sympy import isprime, primefactors
def A005730(n): return 1 if isprime(n) else prod(primefactors(n))<<(not n%6) # Chai Wah Wu, Mar 10 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Incorrect terms corrected by Daniel Zhu, Feb 16 2024
|
|
STATUS
|
approved
|
|
|
|