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.

A245821 Permutation of natural numbers: a(n) = A091205(A245703(n)).

This page as a plain text file.
%I A245821 #19 Nov 10 2024 05:45:59
%S A245821 1,2,3,4,5,9,7,6,8,12,11,15,23,81,18,10,17,30,13,162,27,36,19,24,16,
%T A245821 25,38,46,37,45,31,135,14,20,50,57,47,69,21,55,83,115,419,87,60,210,
%U A245821 61,42,54,26,90,28,29,35,32,63,171,52,59,138,113,180,111,48,88,39,41,621,72,22,953,230,103,207,126,64,33,243
%N A245821 Permutation of natural numbers: a(n) = A091205(A245703(n)).
%H A245821 Antti Karttunen, <a href="/A245821/b245821.txt">Table of n, a(n) for n = 1..10001</a>
%H A245821 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A245821 a(n) = A091205(A245703(n)).
%F A245821 Other identities. For all n >= 1, the following holds:
%F A245821 A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves "the order of primeness of n"].
%F A245821 a(p_n) = p_{a(n)} where p_n is the n-th prime, A000040(n).
%F A245821 a(n) = A049084(a(A000040(n))). [Thus the same permutation is induced also when it is restricted to primes].
%F A245821 A245815(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].
%o A245821 (PARI)
%o A245821 allocatemem(234567890);
%o A245821 v014580 = vector(2^18);
%o A245821 v091226 = vector(2^22);
%o A245821 v091242 = vector(2^22);
%o A245821 isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from _Charles R Greathouse IV_
%o A245821 i=0; j=0; n=2; while((n < 2^22), if(isA014580(n), i++; v014580[i] = n; v091226[n] = v091226[n-1]+1, j++; v091242[j] = n; v091226[n] = v091226[n-1]); n++);
%o A245821 A014580(n) = v014580[n];
%o A245821 A091226(n) = v091226[n];
%o A245821 A091242(n) = v091242[n];
%o A245821 A091205(n) = if(n<=1, n, if(isA014580(n), prime(A091205(A091226(n))), {my(irfs, t); irfs=subst(lift(factor(Mod(1, 2)*Pol(binary(n)))), x, 2); irfs[,1]=apply(t->A091205(t), irfs[,1]); factorback(irfs)}));
%o A245821 A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));
%o A245821 A245821(n) = A091205(A245703(n));
%o A245821 for(n=1, 10001, write("b245821.txt", n, " ", A245821(n)));
%o A245821 (Scheme) (define (A245821 n) (A091205 (A245703 n)))
%Y A245821 Inverse: A245822.
%Y A245821 Other related permutations:  A091205, A245703, A245815.
%Y A245821 Fixed points: A245823.
%Y A245821 Cf. A000040, A049084, A078442, A049076, A018252, A062298.
%K A245821 nonn
%O A245821 1,2
%A A245821 _Antti Karttunen_, Aug 02 2014