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.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 17 2022

Keywords

Crossrefs

Left inverse of A354091.
Cf. A064989, A348747 (variants).

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); };

Formula

Fully multiplicative with a(2) = 1, a(A003627(1+n)) = A003627(n), a(A007645(n)) = A007645(n).
For all n >= 1, a(A354091(n)) = n.