OFFSET
1,2
COMMENTS
From Robert Israel, Jun 30 2014: (Start)
n is in the sequence iff either
1) for at least one prime p dividing n, the p-adic order of n is congruent to 2 mod 3, or
2) for all primes p dividing n, the p-adic order of n is congruent to 0 mod 3 (and thus n is a cube). (End)
The asymptotic density of this sequence is 1 - zeta(3)/zeta(2) = 0.2692370305... . - Amiram Eldar, Jul 01 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Divisor Product.
MAPLE
filter:= proc(n) local F;
F:= ifactors(n)[2];
F:= convert(map(t -> t[2] mod 3, F), set);
has(F, 2) or F = {0} or F = {};
end proc:
select(filter, [$1..1000]); # Robert Israel, Jun 30 2014
MATHEMATICA
Select[Range[250], IntegerQ[Surd[Times@@Divisors[#], 3]]&] (* Harvey P. Dale, Feb 05 2019 *)
q[n_] := AnyTrue[FactorInteger[n][[;; , 2]], Mod[#, 3] == 2 &]; m = 6; Union[Range[m]^3, Select[Range[m^3], q]] (* Amiram Eldar, Jul 01 2022 *)
PROG
(PARI) is(n)=ispower(n, 3) || #select(e->e%3==2, factor(n)[, 2]) \\ Charles R Greathouse IV, Sep 18 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved