login
A037907
Number of i such that |d(i) - d(i-1)| = 1, where Sum_{i=0..m} d(i)*4^i is the base-4 representation of n.
8
0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 1, 1, 1, 0, 1, 0, 1, 2, 1, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 1, 2, 1, 0, 1, 0, 1, 1, 1, 2, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 2, 1, 2, 0, 0, 1, 0, 1, 2, 1, 1, 3, 2, 3, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 0, 1, 0, 1, 2, 1
OFFSET
1,17
PROG
(PARI) a(n) = my(c); for(i=2, #n=digits(n, 4), if(abs(n[i]-n[i-1])==1, c++)); c \\ Iain Fox, Oct 27 2018
CROSSREFS
In base b: A037906 (b=3), A037908 (b=5), A037909 (b=6), A037910 (b=7), A037911 (b=8), A037912 (b=9), A037913 (b=10).
Sequence in context: A353454 A276799 A353423 * A365167 A037801 A340219
KEYWORD
nonn,base
STATUS
approved