|
|
A338246
|
|
Nonpositive values in A117966, in order of appearance and negated.
|
|
4
|
|
|
0, 1, 3, 2, 4, 9, 8, 10, 6, 5, 7, 12, 11, 13, 27, 26, 28, 24, 23, 25, 30, 29, 31, 18, 17, 19, 15, 14, 16, 21, 20, 22, 36, 35, 37, 33, 32, 34, 39, 38, 40, 81, 80, 82, 78, 77, 79, 84, 83, 85, 72, 71, 73, 69, 68, 70, 75, 74, 76, 90, 89, 91, 87, 86, 88, 93, 92, 94
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
This sequence is a self-inverse permutation of the nonnegative integers (the offset has been set to 0 so as to get a permutation).
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 0.
|
|
EXAMPLE
|
A117966 = 0, 1, -1, 3, 4, 2, -3, -2, -4, 9, 10, 8, 12, 13, 11, 6, 7, 5, -9, ...
We keep: 0, 1, 3, 2, 4, 9, ...
|
|
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..188])))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|