OFFSET
1,1
COMMENTS
That is, if n = p1^e1 p2^e2 ... pr^er for distinct primes p1, p2,..., pr, then one of the exponents must be 3 for n to be in this sequence.
The asymptotic density of this sequence is 1 - Product_{p prime} (1 - 1/p^3 + 1/p^4) = 0.0952910730... - Amiram Eldar, Nov 14 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
8=2^3, 24=2^3*3, 27=3^3, 40=2^3*5, ...
MAPLE
filter:= proc(x) local F; F:= map(t->t[2], ifactors(x)[2]); has(F, 3) end proc:
select(filter, [$1..1000]); # Robert Israel, Jan 11 2015
# alternative:
isA176297 := proc(n)
local p;
for p in ifactors(n)[2] do
if op(2, p) = 3 then
return true;
end if;
end do:
false ;
end proc: # R. J. Mathar, Dec 08 2015
MATHEMATICA
f[n_]:=MemberQ[Last/@FactorInteger[n], 3]; Select[Range[6!], f]
PROG
(PARI) isok(n) = vecsearch(vecsort(factor(n)[, 2]), 3); \\ Michel Marcus, Jan 11 2015
(Python)
from sympy import factorint
def ok(n): return 3 in [e for e in factorint(n).values()]
print(list(filter(ok, range(713)))) # Michael S. Branicky, Aug 24 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 07 2010
STATUS
approved