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.

A350217 a(1) = 1; a(n) > a(n-1) is the smallest number whose name in English does not contain the first letter of the name of a(n-1).

Original entry on oeis.org

1, 3, 4, 6, 8, 30, 100, 300, 400, 600, 800, 2000, 1000000
Offset: 1

Views

Author

Ivan N. Ianakiev, Dec 20 2021

Keywords

Crossrefs

Programs

  • Mathematica
    name[n_]:=IntegerName[n,"Words"]; a[1]=1; a[n_]:=a[n]=Module[{i=a[n-1]+1}, While[
    StringContainsQ[name[i],StringTake[name[a[n-1]],1]], i++ ]; i]; a/@Range[12]
  • Python
    from num2words import num2words
    def n2w(n): return num2words(n).replace(" and", "")
    def afind(limit):
        alst, aset = [1], {1}
        print(1, end=", ")
        while alst[-1] < limit:
            an = alst[-1] + 1
            avoid = n2w(alst[-1])[0]
            while an in aset or avoid in n2w(an): an += 1
            alst.append(an); aset.add(an)
            print(an, end=", ")
    afind(100000) # Michael S. Branicky, Dec 20 2021