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 3
Jonah
  • 34.1k
  • 4
  • 41
  • 95

J, 75 bytes

(>:@][[echo@]^:(=#)[:}:[:(#~{.={:)(,i.@{:(1#.[#~0=|){:)^:(=&#~.)^:_@])^:_&1

Try it online!

Prints infinitely. Because this works by trying all numbers, and will therefore timeout on 276, here are links that start just before the known answer, and iterate a finite number of times to guarantee results will display:

n = 1

n = 2 (starting at 219)

n = 2 (starting at 281)

n = 4 (starting at 1264459)

Jonah
  • 34.1k
  • 4
  • 41
  • 95

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