Skip to main content
deleted 19 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Haskell, 126126 115 bytes

u[]=1>0 u(h:t)=h`notElem`t&&uimport tData.List f m=[init r|r@(h:t)<-[scanl(\a x->sum[d|d<-[1..a-1],a`mod`d==0]a`mod`d<1])y[1..m]|y<-[1..]],h==r!!m,ut==nub t] 

Try it online!Try it online!

  • I'm pretty sure it can be golfed.saved 10 thanks to @benrg

Haskell, 126 bytes

u[]=1>0 u(h:t)=h`notElem`t&&u t f m=[init r|r@(h:t)<-[scanl(\a x->sum[d|d<-[1..a-1],a`mod`d==0])y[1..m]|y<-[1..]],h==r!!m,u t] 

Try it online!

  • I'm pretty sure it can be golfed.

Haskell, 126 115 bytes

import Data.List f m=[init r|r@(h:t)<-[scanl(\a x->sum[d|d<-[1..a-1],a`mod`d<1])y[1..m]|y<-[1..]],h==r!!m,t==nub t] 

Try it online!

  • saved 10 thanks to @benrg
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Haskell, 126 bytes

u[]=1>0 u(h:t)=h`notElem`t&&u t f m=[init r|r@(h:t)<-[scanl(\a x->sum[d|d<-[1..a-1],a`mod`d==0])y[1..m]|y<-[1..]],h==r!!m,u t] 

Try it online!

  • I'm pretty sure it can be golfed.