Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

1 of 4
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (ES6), 78 bytes

f=p=>p>4?(P=n=>n%--x?P(n):x<2)(x=p)&P(x=p-~p)&P(x=--p/2)?[...f(p),p+1]:f(p):[]

Try it online!

Arnauld
  • 205.5k
  • 21
  • 187
  • 670

AltStyle によって変換されたページ (->オリジナル) /