login
A037913
Number of i such that |d(i) - d(i-1)| = 1, where Sum_{i=0..m} d(i)*10^i is the base-10 representation of n.
8
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0
OFFSET
1,101
PROG
(PARI) a(n) = my(c); for(i=2, #n=digits(n), if(abs(n[i]-n[i-1])==1, c++)); c
CROSSREFS
In base b: A037906 (b=3), A037907 (b=4), A037908 (b=5), A037909 (b=6), A037910 (b=7), A037911 (b=8), A037912 (b=9).
Sequence in context: A353475 A277154 A011723 * A037833 A369640 A037816
KEYWORD
nonn,base
EXTENSIONS
Offset corrected by Iain Fox, Oct 29 2018
STATUS
approved