cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A191340 (A022839 mod 2)+(A108598 mod 2).

This page as a plain text file.
%I A191340 #9 Jun 02 2025 04:08:17
%S A191340 1,1,1,1,2,1,1,1,0,0,1,1,2,2,2,1,0,0,0,0,1,2,2,2,2,1,0,0,0,1,1,2,2,1,
%T A191340 1,1,0,0,1,1,1,2,1,1,1,1,2,1,1,1,0,0,1,1,1,2,2,1,1,0,0,0,1,2,2,2,2,1,
%U A191340 0,0,0,0,1,2,2,2,1,1,0,0,1,1,1,2,1,1,1,1,2,1,1,1,1,0,1,1,1,2,2,1,1,0,0,0,1,2,2,2,2,1,0,0,0,0,1,2,2,2,1,1,0,0,1,1,1,2,2,1,1,1,0,1
%N A191340 (A022839 mod 2)+(A108598 mod 2).
%C A191340 Let r=sqrt(5) and s=r/(r-1).  There numbers yield the following two complementary Beatty sequences:
%C A191340 A022839(n)=[nr], A108598(n)=[ns], where [ ]=floor.
%C A191340 A191340(n)=the number of odd numbers in {[nr], [ns]}.
%H A191340 Ivan Neretin, <a href="/A191340/b191340.txt">Table of n, a(n) for n = 1..10000</a>
%F A191340 a(n)=([nr] mod 2)+([ns] mod 2), where r=sqrt(5), s=r/(r-1), [ ]=floor.
%t A191340 r = Sqrt[5]; s = r/(r - 1); h = 120;
%t A191340 u = Table[Floor[n*r], {n, 1, h}] (* A022839 *)
%t A191340 v = Table[Floor[n*s], {n, 1, h}] (* A108598 *)
%t A191340 w = Mod[u, 2] + Mod[v, 2] (* A191340 *)
%t A191340 Flatten[Position[w, 0]]  (* A191380 *)
%t A191340 Flatten[Position[w, 1]]  (* A191381 *)
%t A191340 Flatten[Position[w, 2]]  (* A191382 *)
%Y A191340 Cf. A191329, A191336, A191380, A191381, A191382.
%K A191340 nonn
%O A191340 1,5
%A A191340 _Clark Kimberling_, Jun 01 2011