A283161 Natural numbers whose digits can be formed by typing non-adjacent keys on a 123-456-789 keypad without repeating a digit.
1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 15, 16, 17, 18, 19, 24, 26, 27, 28, 29, 31, 34, 35, 37, 38, 39, 42, 43, 46, 48, 49, 51, 53, 57, 59, 61, 62, 64, 67, 68, 71, 72, 73, 75, 76, 79, 81, 82, 83, 84, 86, 91, 92, 93, 94, 95, 97, 135, 137, 138, 139, 153, 157, 159, 167, 168, 173, 175, 176, 179, 183, 186, 193, 195
Offset: 1
Examples
The keypad is: +-----+ |1|2|3| +-+-+-+ |4|5|6| +-+-+-+ |7|8|9| +-+-+-+ It is visibly obvious that 168 can be formed on the keypad, and each pairwise digits of 168 are not adjacent.
Links
- FUNG Cheok Yin, Table of n, a(n) for n = 1..453
- FUNG Cheok Yin, C++ program
Programs
-
Mathematica
no = IntegerDigits @ {12,14,23,25,34,36,45,47,56,58,69,78,89}; Sort[ FromDigits /@ Flatten[ Permutations /@ Select[ Subsets[ Range@ 9, {1, 9}], Intersection[ Subsets[#, {2}], no] == {} &], 1]] (* Giovanni Resta, Apr 06 2017 *)
Comments