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

Inverse permutation to A305458.
2

%I #7 Jun 04 2018 09:48:19

%S 0,1,2,3,4,5,6,7,8,9,22,23,12,13,14,15,10,11,18,19,20,21,28,29,24,25,

%T 26,27,16,17,30,31,32,33,124,125,36,37,38,39,202,203,132,133,134,135,

%U 130,131,168,169,170,171,58,59,84,85,86,87,76,77,60,61,62,63

%N Inverse permutation to A305458.

%H Rémy Sigrist, <a href="/A305463/b305463.txt">Table of n, a(n) for n = 0..2310</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a><a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>

%o (PARI) a(n) = my (v=0, k=1, r=2, p=1); while (n, my (d=n % r); if (d, my (t = lift(Mod(d, r)/Mod(k, r))); v += t * p; k *= t); n \= r; p *= r; r = nextprime(r+1)); return (v)

%Y Cf. A305458.

%K nonn,base

%O 0,3

%A _Rémy Sigrist_, Jun 01 2018