Skip to main content
added 2 characters in body
Source Link
pajonk
  • 19.4k
  • 5
  • 29
  • 78

R, 5856 bytes

\(x,n=seq(x),`?`=Map)any(Map(\(i)all(Map(\(j)x[j]-x[i+j],?n)),?n-1))

Attempt This Online!Attempt This Online!

Outputs FALSE for truthy and NA for falsey.

R, 58 bytes

\(x,n=seq(x))any(Map(\(i)all(Map(\(j)x[j]-x[i+j],n)),n-1))

Attempt This Online!

Outputs FALSE for truthy and NA for falsey.

R, 56 bytes

\(x,n=seq(x),`?`=Map)any(\(i)all(\(j)x[j]-x[i+j]?n)?n-1)

Attempt This Online!

Outputs FALSE for truthy and NA for falsey.

Source Link
pajonk
  • 19.4k
  • 5
  • 29
  • 78

R, 58 bytes

\(x,n=seq(x))any(Map(\(i)all(Map(\(j)x[j]-x[i+j],n)),n-1))

Attempt This Online!

Outputs FALSE for truthy and NA for falsey.