OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 10000: # to get all terms <= N
alpha:= 2:
beta:= 0:
t:= 0:
A[1]:= 1:
count:= 1:
for i from 2 to N do
d:= padic:-ordp(4 - 2/i, 3);
beta:= beta + d;
alpha:= alpha * (4-2/i)/3^d mod 3;
if beta = 0 then
t:= t + alpha mod 2;
fi;
if t = 0 then
count:= count+1;
A[count]:= i;
fi
od:
seq(A[i], i=1..count); # Robert Israel, May 05 2014
MATHEMATICA
Select[Range[800], EvenQ[Sum[Mod[Binomial[2j, j], 3], {j, #}]]&] (* Harvey P. Dale, Jul 23 2023 *)
PROG
(PARI) isok(n) = ! (sum(k=1, n, binomial(2*k, k) % 3) % 2); \\ Michel Marcus, Dec 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 12 2003
EXTENSIONS
More terms from Michel Marcus, Dec 04 2013
STATUS
approved