OFFSET
1,2
COMMENTS
This is a self-inverse permutation of natural numbers.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001
Antti Karttunen, Entanglement Permutations, 2016-2017.
FORMULA
PROG
(PARI)
allocatemem(2^30);
default(primelimit, 4294965247);
uplim = 2^20;
uplim2 = 366824; \\ Very ad hoc.
v080147 = vector(uplim);
v080148 = vector(uplim);
v267097 = vector(uplim);
v267107 = vector(uplim);
v267097[1] = 0; c = 0; v47i = 0; v48i = 0; for(n=2, uplim, if((1 == (prime(n)%4)), c++; v47i++; v080147[v47i] = n, v48i++; v080148[v48i] = n); v267097[n] = c; if(!(n%32768), print1(" n=", n)));
A080147(n) = v080147[n];
A080148(n) = v080148[n];
A267097(n) = v267097[n];
A267107(n) = v267107[n];
v267107[1] = 1; for(n=2, uplim2, if((1 == (prime(n) % 4)), v267107[n] = A080148(A267107(A267097(n))), v267107[n] = A080147(A267107(A267098(n)))); if(!(n%32768), print1(" n=", n)));
for(n=1, uplim2, write("b267107.txt", n, " ", A267107(n)));
(Scheme, with memoization-macro definec)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Feb 01 2016
EXTENSIONS
Name changed, the old name was "Manta moth permutation" - Antti Karttunen, Dec 10 2019
STATUS
approved