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!)
A338243 a(0) = 0, a(n) = A338241(2*n-1) for any n > 0. 3
0, 1, 3, 2, 4, 9, 8, 7, 6, 5, 10, 12, 11, 13, 27, 26, 25, 24, 23, 19, 21, 20, 22, 18, 17, 16, 15, 14, 28, 30, 29, 31, 36, 35, 34, 33, 32, 37, 39, 38, 40, 81, 80, 79, 78, 77, 73, 75, 74, 76, 72, 71, 70, 69, 68, 55, 57, 56, 58, 63, 62, 61, 60, 59, 64, 66, 65, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
LINKS
EXAMPLE
a(7) = A338241(13) = 7.
PROG
(PARI) b(n) = { if (n==0, return (0), my (d=n%3, m=n\3); if (d==0, 3*b(m), d==1, 1-3*b(m), 3*b(m)-1)) }
a(n) = if (n==0, 0, b(2*n-1))
CROSSREFS
Sequence in context: A265356 A083164 A094962 * A338246 A368225 A371267
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 18 2020
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 May 23 10:34 EDT 2024. Contains 372760 sequences. (Running on oeis4.)