OFFSET
1,2
COMMENTS
Numbers n such that product of digits of n is a power of 3. - Vincenzo Librandi Aug 19 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
Flatten[Table[FromDigits[#, 10]&/@Tuples[{1, 3}, n], {n, 5}]] (* Vincenzo Librandi, Jun 02 2012 *)
PROG
(Magma) [n: n in [1..14000] | Set(IntegerToSequence(n, 10)) subset {1, 3}]; // Vincenzo Librandi, Jun 02 2012
(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
(Python)
def a(n): return int(bin(n+1)[3:].replace('1', '3').replace('0', '1'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 13 2021
(Python)
def A032917(n): return (int(bin(m:=n+1)[3:])<<1) + (10**(m.bit_length()-1)-1)//9 # Chai Wah Wu, Oct 13 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Definition reworded by M. F. Hasler, Mar 10 2014
STATUS
approved