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.

A331481 Position of the first letter of n-th (in English) in the alphabet.

Original entry on oeis.org

26, 6, 19, 20, 6, 6, 19, 19, 5, 14, 20, 5, 20, 20, 6, 6, 19, 19, 5, 14, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
Offset: 0

Views

Author

J. Marcel Feenstra, Jan 18 2020

Keywords

Examples

			'First' begins with 'F', the sixth letter, hence a(1)=6.
		

Crossrefs

Cf. A005606 (analog for cardinal numbers).

Programs

  • Mathematica
    a[n_] := LetterNumber @ Characters[IntegerName[n, {"English","Ordinal"}]][[1]]; Array[a, 100, 0] (* Amiram Eldar, Jan 18 2020 *)
  • Python
    from num2words import num2words
    import unidecode
    def A331481(n):
        return ord(unidecode.unidecode(num2words(n, to='ordinal')).lower()[0]) - 96 # Chai Wah Wu, Feb 27 2020