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 A375257 #14 Aug 09 2024 03:31:29 %S A375257 3,9,15,28,29,39,45,57,82,83,84,85,94,95,99,110,118,119,123,135,162, %T A375257 163,165,174,175,183,207,219,248,297,303,315,324,325,334,335,342,343, %U A375257 363,382,383,406,407,411,423,435,441,447,459,488,494,496,497,502,503,506,508,509,543,570,571,573,603 %N A375257 Numbers whose sum of base-2 digits is 1 more than their sum of base-3 digits. %C A375257 Numbers k such that A000120(k) = A053735(k) + 1. %H A375257 Robert Israel, <a href="/A375257/b375257.txt">Table of n, a(n) for n = 1..10000</a> %e A375257 a(3) = 15 is a term because 15 = 1111_2 = 120_3 so A000120(15) = 1+1+1+1 = 4 and A053735(15) = 1+2+0 = 3. %p A375257 filter:= proc(n) convert(convert(n,base,2),`+`) = convert(convert(n,base,3),`+`)+1 end proc: %p A375257 select(filter, [$1..1000]); %t A375257 Select[Range[600], Subtract @@ DigitSum[#, {2, 3}] == 1 &] (* _Amiram Eldar_, Aug 08 2024 *) %o A375257 (Python) %o A375257 from sympy.ntheory import digits %o A375257 def ok(n): return sum(digits(n, 2)[1:]) == sum(digits(n, 3)[1:]) + 1 %o A375257 print([k for k in range(604) if ok(k)]) # _Michael S. Branicky_, Aug 08 2024 %o A375257 (PARI) isok(k) = sumdigits(k,2) == 1 + sumdigits(k, 3); \\ _Michel Marcus_, Aug 08 2024 %Y A375257 Cf. A000120, A037301, A053735, A180017. %K A375257 nonn,base %O A375257 1,1 %A A375257 _Robert Israel_, Aug 07 2024