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 of A302853: if A302853(k) = n, a(n) = k, or -1 if n does not occur in A302853.
3

%I #6 Jun 07 2018 22:07:25

%S 0,1,3,2,5,25,4,26,7,8,10,9,6,28,11,27,13,14,16,15,18,30,17,31,20,21,

%T 23,22,19,29,12,24,65,66,7483,7484,70,90,7488,7508,68,67,7486,7485,69,

%U 91,7487,7509,72,73,7490,7491,71,93,7489,7511,75,74,7493,7492,76,92,7494,7510,33,34,36,35,38,58,37,59,40,41,43,42,39

%N Inverse of A302853: if A302853(k) = n, a(n) = k, or -1 if n does not occur in A302853.

%C This is a left inverse of A302853, and also the right inverse if A282291 (and thus also A302853) is surjective (a permutation of natural numbers), in which case the fallback-clause is unnecessary.

%H Antti Karttunen, <a href="/A302854/b302854.txt">Table of n, a(n) for n = 0..259</a>

%F For all n >= 0, a(A302853(n)) = n.

%o (PARI)

%o \\ For other needed code, follow A050376 and A282291:

%o A052330(n) = { my(p=1, i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };

%o A302854(n) = (A304090(A052330(n))-1);

%Y Cf. A302853 (inverse).

%K nonn

%O 0,3

%A _Antti Karttunen_, May 17 2018