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”).

A191336
(A022838 mod 2)+(A054406 mod 2)
5
1, 1, 2, 1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 1, 0, 1, 1, 0, 1, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 2, 1, 1, 0, 1, 1, 0, 1, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 2, 2, 1, 0
OFFSET
1,3
COMMENTS
A022838: Beatty sequence for r=sqrt(3),
A054406: Beatty sequence for s=(3+sqrt(3))/2 (complement
of A022838), so that
A191336(n)=([nr] mod 2)+([ns] mod 2), where [ ]=floor.
A191336(n)=(number of odd numbers in {[nr],[ns]}).
FORMULA
a(n)=([nr] mod 2)+([ns] mod 2), where r=sqrt(3), s=r/(r-1), and [ ]=floor.
MATHEMATICA
r = Sqrt[3]; s = r/(r - 1); h = 320;
u = Table[Floor[n*r], {n, 1, h}] (* A022838 *)
v = Table[Floor[n*s], {n, 1, h}] (* A054406 *)
w = Mod[u, 2] + Mod[v, 2] (* A191336 *)
Flatten[Position[w, 0]] (* A191337 *)
Flatten[Position[w, 1]] (* A191338 *)
Flatten[Position[w, 2]] (* A191339 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jun 01 2011
STATUS
approved