A354092 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.
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, 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, 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
Offset: 1
Programs
-
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); };