%I #9 Feb 27 2020 22:49:14
%S 1,2,3,4,5,6,7,8,9,10,13,12,11,14,15,16,17,18,19,20,21,26,29,24,25,22,
%T 27,28,23,30,37,32,39,34,35,36,31,38,33,40,41,42,43,52,45,58,53,48,49,
%U 50,51,44,47,54,65,56,57,46,61,60,59,74,63,64,55,78,71,68,87,70,79,72,67,62,75,76,91,66,89,80,81,82,101
%N Fully multiplicative with a(p) = A332806(A000720(p)).
%H Antti Karttunen, <a href="/A332808/b332808.txt">Table of n, a(n) for n = 1..26927</a>
%o (PARI)
%o up_to = 10000;
%o A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q,u); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3); for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
%o v332806 = A332806list(up_to);
%o A332806(n) = v332806[n];
%o A332808(n) = { my(f=factor(n)); f[,1] = apply(A332806,apply(primepi,f[,1])); factorback(f); };
%Y Cf. A000720, A332806, A108549 (fixed points), A332818, A332819.
%Y Inverse permutation is A108548, from which this differs for the first time at n=67, where a(67) = 71, while A108548(67) = 73.
%K nonn,mult
%O 1,2
%A _Antti Karttunen_, Feb 27 2020
|