OFFSET
1,1
COMMENTS
Numbers n such that A006530(n) > 3. - Felix Fröhlich, Dec 22 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..9933
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Jul 06 2016
MATHEMATICA
fQ[n_]:=! PowerMod[6, n, n]==0; Select[Range [100], fQ] (* Vincenzo Librandi, Dec 22 2016 *)
PROG
(PARI) is(n)=n>>=valuation(n, 2); n/=3^valuation(n, 3); n>1 \\ Charles R Greathouse IV, Jul 06 2016; corrected by Michel Marcus, May 19 2022
(Magma) [n: n in [1..100] | not PrimeDivisors(n) subset [2, 3]]; // Vincenzo Librandi, Dec 22 2016
(Python)
from sympy import integer_log
def A059485(n):
def f(x): return n+sum((x//3**i).bit_length() for i in range(integer_log(x, 3)[0]+1))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Sep 16 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Simone Caramel (simonecaramel(AT)libero.it), Feb 04 2001
EXTENSIONS
More terms from Henry Bottomley, Feb 05 2001
STATUS
approved