OFFSET
1,3
COMMENTS
On a computer numpad, a number is "easy" to key in if each adjacent pair of digits in the number are adjacent - either horizontally or vertically.
Here are two ways to type these numbers. Example for 25:
1. Press the numpad "2" key. Then let go and press "5".
2. Press the "2" and slide your finger on the numeric keypad up to the "5".
Method 2 shows that the sequence contains only numbers in which every pair of adjacent digits are distinct.
Pressing a numeric key followed by "0" and pressing a numeric key is equivalent to selecting "101" or "202".
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 1..10000
Wikipedia, Numeric keypad
EXAMPLE
25 is a term because the 2 and 5 keys are adjacent.
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
PROG
(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
CROSSREFS
KEYWORD
base,dumb,easy,nonn
AUTHOR
Arkadiusz Wesolowski, Jul 31 2012
STATUS
approved