The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A353660 The binary expansions of A352909(n+1, 1) and A352909(n+1, 2) encode respectively the 1's and the 2's in the ternary expansion of a(n). 3
0, 2, 1, 6, 3, 8, 7, 5, 4, 18, 9, 20, 19, 11, 10, 24, 21, 15, 12, 26, 25, 23, 22, 17, 16, 14, 13, 54, 27, 56, 55, 29, 28, 60, 57, 33, 30, 62, 61, 59, 58, 35, 34, 32, 31, 72, 63, 45, 36, 74, 73, 65, 64, 47, 46, 38, 37, 78, 75, 69, 66, 51, 48, 42, 39, 80, 79, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This sequence is a permutation of the nonnegative integers with inverse A353661.
LINKS
FORMULA
a(n) = A005836(A352909(n+1, 1)) + 2*A005836(A352909(n+1, 2)).
a(n) < 3^k iff n < 3^k.
EXAMPLE
For n = 42:
- A352909(43, 1) = 9,
- A352909(43, 2) = 2,
- the binary expansion of 9 is "1001",
- the binary expansion of 2 is "10",
- so the ternary expansion of a(42) is "1021",
- and a(42) = 34.
PROG
(PARI) b2t(n) = fromdigits(binary(n), 3)
{ n=-1; for (d=0, 2^8-1, for (k=0, d, if (bitand(t1=k, t2=d-k)==0, print1 (b2t(t1) + 2*b2t(t2)", "); if (n++==67, break (2))))) }
CROSSREFS
Cf. A005836, A352909, A353661 (inverse), A353662.
Sequence in context: A293182 A124441 A284475 * A285355 A316605 A307178
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, May 02 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 07:32 EDT 2024. Contains 373253 sequences. (Running on oeis4.)