login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245815 Permutation of natural numbers induced when A245821 is restricted to nonprime numbers: a(n) = A062298(A245821(A018252(n))). 5

%I #17 Apr 01 2017 21:12:52

%S 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 50,13,39,85,64,43,164,29,38,17,66,19,24,21,45,132,37,105,139,82,33,

%U 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 Permutation of natural numbers induced when A245821 is restricted to nonprime numbers: a(n) = A062298(A245821(A018252(n))).

%C 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 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 Antti Karttunen, <a href="/A245815/b245815.txt">Table of n, a(n) for n = 1..10001</a>

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

%F a(n) = A062298(A245821(A018252(n))).

%F As a composition of related permutations:

%F a(n) = A245813(A245819(n)).

%F Also following holds for all n >= 1:

%F a(n) = A062298(A049084(A245821(A007821(n)))).

%F a(n) = A062298(A049084(A049084(A245821(A049078(n))))).

%o (PARI)

%o allocatemem(234567890);

%o v014580 = vector(2^18);

%o v091226 = vector(2^22);

%o v091242 = vector(2^22);

%o isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from _Charles R Greathouse IV_

%o 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 A002808(n)={my(k); for(k=0, primepi(n), isprime(n++)&&k--); n}; \\ This function from _M. F. Hasler_

%o A062298(n) = n-primepi(n);

%o A018252(n) = if(1==n, 1, A002808(n-1));

%o A014580(n) = v014580[n];

%o A091226(n) = v091226[n];

%o A091242(n) = v091242[n];

%o 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 A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));

%o A245821(n) = A091205(A245703(n));

%o A245815(n) = A062298(A245821(A018252(n)));

%o for(n=1, 10001, write("b245815.txt", n, " ", A245815(n)));

%o (Scheme) (define (A245815 n) (A062298 (A245821 (A018252 n))))

%Y Inverse: A245816.

%Y Related permutations: A245813, A245819, A245821.

%Y Cf. A007821, A018252, A049078, A062298, A114537, A236542, A245823.

%K nonn

%O 1,2

%A _Antti Karttunen_, Aug 02 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)