login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061898 Swap each prime in factorization of n with "neighbor" prime. 5
1, 3, 2, 9, 7, 6, 5, 27, 4, 21, 13, 18, 11, 15, 14, 81, 19, 12, 17, 63, 10, 39, 29, 54, 49, 33, 8, 45, 23, 42, 37, 243, 26, 57, 35, 36, 31, 51, 22, 189, 43, 30, 41, 117, 28, 87, 53, 162, 25, 147, 38, 99, 47, 24, 91, 135, 34, 69, 61, 126, 59, 111, 20, 729, 77, 78, 71, 171, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Here "neighbor" primes are just paired in order: 2<->3, 5<->7, 11<->13, etc. Self-inverse permutation of the integers. Multiplicative.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..20000

Index entries for sequences that are permutations of the natural numbers

EXAMPLE

a(60)=126 since 60=2^2*3*5, swapping 2<->3 and 5<->7 gives 3^2*2*7=126 (and of course then a(126)=60).

MAPLE

p:= proc(n) option remember; `if`(numtheory[pi](n)::odd,

       nextprime(n), prevprime(n))

    end:

a:= n-> mul(p(i[1])^i[2], i=ifactors(n)[2]):

seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017

PROG

(PARI) a(n) = my(f=factor(n)); for (i=1, #f~, ip = primepi(f[i, 1]); if (ip % 2, f[i, 1] = prime(ip+1), f[i, 1] = prime(ip-1))); factorback(f); \\ Michel Marcus, Jun 09 2014

CROSSREFS

Cf. A045965.

Sequence in context: A227630 A286251 A072027 * A021756 A274925 A084398

Adjacent sequences:  A061895 A061896 A061897 * A061899 A061900 A061901

KEYWORD

easy,nonn,mult

AUTHOR

Marc LeBrun, May 14 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 21 16:08 EST 2017. Contains 295003 sequences.