|
Search: id:A120332
|
|
|
| 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
|
|
| 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; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
Sequence is a permutation of the positive integers, and is its own inverse permutation.
|
|
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.
|
|
PROGRAM
|
(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)[1], 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 (maxal(AT)cs.ucsd.edu), Mar 26 2007
|
|
CROSSREFS
|
Cf. A120635, A120636.
Sequence in context: A054158 A054160 A054080 this_sequence A095006 A124732 A094787
Adjacent sequences: A120329 A120330 A120331 this_sequence A120333 A120334 A120335
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Jun 22 2006
|
|
EXTENSIONS
|
More terms from Max Alekseyev (maxal(AT)cs.ucsd.edu), Mar 26 2007
|
|
|
Search completed in 0.002 seconds
|