login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A105364
Rearrangement of positive integers according to parity of (prime(n)-1)/2 (see comments).
1
2, 1, 4, 6, 3, 5, 8, 10, 7, 12, 9, 11, 14, 16, 13, 18, 15, 20, 22, 17, 24, 26, 19, 21, 23, 28, 30, 25, 27, 32, 34, 29, 36, 31, 38, 33, 40, 42, 35, 44, 37, 46, 39, 41, 48, 50, 52, 54, 43, 45, 56, 47, 58, 49, 60, 51, 62, 53, 55, 64, 57, 66, 68, 59, 61, 70, 63, 72, 65, 67, 74, 76
OFFSET
1,1
COMMENTS
If (prime(n+1)-1)/2 is even/odd then a(n) is the next odd/even number.
MATHEMATICA
bb={}; od=-1; ev=0; Do[If[OddQ[(Prime[i]-1)/2], ev=ev+2; bb=Append[bb, ev], od=od+2; bb=Append[bb, od]], {i, 2, 200}]; bb
CROSSREFS
Cf. A105363.
Sequence in context: A293387 A306015 A171087 * A180405 A171007 A209168
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 01 2005
STATUS
approved