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
Robert Israel, Table of n, a(n) for n = 1..10000 (first 150 terms from Daniel Zhu).
T. Chinburg and M. Henriksen, Sums of k-th powers in the ring of polynomials with integer coefficients, Acta Arithmetica, 29 (1976), 227-250.
Daniel G. Zhu, A correction to a result of Chinburg and Henriksen on powers of integer polynomials, arXiv:2402.10121 [math.NT], 2024.
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:
map(f, [$1..100]); # Robert Israel, Mar 10 2024
MATHEMATICA
a[n_] := If[PrimeQ[n], 1, With[{s = Times @@ FactorInteger[n][[All, 1]]}, If[Mod[n, 6] == 0, 2s, s]]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 25 2024 *)
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
More terms from Emeric Deutsch, Jan 24 2005
Incorrect terms corrected by Daniel Zhu, Feb 16 2024
STATUS
approved