login
A392782
Complement of A000792.
1
5, 7, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
OFFSET
1,1
COMMENTS
Numbers not of the form 3^k, 2*3^k, 4*3^k.
FORMULA
For n>=12, a(n) = n+m+1 if n+m>=A000792(m+1) and a(n) = n+m otherwise where m = A349983(n).
MATHEMATICA
Select[Range[77], Or[Divisible[#, 8], FactorInteger[#][[-1, 1]] > 3] &] (* Michael De Vlieger, Jan 24 2026 *)
PROG
(Python)
from sympy import integer_log
def A000792(n):
q, r = divmod(n, 3)
return int((3, 4, 6)[r]*3**(q-1))
def A392782(n):
if n<12: return (5, 7, 8, 10, 11, 13, 14, 15, 16, 17, 19)[n-1]
def f(x): return 3+integer_log(x, 3)[0]+integer_log(x>>1, 3)[0]+integer_log(x>>2, 3)[0]
return n+(m:=f(n))+(n+m>=A000792(m+1))
CROSSREFS
Sequence in context: A047479 A080720 A189034 * A112250 A192067 A347653
KEYWORD
nonn,easy
AUTHOR
Chai Wah Wu, Jan 23 2026
STATUS
approved