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.

A244319 Self-inverse permutation of natural numbers: a(1) = 1, a(2n) = A003961(1+a(A064989(2n-1))), a(2n+1) = 1+A003961(a(A064989(2n+1)-1)).

This page as a plain text file.
%I A244319 #25 Jan 27 2019 21:24:34
%S A244319 1,3,2,9,6,5,26,11,4,21,8,125,56,25,16,15,344,115,36,1015,10,39,204,
%T A244319 41,14,7,52,45,86,301,176,155,298,51,50,19,518,305,22,189,24,895,1376,
%U A244319 49,28,825,1268,11875,44,35,34,27,3186,6625,2388,13,454,153,126,3191,476,131
%N A244319 Self-inverse permutation of natural numbers: a(1) = 1, a(2n) = A003961(1+a(A064989(2n-1))), a(2n+1) = 1+A003961(a(A064989(2n+1)-1)).
%C A244319 After 1, maps each even number to a unique odd number and vice versa, i.e., for all n > 1, A000035(a(n)) XOR A000035(n) = 1, where XOR is given in A003987.
%H A244319 Antti Karttunen, <a href="/A244319/b244319.txt">Table of n, a(n) for n = 1..10001</a>
%H A244319 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A244319 a(1) = 1, a(2n) = A003961(1+a(A064989(2n-1))), a(2n+1) = A243501(a(A064989(2n+1)-1)).
%F A244319 As a composition of related permutations:
%F A244319 a(n) = A245609(A048673(n)) = A064216(A245610(n)).
%o A244319 (PARI)
%o A244319 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from _Michel Marcus_
%o A244319 A064989(n) = my(f = factor(n)); for(i=1, #f~, if((2 == f[i,1]),f[i,1] = 1,f[i,1] = precprime(f[i,1]-1))); factorback(f);
%o A244319 A244319(n) = if(1==n, 1, if(0==(n%2), A003961(1+A244319(A064989(n-1))), 1+A003961(A244319(A064989(n)-1))));
%o A244319 for(n=1, 10001, write("b244319.txt", n, " ", A244319(n)))
%o A244319 (Scheme, with _Antti Karttunen_'s IntSeq-library for memoizing definec-macro)
%o A244319 (definec (A244319 n) (cond ((= 1 n) 1) ((even? n) (A003961 (+ 1 (A244319 (A064989 (- n 1)))))) (else (A243501 (A244319 (-1+ (A064989 n)))))))
%Y A244319 Cf. A000035, A003987, A003961, A064989, A243501.
%Y A244319 Related permutations: A048673, A064216, A245609-A245610.
%Y A244319 Similar entanglement permutations: A245605-A245606, A235491, A236854, A243347, A244152.
%K A244319 nonn
%O A244319 1,2
%A A244319 _Antti Karttunen_, Jul 18 2014; description corrected and PARI code added Jul 30 2014