%I #6 May 17 2022 17:50:17
%S 1,1,3,1,2,3,7,1,9,2,5,3,13,7,6,1,11,9,19,2,21,5,17,3,4,13,27,7,23,6,
%T 31,1,15,11,14,9,37,19,39,2,29,21,43,5,18,17,41,3,49,4,33,13,47,27,10,
%U 7,57,23,53,6,61,31,63,1,26,15,67,11,51,14,59,9,73,37,12,19,35,39,79,2,81,29,71,21,22,43,69,5,83
%N Fully multiplicative prime shift where the primes of the form 3k+2 are replaced by the previous such prime (with 2 -> 1), and primes of the form 3k and 3k+1 stay as they are.
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F Fully multiplicative with a(2) = 1, a(A003627(1+n)) = A003627(n), a(A007645(n)) = A007645(n).
%F For all n >= 1, a(A354091(n)) = n.
%o (PARI) A354092(n) = { my(f=factor(n)); for(k=1,#f~, if(2==(f[k,1]%3), if(2==f[k,1], f[k,1]--, forstep(i=primepi(f[k,1])-1,0,-1,if(2==(prime(i)%3), f[k,1]=prime(i); break))))); factorback(f); };
%Y Left inverse of A354091.
%Y Cf. A003627, A007645.
%Y Cf. A064989, A348747 (variants).
%K nonn,mult
%O 1,3
%A _Antti Karttunen_, May 17 2022