Husk, (削除) 18 (削除ここまで) (削除) 17 (削除ここまで) (削除) 14 (削除ここまで) 13(削除) 13 (削除ここまで) 12 bytes
Edit: -3 bytes, and then another -1 byte, thanks to Leo, and -1 byte thanks to inspiration from pajonk's R answer (3rd edit)
1ドルmΠ†dfṁ→m1⁄2Pd1ドルmΠ†dm1⁄2f→Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
Commented penultimate version:
1ドル # index of input if present, zero otherwise, in
mΠ # products of each element-pair
†d # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
ṁ→ # sum of last digits is nonzero
Husk, (削除) 18 (削除ここまで) (削除) 17 (削除ここまで) (削除) 14 (削除ここまで) 13 bytes
Edit: -3 bytes, and then another -1 byte, thanks to Leo
1ドルmΠ†dfṁ→m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
mΠ # products of each element-pair
†d # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
ṁ→ # sum of last digits is nonzero
Husk, (削除) 18 (削除ここまで) (削除) 17 (削除ここまで) (削除) 14 (削除ここまで) (削除) 13 (削除ここまで) 12 bytes
Edit: -3 bytes, and then another -1 byte, thanks to Leo, and -1 byte thanks to inspiration from pajonk's R answer (3rd edit)
1ドルmΠ†dm1⁄2f→Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
Commented penultimate version:
1ドル # index of input if present, zero otherwise, in
mΠ # products of each element-pair
†d # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
ṁ→ # sum of last digits is nonzero
Husk, (削除) 18 (削除ここまで) 17(削除) 17 (削除ここまで)(削除) 14 (削除ここまで) 13 bytes
Edit: -3 bytes, and then another -1 byte, thanks to Leo
1ドルmoΠmdfo→Fz+m1⁄2Pd1ドルmΠ†dfṁ→m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
moΠmΠ # products of each element-pair
†d md # combining digits as a number from
m1⁄2 m1⁄2 # first & second halves of
P P # all permutations of
d d # digits of input;
f # and filtering only element-pairs for which
ṁ→ o→Fz+ # last element # sum of zippedlast sumsdigits is nonzero
Husk, (削除) 18 (削除ここまで) 17 bytes
1ドルmoΠmdfo→Fz+m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
moΠ # products of each element-pair
md # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
o→Fz+ # last element of zipped sums is nonzero
Husk, (削除) 18 (削除ここまで) (削除) 17 (削除ここまで)(削除) 14 (削除ここまで) 13 bytes
Edit: -3 bytes, and then another -1 byte, thanks to Leo
1ドルmΠ†dfṁ→m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
mΠ # products of each element-pair
†d # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
ṁ→ # sum of last digits is nonzero
Husk, (削除) 18 (削除ここまで) 17 bytes
1ドルmoΠmdfo→Fz+m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
mΠ moΠ # products of each element-pair of
mom # results of mapping these functions:
md d # combining digits #as combinea digitsnumber infrom
1⁄2m1⁄2 # first & second halves
# across all elements of:
P # all permutations of
d # digits of input;
f f # and filtering only element-pairs for which
F¤|%10 o→Fz+ # onelast orelement otherof iszipped nonzerosums modulois 10nonzero
Husk, (削除) 18 (削除ここまで) 17 bytes
1ドルmoΠmdfo→Fz+m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
mΠ # products of each element-pair of
mom # results of mapping these functions:
d # combine digits in
1⁄2 # first & second halves
# across all elements of:
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
F¤|%10 # one or other is nonzero modulo 10
Husk, (削除) 18 (削除ここまで) 17 bytes
1ドルmoΠmdfo→Fz+m1⁄2Pd
Outputs nonzero integer if it's a vampire number, zero otherwise.
1ドル # index of input if present, zero otherwise, in
moΠ # products of each element-pair
md # combining digits as a number from
m1⁄2 # first & second halves of
P # all permutations of
d # digits of input;
f # and filtering only element-pairs for which
o→Fz+ # last element of zipped sums is nonzero