cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A346676 Numbers expressible as 2^x + 3^y where both x and y are positive integers.

This page as a plain text file.
%I A346676 #17 Jul 30 2021 08:29:59
%S A346676 5,7,11,13,17,19,25,29,31,35,41,43,59,67,73,83,85,89,91,97,113,131,
%T A346676 137,145,155,209,245,247,251,259,265,275,283,307,337,371,499,515,521,
%U A346676 539,593,731,733,737,745,755,761,793,857,985,1027,1033,1051,1105,1241
%N A346676 Numbers expressible as 2^x + 3^y where both x and y are positive integers.
%C A346676 All terms have the form 6k +- 1.
%F A346676 { A004050 } minus { A000079, A000244 }.
%o A346676 (PARI) f(x,y) = 2^x + 3^y;
%o A346676 lista(nn) = select(x->(x<=nn), setbinop(f, [1..logint(nn, 2)], [1..logint(nn, 3)])); \\ _Michel Marcus_, Jul 29 2021
%o A346676 (Python)
%o A346676 def aupto(lim):
%o A346676     s, pow3 = set(), 3
%o A346676     while pow3 < lim:
%o A346676         for j in range(1, (lim-pow3).bit_length()):
%o A346676             s.add(2**j + pow3)
%o A346676         pow3 *= 3
%o A346676     return sorted(set(s))
%o A346676 print(aupto(1242)) # _Michael S. Branicky_, Jul 29 2021
%Y A346676 Cf. A000079, A000244, A004050.
%K A346676 nonn
%O A346676 1,1
%A A346676 _Keith Backman_, Jul 28 2021