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

Permutation of nonnegative integers: a(0) = 0; for n >= 1, a(n) = 1+A225901(A225901(n)-1).
2

%I #10 Dec 10 2023 18:10:36

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

%T 30,27,26,29,40,31,36,33,32,35,46,37,42,39,38,41,28,43,48,45,44,47,82,

%U 49,54,51,50,53,64,55,60,57,56,59,70,61,66,63,62,65,52,67,72,69,68,71,106,73,78,75,74,77,88,79,84,81,80,83,94,85

%N Permutation of nonnegative integers: a(0) = 0; for n >= 1, a(n) = 1+A225901(A225901(n)-1).

%H Antti Karttunen, <a href="/A302852/b302852.txt">Table of n, a(n) for n = 0..10079</a>

%H David Newman, et al., <a href="http://list.seqfan.eu/oldermail/seqfan/2018-January/018239.html">New sequences from old, Discussion on SeqFan-mailing list</a>, January 2018.

%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>

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

%F a(0) = 0; for n >= 1, a(n) = 1+A225901(A225901(n)-1).

%o (PARI)

%o A225901(n) = { my(s=0, d, k=2); while(n, d=n%k; n=n\k; if(d, s += (k-d)*(k-1)!); k=k+1); (s); };

%o A302852(n) = if(!n,n,1+A225901(A225901(n)-1));

%Y Cf. A302851 (inverse).

%Y Cf. A225901.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Apr 26 2018