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 Answer

added 455 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, 12 bytes

Æf>1⁄2S
32ḊÇÐḟ

Try it online!

How it works

32ḊÇÐḟ Main link. No arguments.
3 Yield 100.
 2 Square it to yield 10,000.
 Ḋ Dequeue; yield [2, ..., 10,000].
 ÇÐḟ Filter-false; keep elements for which the helper link returns 0.
Æf>1⁄2S Helper link. Argument: n
Æf Compute the prime factorization of n.
 >1⁄2 Compare the prime factors with the square root of n.
 S Sum; add the resulting Booleans.

Jelly, 12 bytes

Æf>1⁄2S
32ḊÇÐḟ

Try it online!

Jelly, 12 bytes

Æf>1⁄2S
32ḊÇÐḟ

Try it online!

How it works

32ḊÇÐḟ Main link. No arguments.
3 Yield 100.
 2 Square it to yield 10,000.
 Ḋ Dequeue; yield [2, ..., 10,000].
 ÇÐḟ Filter-false; keep elements for which the helper link returns 0.
Æf>1⁄2S Helper link. Argument: n
Æf Compute the prime factorization of n.
 >1⁄2 Compare the prime factors with the square root of n.
 S Sum; add the resulting Booleans.
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, 12 bytes

Æf>1⁄2S
32ḊÇÐḟ

Try it online!

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