login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072027 Swap (2,3) and all twin prime pairs >(3,5) in prime factorization of n. 4
1, 3, 2, 9, 7, 6, 5, 27, 4, 21, 13, 18, 11, 15, 14, 81, 19, 12, 17, 63, 10, 39, 23, 54, 49, 33, 8, 45, 31, 42, 29, 243, 26, 57, 35, 36, 37, 51, 22, 189, 43, 30, 41, 117, 28, 69, 47, 162, 25, 147, 38, 99, 53, 24, 91, 135, 34, 93, 61, 126, 59, 87, 20, 729, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p) = (if p<=3 then 5-p else (if p+2 is prime then p+2 else (if p-2 is prime then p-2 else p))), p prime.
a(a(n)) = n, self-inverse permutation of natural numbers.
a(n) = n for single primes (A007510) and products of twin prime pairs (A037074).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{(p < q) swapped pair} ((p^2-p)*(q^2-q)/((p^2-q)*(q^2-p))) = 1.832194438922717... . - Amiram Eldar, Feb 26 2024
EXAMPLE
a(143) = a(11*13) = a(11)*a(13) = 13*11 = 143.
a(77) = a(7*11) = a(7)*a(11) = 5*13 = 65.
MATHEMATICA
f[p_, e_] := If[p < 5, 5 - p, If[PrimeQ[p + 2], p + 2, If[PrimeQ[p - 2], p - 2, p]]]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 26 2024 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i, 1]; if(p < 5, 5-p, if(isprime(p+2), p+2, if(isprime(p-2), p-2, p)))^f[i, 2]); } \\ Amiram Eldar, Feb 26 2024
CROSSREFS
Sequence in context: A227630 A286251 A361518 * A061898 A360648 A359036
KEYWORD
nonn,mult
AUTHOR
Reinhard Zumkeller, Jun 07 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)