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!)
A246681 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(p_n) = A003961(a(n)), a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n), and A003961(n) shifts the prime factorization of n one step towards larger primes. 7
1, 2, 3, 5, 4, 7, 6, 9, 10, 8, 14, 11, 12, 15, 18, 20, 16, 25, 28, 21, 22, 24, 30, 27, 36, 40, 32, 50, 56, 33, 42, 13, 44, 48, 60, 54, 72, 45, 80, 64, 100, 35, 112, 75, 66, 84, 26, 63, 88, 96, 120, 108, 144, 81, 90, 160, 128, 200, 70, 49, 224, 99, 150, 132, 168, 52, 126, 55, 176, 192, 240, 39 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Note the indexing: the domain starts from 0, while the range excludes zero.
Iterating a(n) from n=0 gives the sequence: 1, 2, 3, 5, 7, 9, 8, 10, 14, 18, 28, 56, 128, 156, 1344, 16524, 2706412500, ..., which is the only one-way cycle of this permutation.
Because 2 is the only even prime, it implies that, apart from a(0)=1 and a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions). This in turn implies that there exists an infinite number of infinite cycles like (... 648391 31 13 15 20 22 30 42 112 196 1350 ...) which contain just one odd composite (A071904). Apart from 9 which is in that one-way cycle, each odd composite occurs in a separate infinite two-way cycle, like 15 in the example above.
LINKS
FORMULA
a(0) = 1, a(1) = 2, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003961(a(A000720(n))), otherwise a(n) = 2*a(A065855(n)).
Other identities.
For all n >= 0, the following holds:
a(A007097(n)) = A000040(n+1). [Maps the iterates of primes to primes].
A078442(a(n)) > 0 if and only if n is in A007097. [Follows from above].
For all n >= 1, the following holds:
a(n) = A163511(A246377(n)).
A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246377 & A246379 have the same property].
A055396(a(n)) = A049076(n). [An "order of primeness" is mapped to the index of the smallest prime dividing n].
PROG
(Scheme, two different variants)
(definec (A246681 n) (cond ((<= n 1) (+ n 1)) ((= 1 (A010051 n)) (A003961 (A246681 (A000720 n)))) (else (* 2 (A246681 (A065855 n))))))
(define (A246681 n) (if (zero? n) 1 (A163511 (A246377 n))))
CROSSREFS
Inverse: A246682.
Similar or related permutations: A163511, A246377, A246379, A246367, A245821.
Sequence in context: A227142 A246696 A246698 * A123883 A255558 A072062
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Sep 01 2014
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 July 13 13:53 EDT 2024. Contains 374284 sequences. (Running on oeis4.)