A215009 Numbers which are "easy" to key on a computer numpad.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 20, 21, 23, 25, 32, 36, 41, 45, 47, 52, 54, 56, 58, 63, 65, 69, 74, 78, 85, 87, 89, 96, 98, 101, 120, 121, 123, 125, 141, 145, 147, 202, 210, 212, 214, 232, 236, 252, 254, 256, 258, 320, 321, 323, 325, 363, 365, 369, 410
Offset: 1
Examples
25 is a term because the 2 and 5 keys are adjacent.
Links
- Arkadiusz Wesolowski, Table of n, a(n) for n = 1..10000
- Wikipedia, Numeric keypad
- Index entries for 10-automatic sequences.
Programs
-
Mathematica
lst = {}; Do[If[StringCount[ToString[n], {"00", "03", "04", "05", "06", "07", "08", "09", "11", "13", "15", "16", "17", "18", "19", "22", "24", "26", "27", "28", "29", "30", "31", "33", "34", "35", "37", "38", "39", "40", "42", "43", "44", "46", "48", "49", "50", "51", "53", "55", "57", "59", "60", "61", "62", "64", "66", "67", "68", "70", "71", "72", "73", "75", "76", "77", "79", "80", "81", "82", "83", "84", "86", "88", "90", "91", "92", "93", "94", "95", "97", "99", "102", "201"}] == 0, AppendTo[lst, n]], {n, 0, 410}]; lst
-
Python
from itertools import count, islice m = {'0':'12', '1':'024', '2':'0135', '3':'26', '4':'157', '5':'2468', '6':'359', '7':'48', '8':'579', '9':'68'} def c(r): return (r=='0' or r[0]!='0') and not ("102" in r or "201" in r) def agen(): reach = list("0123456789") for d in count(1): yield from (int(r) for r in reach if c(r)) reach = [r + s for r in reach for s in m[r[-1]]] print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 05 2022
Comments