A033088 Numbers in which all pairs of consecutive digits differ by 2.
1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 20, 24, 31, 35, 42, 46, 53, 57, 64, 68, 75, 79, 86, 97, 131, 135, 202, 242, 246, 313, 353, 357, 420, 424, 464, 468, 531, 535, 575, 579, 642, 646, 686, 753, 757, 797, 864, 868, 975, 979, 1313, 1353, 1357, 2020
Offset: 1
Links
- Iain Fox, Table of n, a(n) for n = 1..947
Programs
-
PARI
is(n) = for(i=2, #n=digits(n), if(abs(n[i]-n[i-1]) != 2, return(0))); 1 \\ Iain Fox, Dec 01 2017
Comments