cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A215501 Inverse of permutation in A215366.

This page as a plain text file.
%I A215501 #23 Nov 14 2023 09:24:20
%S A215501 1,2,3,4,5,6,8,7,9,10,13,11,20,14,15,12,31,16,46,17,21,22,68,18,23,32,
%T A215501 24,25,98,26,140,19,33,47,34,27,196,69,48,28,273,35,374,36,37,99,509,
%U A215501 29,49,38,70,50,685,39,51,40,100,141,916,41,1213,197,52,30
%N A215501 Inverse of permutation in A215366.
%C A215501 Permutation of the natural numbers A000027 with fixed points 1-6, 9, 10, 14, 15, 21, 22, 33, 49, 1095199, ... and inverse permutation A215366 (with offset 1).
%H A215501 Alois P. Heinz, <a href="/A215501/b215501.txt">Table of n, a(n) for n = 1..10000</a>
%H A215501 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A215501 a(n) = A000070(A056239(n)-1)+1 for n in A000040.
%F A215501 a(n) = A000070(A056239(n)) for n in A000079.
%F A215501 A000070(A056239(n)-1) < a(n) <= A000070(A056239(n)).
%p A215501 g:= proc(n, i) option remember; `if`(n=0 or i<2, [2^n], [seq(
%p A215501       map(p->p*ithprime(i)^j, g(n-i*j, i-1))[], j=0..n/i)]) end:
%p A215501 b:= proc() local l, i; l:=[]; i:=0;
%p A215501       proc(n) while nops(l)<n do
%p A215501         l:=[l[], sort(g(i, i))[]]; i:=i+1 od; l[n]
%p A215501       end
%p A215501     end():
%p A215501 a:= proc() local t, a; t, a:= 0, proc() -1 end;
%p A215501       proc(n) local h;
%p A215501         while a(n) = -1 do
%p A215501           t:= t+1; h:= b(t);
%p A215501           if a(h) = -1 then a(h):= t fi
%p A215501         od; a(n)
%p A215501       end
%p A215501     end():
%p A215501 seq(a(n), n=1..100);
%t A215501 g[n_, i_] := g[n, i] = If[n == 0 || i < 2, {2^n}, Flatten[ Table[ #*Prime[i]^j& /@ g[n - i*j, i - 1], {j, 0, n/i}]]];
%t A215501 b[n_] := Module[{l, i}, l = {}; i = 0; While[Length[l] < n, l = Join[l, Sort[g[i, i]]]; i++]; l[[n]]];
%t A215501 a[n_] := Module[{t, a}, t = 0; a[_] = -1; Module[{h}, While[a[n] == -1, t++; h = b[t]; If[a[h] == -1, a[h] = t]]]; a[n]];
%t A215501 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Nov 14 2023, after _Alois P. Heinz_ *)
%Y A215501 Cf. A000027, A000040, A000070, A000079, A056239, A215366.
%K A215501 nonn,look
%O A215501 1,2
%A A215501 _Alois P. Heinz_, Aug 13 2012