OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
From Amiram Eldar, Jul 13 2023: (Start)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. (End)
EXAMPLE
3-smooth numbers are those expressible as 2^i*3^j, where i, j >= 0 (A003586). The tenth 3-smooth number is 18, in which the largest square is 9. 18/9 = 2, so a(10)=2.
MAPLE
N:= 10^20: # to use all 3-smooth numbers up to N
f:= proc(x) local a, b;
a:= padic:-ordp(x, 2) mod 2; b:= padic:-ordp(x, 3) mod 2;
2^a*3^b
end proc:
map(f, sort([seq(seq(3^i*2^j, j=0..ilog2(N/3^i)), i=0..floor(log[3](N)))])); # Robert Israel, Dec 22 2017
MATHEMATICA
Reap[Do[f = FactorInteger[n]; If[f[[-1, 1]] <= 3, Sow[Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]}& /@ f)]], {n, 10^5}]][[2, 1]] (* Jean-François Alcover, Feb 02 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Neil Fernandez, Jul 03 2001
EXTENSIONS
More terms from Robert Israel, Dec 22 2017
STATUS
approved