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!)
A245822 Permutation of natural numbers: a(n) = A245704(A091204(n)). 9

%I #13 Aug 11 2014 22:23:39

%S 1,2,3,4,5,8,7,9,6,16,11,10,19,33,12,25,17,15,23,34,39,70,13,24,26,50,

%T 21,52,53,18,31,55,77,93,54,22,29,27,66,105,67,48,137,156,30,28,37,64,

%U 91,35,85,58,97,49,40,98,36,135,59,45,47,261,56,76,92,122,83,374,38,102,139,69,167,130,88,203,351,212,349,235,14

%N Permutation of natural numbers: a(n) = A245704(A091204(n)).

%H Antti Karttunen, <a href="/A245822/b245822.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) = A245704(A091204(n)).

%F Other identities. For all n >= 1, the following holds:

%F A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves "the order of primeness of n"].

%F a(p_n)) = p_{a(n)} where p_n is the n-th prime, A000040(n).

%F a(n) = A049084(a(A000040(n))). [Thus the same permutation is induced also when it is restricted to primes].

%F A245816(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].

%o (PARI)

%o allocatemem(123456789);

%o default(primelimit, 2^22)

%o v014580 = vector(2^18); A014580(n) = v014580[n];

%o v091226 = vector(2^22); A091226(n) = v091226[n];

%o A002808(n)={ my(k=-1); while( -n + n += -k + k=primepi(n), ); n}; \\ This function from _M. F. Hasler_

%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, v091226[n] = v091226[n-1]); n++)

%o A091204(n) = if(n<=1, n, if(isprime(n), A014580(A091204(primepi(n))), {my(pfs, t, bits, i); pfs=factor(n); pfs[,1]=apply(t->Pol(binary(A091204(t))), pfs[,1]); sum(i=1, #bits=Vec(factorback(pfs))%2, bits[i]<<(#bits-i))}));

%o A091245(n) = ((n-A091226(n))-1);

%o A245704(n) = if(1==n, 1, if(isA014580(n), prime(A245704(A091226(n))), A002808(A245704(A091245(n)))));

%o A245822(n) = A245704(A091204(n));

%o for(n=1, 10001, write("b245822.txt", n, " ", A245822(n)));

%o (Scheme) (define (A245822 n) (A245704 (A091204 n)))

%Y Inverse: A245821.

%Y Other related permutations: A091204, A245704, A245816.

%Y Fixed points: A245823.

%Y Cf. A000040, A049084, A078442, A049076, A018252, A062298.

%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 April 25 09:28 EDT 2024. Contains 371967 sequences. (Running on oeis4.)