Skip to main content
deleted 33 characters in body
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39

Brachylog, 2222 16 bytes

-6 thanks to Zgarb

{|+₁|^₃;?-₁}ᶠḋᵐcF&<ḋF&<.ḋṀ;Fx×

Try it online!Try it online!

  • {|+₁|-₁}ᶠ: [B,B+1,B^₃;?-1]
  • ḋᵐcFḋF: all the prime factors of the three numbers are in list F.B^3-B
  • &<.: the output N is greater than B
  • ḋṀ: N's prime factors are at least 2
  • ;Fx×: and the product of the prime factors without the ones in F unifies with the output N.

Brachylog, 22 bytes

{|+₁|-₁}ᶠḋᵐcF&<.ḋṀ;Fx×

Try it online!

  • {|+₁|-₁}ᶠ: [B,B+1,B-1]
  • ḋᵐcF: all the prime factors of the three numbers are in list F.
  • &<.: the output N is greater than B
  • ḋṀ: N's prime factors are at least 2
  • ;Fx×: and the product of the prime factors without the ones in F unifies with the output N.

Brachylog, 22 16 bytes

-6 thanks to Zgarb

^₃;?-ḋF&<.ḋṀ;Fx×

Try it online!

  • ^₃;?-ḋF: all the prime factors of B^3-B
  • &<.: the output N is greater than B
  • ḋṀ: N's prime factors are at least 2
  • ;Fx×: and the product of the prime factors without the ones in F unifies with the output N.
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39

Brachylog, 22 bytes

{|+₁|-₁}ᶠḋᵐcF&<.ḋṀ;Fx×

Try it online!

  • {|+₁|-₁}ᶠ: [B,B+1,B-1]
  • ḋᵐcF: all the prime factors of the three numbers are in list F.
  • &<.: the output N is greater than B
  • ḋṀ: N's prime factors are at least 2
  • ;Fx×: and the product of the prime factors without the ones in F unifies with the output N.