OFFSET
1,4
COMMENTS
a(2*n-1) + a(2*n) = A000040(n);
a(2*n) + a(2*n+1) = A024675(n-1) for n > 1;
This is a subsequence of A180108. - Parthasarathy Nambi, Aug 14 2010
Sum_{n>=1} (-1)^a(n) * log(a(n)) = log(2). - Dimitris Valianatos, Jun 14 2016
FORMULA
a(n) = 1 if n < 3, otherwise (prime((n + (n mod 2))/2) + 1)/2 - n mod 2.
EXAMPLE
__ 2; __ 3; __ 5; __ 7; _ 11; _ 13; _ 17; __ 19; ...
1, 1; 1, 2; 2, 3; 3, 4; 5, 6; 6, 7; 8, 9; 9, 10; ...
1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, ....
PROG
(PARI) a(n)=if(n<3, return(1), return((prime((n+n%2)/2)+1)/2-n%2)); \\ Dimitris Valianatos, Jun 14 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 17 2004
STATUS
approved