login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257685 Left inverse for injection A255411: a(0) = 0, after which, if n = A255411(k) for some k, then a(n) = k, otherwise a(n) = 0. 5
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 9, 0, 10, 0, 0, 0, 11, 0, 12, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 15, 0, 16, 0, 0, 0, 17, 0, 18, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 21, 0, 22, 0, 0, 0, 23, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,13

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..10080

FORMULA

a(0) = 0, after which, if n = A255411(k) for some k, then a(n) = k, otherwise a(n) = 0.

a(n) = (1-A257680(n)) * A257684(n).

Other identities:

For all n >= 0, a(A255411(n)) = n. [This sequence works as a left inverse of A255411.]

MATHEMATICA

Position[Select[Range[0, 120], ! MemberQ[IntegerDigits[#, MixedRadix[Reverse@ Range@ 12]], 1] &], #] - 1 & /@ Range[0, 120] /. {} -> 0 // Flatten (* Michael De Vlieger, May 30 2016, Version 10.2 *)

PROG

(Scheme) (define (A257685 n) (* (- 1 (A257680 n)) (A257684 n)))

(Python)

from sympy import factorial as f

def a007623(n, p=2): return n if n<p else a007623(int(n/p), p+1)*10 + n%p

def a257684(n):

    x=str(a007623(n))[:-1]

    y="".join([str(int(i) - 1) if int(i)>0 else '0' for i in x])[::-1]

return 0 if n==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))])

def a257680(n): return 1 if '1' in str(a007623(n)) else 0

def a(n): return (1 - a257680(n))*a257684(n)

print [a(n) for n in range(101)] # Indranil Ghosh, Jun 21 2017

CROSSREFS

Cf. A255411, A257680, A257681, A257684.

Sequence in context: A202425 A292374 A292376 * A327172 A113503 A082507

Adjacent sequences:  A257682 A257683 A257684 * A257686 A257687 A257688

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 04 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 27 13:18 EST 2020. Contains 332306 sequences. (Running on oeis4.)