This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A120332 If n is among earlier terms of sequence, then replace each prime power in the prime-factorization of n with the next lower prime-power to get a(n). If n is not among earlier terms of sequence, then replace each prime power in the prime-factorization of n with the next higher prime-power to get a(n). 0
 1, 3, 2, 5, 4, 12, 8, 7, 11, 21, 9, 6, 16, 24, 28, 13, 19, 33, 17, 35, 10, 39, 25, 14, 23, 48, 29, 15, 27, 84, 32, 31, 18, 57, 20, 55, 41, 69, 22, 63, 37, 96, 47, 65, 77, 75, 43, 26, 53, 81, 76, 80, 49, 87, 36, 72, 34, 93, 61, 140, 59, 96, 40, 67, 44, 156, 64, 95, 38, 168, 73 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Sequence is a permutation of the positive integers and is its own inverse permutation. LINKS EXAMPLE 6 (= 2*3) is not among the first 5 terms of the sequence. So for a(6) we want the prime powers closest to and larger than 2 and 3, which are 3 and 4. So a(6) = 3*4 = 12. Therefore 12 (=2^2 *3) does occur among the first 11 terms of the sequence. So for a(12) we want the product of the prime powers closest to and less than 2^2 and 3, which are 3 and 2. So a(12) = 3*2 = 6. PROG (PARI) { a(n) = local(f, r, k, d, j); f=factorint(n); r=1; if(setsearch(S, n), j=-1, j=1); for(i=1, matsize(f), k=f[i, 1]^f[i, 2]+j; while(k>1 && !isprime(k) && (!ispower(k, X=X, &d)||!isprime(d)), k+=j); r*=k); S=setunion(S, [r]); r } S=Set(); vector(100, n, a(n)) - Max Alekseyev, Mar 26 2007 CROSSREFS Cf. A120635, A120636. Sequence in context: A054158 A054080 A164379 * A302698 A205401 A095006 Adjacent sequences:  A120329 A120330 A120331 * A120333 A120334 A120335 KEYWORD nonn AUTHOR Leroy Quet, Jun 22 2006 EXTENSIONS More terms from Max Alekseyev, Mar 26 2007 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 15 16:29 EDT 2019. Contains 325049 sequences. (Running on oeis4.)