[go: up one dir, main page]

login
A273662
Least monotonic left inverse for A256450: a(1) = 0; for n > 1, a(n) = A257680(n) + a(n-1).
11
0, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 42, 43, 44, 44, 45, 46, 47, 48, 49, 50, 51, 51, 52, 53, 54, 54, 55, 55, 56, 57, 58, 58, 59, 59, 60, 61, 62, 62, 63, 64, 65, 66, 67, 68, 69, 69, 70
OFFSET
1,3
COMMENTS
Partial sums of A257680 from term A257680(2) onward.
LINKS
FORMULA
a(1) = 0; for n > 1, a(n) = A257680(n) + a(n-1).
Other identities.
For all n >= 1, a(n) = A257682(n)-1.
For all n >= 0, a(A256450(n)) = n. [This sequence works as a left inverse of A256450.]
PROG
(Scheme, with memoization-macro definec)
(definec (A273662 n) (if (= 1 n) 0 (+ (A257680 n) (A273662 (- n 1)))))
(define (A273662 n) (- (A257682 n) 1))
(Python)
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a257680(n): return 1 if '1' in str(a007623(n)) else 0
l=[0, 0]
for n in range(2, 101):
l.append(a257680(n) + l[n - 1])
print(l[1:]) # Indranil Ghosh, Jun 24 2017
CROSSREFS
One less than A257682.
Cf. also A273663.
Sequence in context: A114010 A289188 A111633 * A034138 A254667 A011879
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2016
STATUS
approved