Skip to main content
added 50 characters in body
Source Link
pxeger
  • 24.6k
  • 4
  • 53
  • 141

C (gccGCC), 4544 bytes

f(a,n)int*a;{n=n=*a+*++a-a[1]||--n<2||*a+*++a==a[1]&&fn>2&&f(a,n);}

Attempt This Online!Attempt This Online!

-1 byte by inverting output, thanks to @AZTECCO

Recursive.

C (gcc), 45 bytes

f(a,n)int*a;{n=--n<2||*a+*++a==a[1]&&f(a,n);}

Attempt This Online!

Recursive.

C (GCC), 44 bytes

f(a,n)int*a;{n=*a+*++a-a[1]||--n>2&&f(a,n);}

Attempt This Online!

-1 byte by inverting output, thanks to @AZTECCO

Recursive.

Source Link
pxeger
  • 24.6k
  • 4
  • 53
  • 141

C (gcc), 45 bytes

f(a,n)int*a;{n=--n<2||*a+*++a==a[1]&&f(a,n);}

Attempt This Online!

Recursive.