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”).

A338245
Nonnegative values in A117966, in order of appearance.
5
0, 1, 3, 4, 2, 9, 10, 8, 12, 13, 11, 6, 7, 5, 27, 28, 26, 30, 31, 29, 24, 25, 23, 36, 37, 35, 39, 40, 38, 33, 34, 32, 18, 19, 17, 21, 22, 20, 15, 16, 14, 81, 82, 80, 84, 85, 83, 78, 79, 77, 90, 91, 89, 93, 94, 92, 87, 88, 86, 72, 73, 71, 75, 76, 74, 69, 70, 68
OFFSET
0,3
COMMENTS
This sequence is a permutation of the nonnegative integers with inverse A338247 (the offset has been set to 0 so as to get a permutation).
There are only two fixed points: a(0) = 0 and a(1) = 1.
FORMULA
a(0) = 0.
a(n) = A117966(A132141(n)) for any n > 0.
EXAMPLE
A117966 = 0, 1, -1, 3, 4, 2, -3, -2, -4, 9, 10, 8, 12, 13, 11, 6, 7, 5, ...
We keep: 0, 1, 3, 4, 2, 9, 10, 8, 12, 13, 11, 6, 7, 5, ...
PROG
(PARI) A117966(n) = subst(Pol(apply(x->if(x == 2, -1, x), digits(n, 3)), 'x), 'x, 3)
print (select(v -> v>=0, apply(A117966, [0..107])))
CROSSREFS
See A338248 for a similar sequence.
Sequence in context: A091477 A075593 A145421 * A352417 A286681 A019474
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 18 2020
STATUS
approved