login
A136428
First differences of A064770.
2
1, 0, 0, 1, 0, 0, 0, 0, 1, 7, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, 7, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0, 0, 0, 0, 1, 7, 1, 0, 0, 1, 0, 0, 0, 0, 1, 67, 1, 0, 0, 1, 0, 0, 0, 0, 1, 7, 1, 0, 0, 1, 0, 0, 0, 0, 1, -3, 1, 0, 0, 1, 0
OFFSET
0,10
COMMENTS
a(10*n+k) = 0 for k = 1, 2, 4, 5, 6, 7;
a(10*n+k) = 1 for k = 0, 3, 8;
a(100*n+10*k+9) = -3 for k = 1, 2, 4, 5, 6, 7;
a(100*n+10*k+9) = 7 for k = 0, 3, 8;
a(1000*n+100*k+99) = -33 for k = 1, 2, 4, 5, 6, 7;
a(1000*n+100*k+99) = 67 for k = 0, 3, 8.
LINKS
FORMULA
a(n) = (2*A010052(m mod 10) - 1)*rounded(((1+A010052(m mod 10))*10^k)/3) where n = m*10^k - 1 with m mod 10 > 0.
PROG
(Python)
def A136428(n): return (f:=lambda m: int(''.join(map(lambda x:'0111222223'[int(x)], str(m)))))(n+1)-f(n) # Chai Wah Wu, Oct 19 2024
CROSSREFS
Sequence in context: A157307 A036949 A059515 * A271697 A226371 A298937
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Dec 30 2007
STATUS
approved