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.

A245815 Permutation of natural numbers induced when A245821 is restricted to nonprime numbers: a(n) = A062298(A245821(A018252(n))).

This page as a plain text file.
%I A245815 #17 Apr 01 2017 21:12:52
%S A245815 1,2,5,3,4,7,9,59,11,6,20,125,18,25,15,10,16,26,32,31,103,8,12,35,41,
%T A245815 50,13,39,85,64,43,164,29,38,17,66,19,24,21,45,132,37,105,139,82,33,
%U A245815 65,27,507,52,14,180,161,96,46,22,190,141,87,1603,80,36,143,107,54,670,34,47,23,68,177,1337,40
%N A245815 Permutation of natural numbers induced when A245821 is restricted to nonprime numbers: a(n) = A062298(A245821(A018252(n))).
%C A245815 This permutation is induced when A245821 is restricted to nonprimes, A018252, the first column of A114537, but equally, when it is restricted to column 2 (A007821), column 3 (A049078), etc. of that square array, or alternatively, to the successive rows of A236542.
%C A245815 The sequence of fixed points f(n) begins as 1, 2, 15, 142, 548, 1694, 54681. A018252(f(n)) gives the nonprime terms of A245823.
%H A245815 Antti Karttunen, <a href="/A245815/b245815.txt">Table of n, a(n) for n = 1..10001</a>
%H A245815 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A245815 a(n) = A062298(A245821(A018252(n))).
%F A245815 As a composition of related permutations:
%F A245815 a(n) = A245813(A245819(n)).
%F A245815 Also following holds for all n >= 1:
%F A245815 a(n) = A062298(A049084(A245821(A007821(n)))).
%F A245815 a(n) = A062298(A049084(A049084(A245821(A049078(n))))).
%o A245815 (PARI)
%o A245815 allocatemem(234567890);
%o A245815 v014580 = vector(2^18);
%o A245815 v091226 = vector(2^22);
%o A245815 v091242 = vector(2^22);
%o A245815 isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from _Charles R Greathouse IV_
%o A245815 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 A245815 A002808(n)={my(k); for(k=0, primepi(n), isprime(n++)&&k--); n}; \\ This function from _M. F. Hasler_
%o A245815 A062298(n) = n-primepi(n);
%o A245815 A018252(n) = if(1==n, 1, A002808(n-1));
%o A245815 A014580(n) = v014580[n];
%o A245815 A091226(n) = v091226[n];
%o A245815 A091242(n) = v091242[n];
%o A245815 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 A245815 A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));
%o A245815 A245821(n) = A091205(A245703(n));
%o A245815 A245815(n) = A062298(A245821(A018252(n)));
%o A245815 for(n=1, 10001, write("b245815.txt", n, " ", A245815(n)));
%o A245815 (Scheme) (define (A245815 n) (A062298 (A245821 (A018252 n))))
%Y A245815 Inverse: A245816.
%Y A245815 Related permutations: A245813, A245819, A245821.
%Y A245815 Cf. A007821, A018252, A049078, A062298, A114537, A236542, A245823.
%K A245815 nonn
%O A245815 1,2
%A A245815 _Antti Karttunen_, Aug 02 2014