cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Antti Karttunen, May 04 2015

Keywords

Crossrefs

Programs

  • 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 *)
  • Python
    from sympy import factorial as f
    def a007623(n, p=2):
        return n if n

    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

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

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.]