A227413 a(1)=1, a(2n)=nthprime(a(n)), a(2n+1)=nthcomposite(a(n)), where nthprime = A000040, nthcomposite = A002808.
1, 2, 4, 3, 6, 7, 9, 5, 8, 13, 12, 17, 14, 23, 16, 11, 10, 19, 15, 41, 22, 37, 21, 59, 27, 43, 24, 83, 35, 53, 26, 31, 20, 29, 18, 67, 30, 47, 25, 179, 58, 79, 34, 157, 54, 73, 33, 277, 82, 103, 40, 191, 62, 89, 36, 431, 114, 149, 51, 241, 75, 101, 39, 127, 46
Offset: 1
Links
- Antti Karttunen and Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
Haskell
import Data.List (transpose) a227413 n = a227413_list !! (n-1) a227413_list = 1 : concat (transpose [map a000040 a227413_list, map a002808 a227413_list]) -- Reinhard Zumkeller, Jan 29 2014
Comments