The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140820 Triangle read by rows: T(n,k) = 1 if and only if the Gray codes for n and k have no bits in common. 2
 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Old title was: "Let c(j, k) = (floor(j/2^k) mod 2) and b(j, k) = if( c(j, k) = 0 and c(j, k+1) = 0 then 0 else if(c(j, k) = 1 and c(j, k+1) = 1 then 0 else 1)) then the triangle is generated by T(n, k) = if( Sum_{j=0..n} b(n, j)* b(k, j) = 0 then 1 else 0)." Row sums are {1, 1, 1, 2, 2, 1, 2, 4, 4, 2, 1, 2, 4, 2, 4, 8, 8, ...}. LINKS G. C. Greubel, Rows n = 1..100 of triangle, flattened FORMULA Let c(j, k) = (floor(j/2^k) mod 2) and b(j, k) = if( c(j, k) = 0 and c(j, k+1) = 0 then 0 else if(c(j, k) = 1 and c(j, k+1) = 1 then 0 else 1)) then the triangle is generated by T(n, k) = if( Sum_{j=0..n} b(n, j)* b(k, j) = 0 then 1 else 0). EXAMPLE Triangle begins as:   1;   1, 0;   1, 0, 0;   1, 1, 0, 0;   1, 1, 0, 0, 0;   1, 0, 0, 0, 0, 0;   1, 0, 0, 1, 0, 0, 0;   1, 1, 1, 1, 0, 0, 0, 0;   1, 1, 1, 1, 0, 0, 0, 0, 0;   1, 0, 0, 1, 0, 0, 0, 0, 0, 0;   1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;   1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; MATHEMATICA n=16; c[i_, k_]:= Mod[Floor[i/2^k], 2]; b[i_, k_]:= If[c[i, k]==0 && c[i, k+1]==0, 0, If[c[i, k]==1 && c[i, k+1]==1, 0, 1]]; Table[If[Sum[b[i, k]* b[j, k], {k, 0, n}]==0, 1, 0], {i, 0, n}, {j, 0, i} ]//Flatten (* modified by G. C. Greubel, May 30 2019 *) PROG (PARI) c(j, k) = Mod((j/2^k)\1, 2); b(j, k) = if(c(j, k)==0 && c(j, k+1)==0, 0, if(c(j, k)==1 && c(j, k+1)==1, 0, 1)); for(k=0, 16, for(s=0, k, print1(if(sum(r=0, k, b(k, r)*b(s, r))==0, 1, 0), ", "))) \\ G. C. Greubel, Jun 03 2019 (PARI) T(n, k) = !bitand(bitxor(n, n>>1), bitxor(k, k>>1)); \\ Kevin Ryde, Jul 13 2020 (Sage) def c(j, k): return Mod(floor(j/2^k), 2) def b(j, k):     if (c(j, k)==0 and c(j, k+1)==0): return 0     elif (c(j, k)==1 and c(j, k+1)==1): return 0     else: return 1 def T(n, k):     if (sum(b(n, r)*b(k, r) for r in (0..n))==0): return 1     else: return 0 [[T(n, k) for k in (0..n)] for n in (0..16)] # G. C. Greubel, Jun 03 2019 CROSSREFS Cf. A131218, A014550. Sequence in context: A176918 A176890 A164057 * A275661 A266716 A190242 Adjacent sequences:  A140817 A140818 A140819 * A140821 A140822 A140823 KEYWORD nonn,tabl,less AUTHOR Roger L. Bagula and Gary W. Adamson, Oct 17 2008 EXTENSIONS Edited by G. C. Greubel, May 30 2019 New title from Charlie Neder, Jun 03 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 2 11:44 EST 2021. Contains 349440 sequences. (Running on oeis4.)