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.

A350218 a(1) = 1. a(n) is the smallest unlisted number, the name of which does not contain the first letter of the name of a(n-1) in US English.

Original entry on oeis.org

1, 3, 4, 2, 5, 6, 8, 30, 7, 9, 12, 11, 32, 100, 10, 101, 13, 104, 15, 16, 14, 17, 18, 34, 105, 19, 33, 106, 20, 107, 23, 109, 25, 111, 26, 400, 21, 401, 22, 404, 27, 405, 28, 406, 29, 407, 31, 409, 36, 411, 37, 500, 38, 501, 39, 504, 60, 24, 505, 61, 35, 506, 62, 40, 63, 41, 66, 42, 67, 43
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=1}, While[ Or[ MemberQ[Table[a[k],{k,1,n-1}],i],
    StringContainsQ[name[i],StringTake[name[a[n-1]],1]]], i++ ]; i];
    a/@Range[70]
  • Python
    from num2words import num2words
    def n2w(n): return num2words(n).replace(" and", "")
    def aupton(terms):
        alst, aset = [1], {1}
        for n in range(2, terms+1):
            an = 1
            avoid = n2w(alst[-1])[0]
            while an in aset or avoid in n2w(an): an += 1
            alst.append(an); aset.add(an)
        return alst
    print(aupton(70)) # Michael S. Branicky, Dec 20 2021