OFFSET
1,2
COMMENTS
For k > 0: a(2*k-1) + a(2*k) is prime, a(2*k) + a(2*k+1) is composite.
LINKS
FORMULA
A010051(a(n)+a(n+1)) = n mod 2.
EXAMPLE
. n | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
. a(n) | 1 2 4 3 5 6 8 9 7 10 11 12 13 16 14 15 17 20 18 19
. A026233(a(n)) | 1 1 2 2 3 3 4 5 4 6 5 7 6 10 8 9 7 12 11 8 .
PROG
(Haskell)
import Data.List (delete)
a244724 n = a244724_list !! (n-1)
a244724_list = 1 : f 1 [2..] where
f x xs = f' xs where
f' (u:us) | a010051' (x + u) == 1 = g u (delete u xs)
| otherwise = f' us where
g y ys = g' ys where
g' (v:vs) | a010051' (y + v) == 0 = u : v : f v (delete v ys)
| otherwise = g' vs
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 05 2014
STATUS
approved