login
A203077
Alternating-parity rearrangement of natural numbers: a(n) is the smallest number such that a(n-1)^2 + a(n)^2 is odd and composite.
0
1, 8, 9, 2, 11, 10, 5, 12, 3, 4, 7, 6, 13, 14, 17, 16, 15, 18, 19, 22, 21, 20, 25, 30, 27, 24, 23, 26, 29, 28, 31, 32, 35, 38, 33, 34, 37, 36, 39, 42, 41, 40, 45, 44, 43, 46, 47, 50, 49, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 62, 61, 66, 67, 64, 65
OFFSET
1,2
COMMENTS
The maximum between a(n) and the n-th integer appears to be +-6. In the first 10k terms, the distribution of differences, from -6 to 6 is: 27, 140, 1350, 7002, 1282, 168, 31. Therefore I conjecture that Lim_{n->infinity} a(n) = n.
EXAMPLE
1^2 + 8^2 = 65 composite, 8^2 + 9^2 = 145 composite, 9^2 + 2^2 = 85 composite.
MATHEMATICA
f[s_List] := Block[{k = If[ OddQ[ s[[-1]]], 2, 3], m = s[[-1]]}, While[a = k^2 + m^2; MemberQ[s, k] || PrimeQ[a] || EvenQ[a], k += 2]; Append[s, k]]; Nest[f, {1}, 70] (* Robert G. Wilson v, Jan 02 2012 *)
CROSSREFS
Cf. A203069.
Sequence in context: A202623 A266261 A117914 * A339800 A197392 A021922
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 29 2011
STATUS
approved