4 ms·
Right, and about a quarter contain the same digit at least twice in a row, which may be the "double digit" the grandparent referred to. $ pins() { seq -f '
by ralph 14y ago
Right, and about a quarter contain the same digit at least twice in a row, which may be the "double digit" the grandparent referred to.
$ pins() { seq -f '%04.0f' 0 9999; }
$ pins | egrep -c '(.)\1'
2710
$ pins | egrep -c '(.).*\1'
4960
$