g | x | w | all
Bytes Lang Time Link
014Japt240924T155512ZShaggy
049Wolfram Language Mathematica211101T043414Zatt
051Pari/GP211101T062532Zalephalp
052Raku211101T194539ZSean
047Ruby211102T085107ZG B
076Python 3211101T081835Zloopy wa
022Charcoal211101T094001ZNeil
01305AB1E211101T110736ZKevin Cr
067Ruby211101T104747ZAZTECCO
052Python 2211101T081048Zdingledo
066JavaScript Node.js211101T071226Ztsh
110Python 3211101T040105Zhyper-ne

Japt, 14 bytes

Outputs the n-th row, 1-indexed.

Ȥå^ ¬Í^XÑÑ}Τ

Try it

Wolfram Language (Mathematica), 50 49 bytes

--Nest[i*=#&/@{##,i=1,1}{1,##,1}&@@#&,{-1},#]/-2&

Try it online!

Returns the (0-indexed) \$n\$th row.

Uses
\$\displaystyle A_{n+1}(m)=A_n(m-1)\oplus\bigoplus_{i\le m}A_n(i)\$,
where \$A_n(m)\$ is the \$m\$th element of row \$n\$.

This can be rewritten \$\displaystyle A_{n+1}(m)=A_n(m)\oplus\bigoplus_{i\le m-2}^{}A_n(i)\$.

Pari/GP, 51 bytes

n->for(i=a=1,n,a=a*x+a/(1-x)%x^(2*i+1));Vecrev(a)%2

Try it online!

0-indexed.

Explanation

See each row as a polynomial, starting with the constant term. a*x prepends a 0 to the list. a/(1-x) takes the cumulative sum of the list. %x^(2*i+1) truncates the list to the first 2*i+1 elements.

Raku, 52 bytes

1,{(1,{[+^] $^x,|(.[^3-1+$++]:v)}...*)[^(2+$_)]}...*

Try it online!

This is an expression for a lazy, infinite sequence of rows.

Ruby, 47 bytes

a=1;loop{puts"%b"%a;(a=2*z=2*a).times{a^=z/=2}}

Try it online!

Python 3, 98, 92, 88, 77, 76 bytes

v=-4**64;W=w=v*v;v+=w;O=1
while[print(hex(O)[2::32])]:O*=w;O^=O//v&W//v;W*=w

Try it online!

Old version

Old version

Old version

Old version

Probably not competitive but I think mildly amusing. Takes advantage of Python arbitary size integers to perform cumulative xor. In fact we simply do a cumulative sum over digits using the divide by 9 (or rather base-1) trick and take the base large enough that carry never becomes an issue.

Runs "forever", only it maxes out at around m=2^23. That's not a principal limitation, just me being cheap on integer constants. n=2^127 (rowindex) which I hope is close enough to eternity. UPDATE simplified the maths using @dingledooper's formula.

Charcoal, 23 22 bytes

FN«F⊕⊗ιI∨¬ι﹪№KM1²J±ⅈ⊕ⅉ

Try it online! Link is to verbose version of code. Outputs the first n rows as a triangle. Explanation:

FN«

For each row:

F⊕⊗ι

For each bit in the row...

I∨¬ι﹪№KM1²

... output the parity of the number of adjacent 1s, except for the very first bit, which is always a 1.

J±ⅈ⊕ⅉ

Jump to the start of the next row of bits.

05AB1E, 16 14 13 bytes

λb=Å»^}2β₁4*^

Try it online.

Port of @dingledooper's Python 2 answer, but using binary instead of octal integers, so make sure to upvote him/her as well!
-1 byte thanks to @CommandMaster.

Explanation:

λ           # Start a recursive method,
            # to generate an infinite sequence,
            # starting at a(0)=1 by default
            # Where every next a(n) is calculated as follows:
 b          #  Convert the current implicit a(n-1) to a binary string
  =         #  Output it with trailing newline (without popping)
   Å»       #  Cumulative left-reduce its bits by:
     ^      #   Bitwise-XORing
   }        #  After the cumulative left-reduce,
    2β      #  Convert it from a binary-list to an integer
      ₁     #  Push a(n-1) again
       4*   #  Multiply it by 4
         ^  #  And Bitwise-XOR it to the integer

Ruby, 67 bytes

f=->r,c{c<0||c>r*2?0:r<1?1:([*c-2..c].sum{|x|f[r-1,x]}+f[r,c-1])%2}

Try it online!

Python 2, 52 bytes

Outputs an infinite sequence of rows. As a bonus, it runs extremely slowly.

n=1
while 1:print'%o'%n;x=n;n*=64;exec'n^=x;x/=8;'*x

Try it online!

If the current row expressed in binary is n, the next row will be a(n) ^ n*4, where a(n) is the prefix xor sum of the bits. a(n) is also associated with OEIS A006068.

One annoying little thing about Python is that there is no format string to convert an integer to binary. The next best alternative is octal, which is what the code uses instead.

Python 2, 54 bytes

Adding 2 more bytes gets the program to a reasonable speed.

n=1
while 1:
 print'%o'%n;x=n;n*=64
 while x:n^=x;x/=8

Try it online!

JavaScript (Node.js), 66 bytes

f=r=>b=r?f(r-1).map(_=>a[++i]=a[i-2]^b[i-3]^b[i],a=[i=1,0])&&a:[1]

Try it online!

Input r, output an array for r-th row.


JavaScript (Node.js), 48 bytes

f=r=>r?(g=a=>a^a/4^b/2^b*4?g(a+1):a)(b=f(r-1)):1

Try it online!

Or output r-th row as an integer if it is allowed.


      a
    b c d
  e f g h i
j k l m n o p


n = m xor g xor h xor i
  = (l xor f xor g xor h) xor g xor h xor i
  = l xor f xor i

Python 3, 110 bytes

def f(n):
	if n<1:return[1]
	k=[1];p=f(n-1)+[0,0]
	for i in range(n*2):k+=[p[i-1]^p[i]^p[i+1]^k[-1]]
	return k

Try it online!

A pretty basic and very sub-par solution to get things started.