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!)
A352417 Inverse permutation to A352416. 2
0, 1, 3, 4, 2, 9, 10, 12, 13, 5, 6, 7, 27, 28, 30, 31, 11, 36, 37, 39, 40, 14, 15, 16, 18, 19, 21, 22, 8, 81, 82, 84, 85, 29, 90, 91, 93, 94, 32, 33, 34, 108, 109, 111, 112, 38, 117, 118, 120, 121, 41, 42, 43, 45, 46, 48, 49, 17, 54, 55, 57, 58, 20, 63, 64, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
A352416(7) = 11, so a(11) = 7.
PROG
(PARI) a(n) = { my (p=[1, 2]); for (k=2, oo, if (n<=p[k], my (v=0, d); while (n, v+=3^k*d=n\p[k]; if (d==2, v/=3); n-=d*p[k]; k--); return (v/3), p = concat(p, 2*p[k]+p[k-1]))) }
CROSSREFS
Sequence in context: A075593 A145421 A338245 * A286681 A019474 A366896
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 15 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 6 22:00 EDT 2024. Contains 373134 sequences. (Running on oeis4.)