Skip to main content
added 20 characters in body
Source Link
jdt
  • 5.1k
  • 1
  • 16
  • 21

Excel, 112112 110 bytes

=REDUCELET(""r,ROW(1:999),REDUCE("",r,LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM((MOD(b,SEQUENCE(b)r)<1)+0),b&",",""))))

enter image description here

Excel, 112 bytes

=REDUCE("",ROW(1:999),LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM((MOD(b,SEQUENCE(b))<1)+0),b&",","")))

enter image description here

Excel, 112 110 bytes

LET(r,ROW(1:999),REDUCE("",r,LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM((MOD(b,r)<1)+0),b&",",""))))

enter image description here

deleted 2 characters in body
Source Link
jdt
  • 5.1k
  • 1
  • 16
  • 21

Excel, 116112 bytes

=REDUCE("",ROW(1:999),LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM(IF(MOD(b,SEQUENCE(b))<1,1,0)+0),b&",","")))

enter image description here

Excel, 116 bytes

=REDUCE("",ROW(1:999),LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM(IF(MOD(b,SEQUENCE(b))<1,1,0)),b&",","")))

enter image description here

Excel, 112 bytes

=REDUCE("",ROW(1:999),LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM((MOD(b,SEQUENCE(b))<1)+0),b&",","")))

enter image description here

deleted 264 characters in body
Source Link
jdt
  • 5.1k
  • 1
  • 16
  • 21

Excel, 127116 bytes

=LET=REDUCE(a"",MAKEARRAYROW(10000,1:999),LAMBDA(ra,cb,IFa&IF(SUM(MID(rb,SEQUENCE(LEN(rb)),1)+0)=SUM(IF(MOD(rb,SEQUENCE(rb))<1,1,0)),r,0)))b&",FILTER(a",a>0""))

The function creates an array with either 0 or r) where these two values are equal:

  • SUM(MID(r,SEQUENCE(LEN(r)),1)+0): sum of the digits.
  • SUM(IF(MOD(r,SEQUENCE(r))<1,1,0)): number of factors.

And then filters out all the zero values.

enter image description hereenter image description here

Excel, 127 bytes

=LET(a,MAKEARRAY(10000,1,LAMBDA(r,c,IF(SUM(MID(r,SEQUENCE(LEN(r)),1)+0)=SUM(IF(MOD(r,SEQUENCE(r))<1,1,0)),r,0))),FILTER(a,a>0))

The function creates an array with either 0 or r where these two values are equal:

  • SUM(MID(r,SEQUENCE(LEN(r)),1)+0): sum of the digits.
  • SUM(IF(MOD(r,SEQUENCE(r))<1,1,0)): number of factors.

And then filters out all the zero values.

enter image description here

Excel, 116 bytes

=REDUCE("",ROW(1:999),LAMBDA(a,b,a&IF(SUM(MID(b,SEQUENCE(LEN(b)),1)+0)=SUM(IF(MOD(b,SEQUENCE(b))<1,1,0)),b&",","")))

enter image description here

Source Link
jdt
  • 5.1k
  • 1
  • 16
  • 21
Loading