login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A273663
Least monotonic left inverse for A273670: a(1) = 0; for n > 1, a(n) = A257680(A225901(n)) + a(n-1).
16
0, 0, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 18, 19, 20, 21, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 40, 41, 42, 43, 43, 44, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 53, 54, 54, 55, 56, 57, 57, 58, 58, 59, 60, 61, 61
OFFSET
1,4
LINKS
FORMULA
a(1) = 0; for n > 1, a(n) = A257680(A225901(n)) + a(n-1).
Other identities.
For all n >= 0, a(A273670(n)) = n.
PROG
(Scheme, with memoization-macro definec)
(definec (A273663 n) (if (= 1 n) 0 (+ (A257680 (A225901 n)) (A273663 (- n 1)))))
(Python)
from sympy import factorial as f
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a225901(n):
s=0
k=2
while n:
d=n%k
n=n//k
if d: s=s+(k - d)*f(k - 1)
k+=1
return s
def a257680(n): return 1 if '1' in str(a007623(n)) else 0
def a(n): return 0 if n==1 else a257680(a225901(n)) + a(n - 1)
l=[0, 0]
for n in range(2, 101): l.append(a257680(a225901(n)) + l[n - 1])
print(l[1:]) # Indranil Ghosh, Jun 24 2017
CROSSREFS
Left inverse of A273670.
Cf. also A273662.
Sequence in context: A350969 A096386 A257063 * A135671 A079420 A076895
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 30 2016
STATUS
approved