⍝ Kaprekar's operation: ↑⍕∘k6174¨⍳20 ⍝ first 20 Kaprekar sequences. 1 999 8991 8082 8532 6174 2 1998 8082 8532 6174 3 2997 7173 6354 3087 8352 6174 4 3996 6264 4176 6174 5 4995 5355 1998 8082 8532 6174 6 5994 5355 1998 8082 8532 6174 7 6993 6264 4176 6174 8 7992 7173 6354 3087 8352 6174 9 8991 8082 8532 6174 10 999 8991 8082 8532 6174 11 1089 9621 8352 6174 12 2088 8532 6174 13 3087 8352 6174 14 4086 8172 7443 3996 6264 4176 6174 15 5085 7992 7173 6354 3087 8352 6174 16 6084 8172 7443 3996 6264 4176 6174 17 7083 8352 6174 18 8082 8532 6174 19 9081 9621 8352 6174 20 1998 8082 8532 6174 ⍝∇ k6174 Back to: code Back to: Workspaces