OFFSET
1,2
COMMENTS
Odd 5-smooth numbers (A051037). -Reinhard Zumkeller,Sep 18 2005
LINKS
Reinhard Zumkeller,Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ 1/sqrt(15)*exp(sqrt(2*log(3)*log(5)*n)) asymptotically. -Benoit Cloitre,Jan 22 2002
The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(15*n)*x^n/(1 - x^n), where mu(n) is the Möbius functionA008683.Cf. with the formula of Hanna inA051037.-Peter Bala,Mar 18 2019
Sum_{n>=1} 1/a(n) = (3*5)/((3-1)*(5-1)) = 15/8. -Amiram Eldar,Sep 22 2020
MAPLE
isA003593:= proc(n)
if n = 1 then
true;
else
return (numtheory[factorset](n) minus {3, 5} = {} );
end if;
end proc:
A003593:= proc(n)
option remember;
if n = 1 then
1;
else
for a from procname(n-1)+1 do
if isA003593(a) then
return a;
end if;
end do:
end if;
end proc:
seq(A003593(n), n=1..30); #R. J. Mathar,Aug 04 2016
MATHEMATICA
fQ[n_]:= PowerMod[15, n, n] == 0; Select[Range[60000], fQ] (*Bruno Berselli,Sep 24 2012 *)
PROG
(PARI) list(lim)=my(v=List(), N); for(n=0, log(lim)\log(5), N=5^n; while(N<=lim, listput(v, N); N*=3)); vecsort(Vec(v)) \\Charles R Greathouse IV,Jun 28 2011
(PARI) is(n)=n==3^valuation(n, 3)*5^valuation(n, 5) \\Charles R Greathouse IV,Apr 23 2013
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a003593 n = a003593_list!! (n-1)
a003593_list = f (singleton 1) where
f s = m: f (insert (3*m) $ insert (5*m) s') where
(m, s') = deleteFindMin s
--Reinhard Zumkeller,Sep 13 2011
(Magma) [n: n in [1..60000] | PrimeDivisors(n) subset [3, 5]]; //Bruno Berselli,Sep 24 2012
(GAP) Filtered([1..60000], n->PowerMod(15, n, n)=0); #Muniru A Asiru,Mar 19 2019
(Python)
from sympy import integer_log
defA003593(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(integer_log(x//5**i, 3)[0]+1 for i in range(integer_log(x, 5)[0]+1))
return bisection(f, n, n) #Chai Wah Wu,Oct 22 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved