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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A253046 An involution of the natural numbers: if n = 2*p_i then replace n with 3*p_{i+1}, and conversely if n = 3*p_i then replace n with 2*p_{i-1}, where p_i denotes the i-th prime. 7
 1, 2, 3, 9, 5, 15, 7, 8, 4, 21, 11, 12, 13, 33, 6, 16, 17, 18, 19, 20, 10, 39, 23, 24, 25, 51, 27, 28, 29, 30, 31, 32, 14, 57, 35, 36, 37, 69, 22, 40, 41, 42, 43, 44, 45, 87, 47, 48, 49, 50, 26, 52, 53, 54, 55, 56, 34, 93, 59, 60, 61, 111, 63, 64, 65, 66, 67 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(m) != m iff m is a term of A253106, i.e., a semiprime divisible by 2 or 3; a(A100484(n)) > A100484(n); a(A001748(n)) < A001748(n). - Reinhard Zumkeller, Dec 26 2014 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 A. B. Frizell, Certain non-enumerable sets of infinite permutations. Bull. Amer. Math. Soc. 21 (1915), no. 10, 495-499. Index entries for sequences that are permutations of the natural numbers MATHEMATICA a253046[n_] := Block[{f}, f[x_] := Which[PrimeQ[x/2], 3 NextPrime[x/2], PrimeQ[x/3], 2 NextPrime[x/3, -1], True, x]; Array[f, n]]; a253046[67] (* Michael De Vlieger, Dec 27 2014 *) PROG (Haskell) a253046 n | i == 0 || p > 3 = n | p == 2 = 3 * a000040 (i + 1) | otherwise = 2 * a000040 (i - 1) where i = a049084 (div n p); p = a020639 n -- Reinhard Zumkeller, Dec 26 2014 (Python) from sympy import isprime, nextprime, prevprime def A253046(n): ....q2, r2 = divmod(n, 2) ....if not r2 and isprime(q2): ........return 3*nextprime(q2) ....else: ........q3, r3 = divmod(n, 3) ........if not r3 and isprime(q3): ............return 2*prevprime(q3) ........return n # Chai Wah Wu, Dec 27 2014 CROSSREFS Cf. A064614, A251561, A020639, A049084, A000040, A253106, A001748, A100484. Sequence in context: A269559 A083173 A120725 * A324576 A109607 A324581 Adjacent sequences: A253043 A253044 A253045 * A253047 A253048 A253049 KEYWORD nonn AUTHOR N. J. A. Sloane, Dec 26 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.

Last modified August 13 05:34 EDT 2024. Contains 375113 sequences. (Running on oeis4.)