OFFSET
1,1
COMMENTS
All terms have the form 6k +- 1.
PROG
(PARI) f(x, y) = 2^x + 3^y;
lista(nn) = select(x->(x<=nn), setbinop(f, [1..logint(nn, 2)], [1..logint(nn, 3)])); \\ Michel Marcus, Jul 29 2021
(Python)
def aupto(lim):
s, pow3 = set(), 3
while pow3 < lim:
for j in range(1, (lim-pow3).bit_length()):
s.add(2**j + pow3)
pow3 *= 3
return sorted(set(s))
print(aupto(1242)) # Michael S. Branicky, Jul 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Keith Backman, Jul 28 2021
STATUS
approved