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.

A004176 Omit 1's from n.

Original entry on oeis.org

0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 20, 2, 22, 23, 24, 25, 26, 27, 28, 29, 30, 3, 32, 33, 34, 35, 36, 37, 38, 39, 40, 4, 42, 43, 44, 45, 46, 47, 48, 49, 50, 5, 52, 53, 54, 55, 56, 57, 58, 59, 60, 6, 62, 63, 64, 65, 66, 67, 68, 69, 70, 7, 72, 73, 74
Offset: 0

Views

Author

Keywords

Comments

a(210) = 20 is the first term that differs from the variant "strip any leading or trailing digits 1 from n" [where digits 1 "protected" on both sides by digits different from 1 would be preserved]. Up to there, if a(n) is palindromic, then n is not in A359510, but if a(n) is non-palindromic and n is prime, then n is in A359510. - M. F. Hasler, Jan 23 2023

Crossrefs

See A004720 for another version.
Cf. A359510 (numbers that can't be written as a palindromic product).

Programs

  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n],1]],{n,0,3000}] (* Zak Seidov, Dec 08 2010 *)
  • PARI
    a(n) = fromdigits(select(d -> d!=1, digits(n))) \\ Rémy Sigrist, Jul 13 2019
    
  • Python
    def A004176(n): return int(s) if (s:=str(n).replace('1','')) else 0 # M. F. Hasler, Jan 23 2023