login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A023741
Ternary expansion uses each positive digit just once.
1
5, 7, 11, 15, 19, 21, 29, 33, 45, 55, 57, 63, 83, 87, 99, 135, 163, 165, 171, 189, 245, 249, 261, 297, 405, 487, 489, 495, 513, 567, 731, 735, 747, 783, 891, 1215, 1459, 1461, 1467, 1485, 1539, 1701, 2189, 2193, 2205, 2241, 2349, 2673, 3645, 4375, 4377
OFFSET
1,1
LINKS
MATHEMATICA
Union[ Map[ Plus@@(Array[ (3^#)&, Length[ # ], 0 ]*#)&, Flatten[ Table[ Permutations[ Join[ Range[ 3-1 ], Array[ 0&, k ] ] ], {k, 0, 6} ], 1 ] ] ]
PROG
(PARI) a(n)=(1+(j(n)>=i(n)))*3^i(n)+(2-(j(n)>=i(n)))*3^(j(n)%i(n)) where i(n) = floor(1/2+sqrt(n)) and j(n) = n-1-2*binomial(i(n), 2) /* Michael Somos, Jun 03 2000 */
CROSSREFS
Sequence in context: A075317 A134643 A039001 * A096819 A032699 A073088
KEYWORD
nonn,base,easy
STATUS
approved