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 A032917 #30 Oct 13 2023 12:23:08 %S A032917 1,3,11,13,31,33,111,113,131,133,311,313,331,333,1111,1113,1131,1133, %T A032917 1311,1313,1331,1333,3111,3113,3131,3133,3311,3313,3331,3333,11111, %U A032917 11113,11131,11133,11311,11313,11331,11333,13111,13113 %N A032917 Numbers having only digits 1 and 3 in their decimal representation. %C A032917 Numbers n such that product of digits of n is a power of 3. - _Vincenzo Librandi_ Aug 19 2016 %H A032917 Vincenzo Librandi, <a href="/A032917/b032917.txt">Table of n, a(n) for n = 1..1000</a> %t A032917 Flatten[Table[FromDigits[#,10]&/@Tuples[{1,3},n],{n,5}]] (* _Vincenzo Librandi_, Jun 02 2012 *) %o A032917 (Magma) [n: n in [1..14000] | Set(IntegerToSequence(n, 10)) subset {1, 3}]; // _Vincenzo Librandi_, Jun 02 2012 %o A032917 (PARI) for(n=1, 5, p=2*vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [1, 3]/2), print1(d*p,","))) \\ _M. F. Hasler_, Mar 10 2014 %o A032917 (Python) %o A032917 def a(n): return int(bin(n+1)[3:].replace('1', '3').replace('0', '1')) %o A032917 print([a(n) for n in range(1, 45)]) # _Michael S. Branicky_, May 13 2021 %o A032917 (Python) %o A032917 def A032917(n): return (int(bin(m:=n+1)[3:])<<1) + (10**(m.bit_length()-1)-1)//9 # _Chai Wah Wu_, Oct 13 2023 %Y A032917 CF. A020451 (primes). %K A032917 nonn,base %O A032917 1,2 %A A032917 _Clark Kimberling_ %E A032917 Definition reworded by _M. F. Hasler_, Mar 10 2014