login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032917 Numbers having only digits 1 and 3 in their decimal representation. 11
1, 3, 11, 13, 31, 33, 111, 113, 131, 133, 311, 313, 331, 333, 1111, 1113, 1131, 1133, 1311, 1313, 1331, 1333, 3111, 3113, 3131, 3133, 3311, 3313, 3331, 3333, 11111, 11113, 11131, 11133, 11311, 11313, 11331, 11333, 13111, 13113 (list; graph; refs; listen; history; text; internal format)
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

CROSSREFS

CF. A020451 (primes).

Sequence in context: A287348 A019374 A033680 * A006559 A023248 A199341

Adjacent sequences:  A032914 A032915 A032916 * A032918 A032919 A032920

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

EXTENSIONS

Definition reworded by M. F. Hasler, Mar 10 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 29 20:40 EST 2021. Contains 349416 sequences. (Running on oeis4.)