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.
%I A375258 #30 Feb 19 2025 12:12:03 %S A375258 1,2,3,-1,6,81,8,5,28,27,-1,20,7,30,2187,128,17,14,15,244,243,-1,68, %T A375258 25,46,31,246,-1,512,8193,26,23,94,63,6570,19683,-1,80,131,78,47,126, %U A375258 247,2430,59049,2048,1025,134,53,62,95,254,255,19926,531441,-1,2050,161,212,79,222,127,766,2431 %N A375258 Array read by antidiagonals: T(k,n) is the least positive integer whose sum of base-2 digits is k and sum of base-3 digits is n, or -1 if there is none. %C A375258 T(k,n) is the least positive integer x, if it exists, such that A000120(x) = k and A053735(x) = n. %C A375258 T(k,n) == n (mod 2) unless T(k,n) = -1, since A053735(x) == x (mod 2). In particular, T(1, n) = -1 if n >= 3 is odd. %C A375258 Dimitrov and Howe prove that for n > 25, the sum of binary digits of 3^n is > 22. In particular, this implies T(7,1) = T(12,1) = T(21,1) = -1, since none of the first 25 powers of 3 work. %H A375258 Robert Israel, <a href="/A375258/b375258.txt">Table of n, a(n) for n = 1..253</a> (first 22 antidiagonals) %H A375258 Vassil S. Dimitrov and Everett W. Howe, <a href="https://arxiv.org/abs/2105.06440">Powers of 3 with few nonzero bits and a conjecture of Erdős</a>, arXiv:2105.06440 [math.NT], 2021. %e A375258 Array starts %e A375258 1, 2, -1, 8, -1, 128, -1, 512, ... %e A375258 3, 6, 5, 20, 17, 68, 8193, 80, ... %e A375258 81, 28, 7, 14, 25, 26, 131, 134, ... %e A375258 27, 30, 15, 46, 23, 78, 53, 212, ... %e A375258 2187, 244, 31, 94, 47, 62, 79, 158, ... %e A375258 243, 246, 63, 126, 95, 222, 125, 238, ... %e A375258 -1, 6570, 247, 254, 127, 382, 223, 446, ... %e A375258 19683, 2430, 255, 766, 507, 510, 383, 958, ... %p A375258 T:= Matrix(8,8,-1): %p A375258 for x from 1 to 10^5 do %p A375258 k:= convert(convert(x,base,2),`+`); %p A375258 n:= convert(convert(x,base,3),`+`); %p A375258 if k <= 8 and n <= 8 and T[k,n] = -1 then T[k,n]:= x; fi %p A375258 od: %p A375258 T; %Y A375258 Cf. A000120, A011754, A037301, A053735, A375257. %K A375258 sign,base,tabl %O A375258 1,2 %A A375258 _Robert Israel_, Aug 07 2024