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.

Previous Showing 51-60 of 111 results. Next

A114332 English spelling of n ends with a(n)-th letter of the alphabet.

Original entry on oeis.org

15, 5, 15, 5, 18, 5, 24, 14, 20, 5, 14, 14, 5, 14, 14, 14, 14, 14, 14, 14, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5, 25, 5, 15, 5, 18, 5, 24, 14, 20, 5
Offset: 0

Views

Author

Blaine J. Deal, Feb 06 2006

Keywords

Examples

			'One' ends with 'e', which is the 5th letter of the alphabet, hence a(1)=5.
'Two' ends with 'o', which is the 15th letter of the alphabet, hence a(2)=15.
		

Crossrefs

Programs

  • Python
    def a(n):
        if n == 0: return 15 # zerO
        if n%1000000 == 0: return 14 # millioN, billioN, ...
        r = n%100
        if r == 0: return 4 # hundreD, thousanD
        if r == 12: return 5 # twelvE
        if 10 <= r < 20: return 14 # teN, eleveN, thirteeN, ..., nineteeN
        return [25, 5, 15, 5, 18, 5, 24, 14, 20, 5][n%10] # *Y, *onE, ..., *ninE
    print([a(n) for n in range(101)]) # Michael S. Branicky, Jan 19 2022

Extensions

a(0)=15 prepended by Tanar Ulric, Jan 20 2022

A121064 Number of length-n American English expressions for nonnegative integers (spaces, hyphens, and commas excluded).

Original entry on oeis.org

0, 0, 0, 4, 4, 6, 6, 3, 13, 22, 35, 32, 36, 89, 158, 342, 586, 913, 1490, 2365, 3884, 5940, 8629, 12386, 17637, 26311
Offset: 0

Views

Author

Ray G. Opao, Aug 10 2006

Keywords

Comments

These are Mathematica integer names (using qualifier "Words") < 10^306.

Examples

			a(3) = 4 since there are only 4 numbers in English with 3 letters: one, two, six, ten.
a(4) = 4 since there are only 4 numbers in English with 4 letters: zero, four, five, nine.
a(10) = 35 (24, 25, 29, 34, 35, 39, 43, 47, 48, 53, 57, 58, 63, 67, 68, 71, 72, 76, 84, 85, 89, 94, 95, 99, 100, 200, 600, 1000000, 2000000, 6000000, 10000000, 1000000000, 2000000000, 6000000000, 10000000000)
a(11) = 32:  [2389][378],7[459], [459]00, [126]000, 10000, [459]000000, [459]000000000, [126]000000000000, 10 trillion.
		

References

  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 123, Problem 6.

Crossrefs

Formula

a(n) = # {m | A005589(m)=n }. - M. F. Hasler, Sep 07 2012

Extensions

Corrected and extended by Hans Havermann, Sep 08 2012
Recorrected (using a larger number limit) by Hans Havermann, Apr 23 2023

A121305 Value of Roman numeral embedded in English name of n, or 0 if no such value exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 9, 5, 1, 1, 0, 55, 55, 1, 0, 1, 9, 5, 1, 1, 0, 0, 0, 0, 0, 4, 9, 5, 1, 1, 1, 1, 1, 1, 1, 0, 0, 4, 2, 2, 0, 0, 0, 0, 0, 4, 9, 5, 1, 1, 1, 1, 1, 1, 1, 0, 0, 4, 2, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 6, 6, 1, 1, 1, 1, 1, 0, 0, 4, 2, 2, 1, 1, 1, 1, 1, 0, 0, 4, 2, 2, 0
Offset: 0

Views

Author

Jonathan Vos Post, Sep 05 2006

Keywords

Comments

Not well-defined! A002904 is the main entry for this sequence. - N. J. A. Sloane, Sep 28 2011.
There are a finite number of nonzero values because "hunDreD" and "mILLIon" and "bILLIon" and "trILLIon" and so forth yield non-well-formed Roman numerals. The largest n such that a(n) is nonzero is 94044 maps to "nInetyfour thousanD fortyfour" maps to "ID" maps to 499.
Allowing a(94044) = 499 because of "ID" speaks to the non-standard usage (499 = "CDXCIX") that makes this sequence, as mentioned above, not necessarily well-defined. If "ID" is ok, why not "IIV" for a(35)? If we take Mathematica's RomanNumeral conversion as standard (for integers 1-4999; starting with 5000 we generate overbars), then there are 1411 nonzero entries up to and including a(44099) = 502. Specifically, I (30 solutions), II (8), IV (7), V (9), VI (2), IX (9), LV (2), D (272), DI (480), DII (128), DIV (112), DV (144), DVI (32), DIX (144), and DLV (32). - Hans Havermann, May 06 2019

Examples

			a(5) = 4 because 5 maps to "five" maps to "fIVe" maps to "IV" maps to 4.
a(6) = 9 because 6 maps to "six" maps to "sIX" maps to "IX" maps to 9.
a(7) = 5 because 7 maps to "seven" maps to "seVen" maps to "V" maps to 5.
a(8) = 1 because 8 maps to "eight" maps to "eIght" maps to "I" maps to 1.
a(9) = 1 because 9 maps to "nine" maps to "nIne" maps to "I" maps to 1.
a(35) = 0 because 35 maps to "thirty-five" maps to "thIrty-fIVe" maps to "IIV" which is not a well-formed Roman nhumeral, hence maps to 0.
a(1000) = 500 because 1000 maps to "one thousand" maps to "one thousanD" maps to "D" maps to 500.
		

Crossrefs

Formula

Take English name of n as string of characters, eliminate all spaces, hyphens and letters other than I, V, X, L, C, D, M. Interpret remaining string as a Roman numeral, assigning 0 if the string is not well-formed and a(n) is well-formed.

A126259 Numbers that are divisible by the number of letters in their English name, excluding spaces and hyphens;.

Original entry on oeis.org

4, 6, 12, 30, 33, 36, 40, 45, 50, 54, 56, 60, 70, 81, 88, 90, 100, 108, 132, 154, 184, 190, 200, 204, 252, 253, 264, 276, 286, 288, 299, 300, 304, 306, 325, 336, 338, 340, 360, 378, 418, 420, 462, 475, 480, 504, 510, 520, 575, 576, 580, 600, 651, 667, 682, 702
Offset: 1

Views

Author

Jonathan R. Love (japanada11(AT)yahoo.ca), Mar 08 2007

Keywords

Comments

This version uses the British English convention of including "and"; see A092320 for the American English version. - Michael S. Branicky, Apr 07 2023

Examples

			The word "sixty" has 5 letters and 60 is divisible by 5 (60/5=12), so 60 is included in the list.
"one hundred and eight" has 18 letters and 18*6 = 108, so 108 is a term.
		

Crossrefs

Programs

  • Python
    from num2words import num2words
    def letts(n): return sum(1 for c in num2words(n) if c.isalpha())
    def ok(n): return n and n%letts(n) == 0
    print([k for k in range(1000) if ok(k)]) # Michael S. Branicky, Apr 07 2023

Extensions

Corrected and extended by Sean A. Irvine, Mar 15 2010

A129774 Main diagonal of table of length of English names of numbers.

Original entry on oeis.org

1, 5, 8, 30, 0, 42, 36, 47, 79, 3000000, 606, 502, 301, 305, 420, 218, 181, 176, 233, 367, 578, 2101, 2105, 1607, 1540, 1616, 1311, 1232, 1235, 1298, 1423, 1787, 3348, 3793, 11375, 13358, 13823, 17577, 23339, 23833, 37777, 101398, 103384, 103875, 111478, 113394
Offset: 1

Views

Author

Jonathan Vos Post, May 17 2007, May 21 2007

Keywords

Comments

a(n) is the n-th smallest positive integer with the property that, when spelled out in American English, has n+2 letters (or 0 if fewer than n such numbers exists).
The sequence is labeled "finite" because there is no widely accepted naming convention for arbitrarily large numbers.
The table {and length of each row} begins:
3..|.1..2..6.10.........{4}
4..|.4..5..9............{3}
5..|.3..7..8.40.50.60...{6}
6..|11.12.20.30.80.90...{6}
7..|15.16.70............{3}
8..|13.14.18.19.41.42.46.51.52.56.61.62.66.{13}
From Michael S. Branicky, Jul 13 2020: (Start)
9..|17.21.22.26.31.32.36.44.45.49.54.55.59.64.65.69.81.82.86.91.92.96.{22}
10.|24.25.29.34.35.39.43.47.48.53.57.58.63.67.68.71.72.76.84.85.89.94.95.99...
11.|23.27.28.33.37.38.74.75.79.83.87.88.93.97.98.400.500.900.1000.2000.6000.10000.400000.5000000...
12.|73.77.78.300.700.800.4000.5000.9000.3000000.7000000.8000000.40000000.50000000.60000000...
13.|101.102.106.110.201.202.206.210.601.602.606.610.3000.700.8000.40000.50000.60000.1000001.1000002...
14.|104.105.109.204.205.209.401.402.406.410.501.502.506.510.604.605.609.901.902.906.910.1001.1002.1006...
15.|103.107.108.140.150.160.203.207.208.240.250.260.301.302.306.310.404.405.409.504.505.509.603.607...
16.|111.112.120.130.180.190.211.212.220.230.280.290.304.305.309.403.407.408.440.450.460.503.507.508...
17.|115.116.170.215.216.270.303.307.308.340.350.360.411.412.420.430.480.490.511.512.520.530.580.590...
18.|113.114.118.119.141.142.146.151.152.156.161.162.166.213.214.218.219.241.242.246.251.252.256.261...
19.|117.121.122.126.131.132.136.144.145.149.154.155.159.164.165.169.181.182.186.191.192.196.217.221...
20.|124.125.129.134.135.139.143.147.148.153.157.158.163.167.168.171.172.176.184.185.189.194.195.199...
21.|123.127.128.133.137.138.174.175.179.183.187.188.193.197.198.223.227.228.233.237.238.274.275.279...
22.|173.177.178.273.277.278.324.325.329.334.335.339.343.347.348.353.357.358.363.367.368.371.372.376...
23.|323.327.328.333.337.338.374.375.379.383.387.388.393.397.398.473.477.478.573.577.578.723.727.728..(End)

Examples

			a(1) = 1 because "one" is the first positive integer with 3 letters in its name.
a(2) = 5 because "five" is the second positive integer with 4 letters.
a(3) = 8 because "eight" is the third positive integer with 5 letters.
a(4) = 30 because "thirty" is the fourth positive integer with 6 letters.
a(5) = 0 because there are only three 7-letter positive integers: {15, 16, 70}.
		

Crossrefs

Programs

  • Python
    def A129774(n):
      i, found, limit = 0, 0, 10**2
      while found < n-2 and i < limit:
        i += 1
        found += 1*(A005589(i)==n)
      return i*(i < limit)
    print([A129774(i) for i in range(3,12)]) # Michael S. Branicky, Jul 13 2020

Formula

a(n) = A(n+2,n) where A(k,n) = n-th positive integer requiring exactly k letters (not including "and" or hyphens) in its English name, or 0 if no such integer.

Extensions

Corrected and edited by Danny Rorabaugh, May 13 2016
Corrected terms a(10)-a(18) and table in comments from 9; added terms from a(20) - Michael S. Branicky, Jul 13 2020

A131603 Number of letters in n (in Filipino or Tagalog, excluding spaces and hyphens).

Original entry on oeis.org

4, 3, 6, 5, 4, 4, 4, 4, 4, 5, 5, 9, 10, 10, 10, 9, 10, 9, 10, 10, 9, 13, 16, 15, 14, 14, 14, 14, 14, 15, 8, 12, 15, 14, 13, 13, 13, 13, 13, 14, 8, 12, 15, 14, 13, 13, 13, 13, 13, 14, 7, 11, 14, 13, 12, 12, 12, 12, 12, 13, 8, 12, 15, 14, 13, 13, 13, 13, 13, 14, 7, 11, 14, 13, 12, 12, 12, 12, 12, 13, 7, 11, 14, 13, 12, 12, 12, 12, 12, 13, 9, 13, 16, 15, 14, 14, 14, 14, 14, 15, 9
Offset: 0

Views

Author

Ray G. Opao, Jun 08 2011

Keywords

Examples

			a(2)=6, since 2 is dalawa in Filipino.
a(8)=4, since 8 is walo in Filipino.
		

Crossrefs

A231169 Triangle read by rows: T[i,j] = number of (distinct) letters which the English names of i and j have in common; j=0,...,i ; i=0,1,2,...

Original entry on oeis.org

4, 2, 3, 1, 1, 3, 2, 1, 1, 4, 2, 1, 1, 1, 4, 1, 1, 0, 1, 1, 4, 0, 0, 0, 0, 0, 1, 3, 1, 2, 0, 1, 0, 2, 1, 4, 1, 1, 1, 3, 0, 2, 1, 1, 5, 1, 2, 0, 1, 0, 2, 1, 2, 2, 3, 1, 2, 1, 2, 0, 1, 0, 2, 2, 2, 3, 1, 2, 0, 1, 0, 2, 0, 3, 1, 2, 2, 4, 1, 1, 2, 2, 0, 2, 0, 2, 2, 1, 2, 3, 5, 2, 2, 1, 4, 1, 2, 1, 2, 4, 3, 3, 2, 2, 6, 3, 3, 2, 3, 4, 2, 0, 2, 2, 2, 3, 2, 2, 4, 7
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2013

Keywords

Comments

This uses American English: no additional "and", i.e., "one hunded one", and short scale (10^9 = billion). Spaces and hyphens are ignored.
The diagonal yields the number of distinct letters in the (American) English name of the numbers (not A005589, which counts letters with multiplicity, or A052360 which even counts hyphens and spaces).
All numbers beyond 911 share at least one letter with any other number, except for 2000 and 2002 which don't share a letter with five. See A227857(n) for the number of numbers which have no letter in common with n.

Examples

			The triangle reads:
row 0: 4; ("zero" and "zero" have the 4 letters "e", "o", "r" and "z" in common)
row 1: 2, 3; ("zero" and "one" have {e,o} in common, "one" and "one" have {e,n,o} in common)
row 2: 1, 1, 3; (common(two,zero)={o}, common(two,one)={o}, common(two,two)={o,t,w})
row 3: 2, 1, 1, 4; (common(three,three)={e,h,r,t})
etc.
		

Programs

  • PARI
    A231169(m,n,L=English/*see A052360*/,X=Vec(" -"))= #setintersect(setminus(Set(Vec(L(m))),X),Set(Vec(L(n))))

A340671 a(n) is the number of values m such that, if the first n positive integers are arranged in alphabetical order in US English, the m-th term in the order is equal to m.

Original entry on oeis.org

1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 2, 2, 3, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 3, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 0, 1, 0, 1, 0, 1, 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, 0, 0, 2, 0, 1, 1, 0, 0, 1, 1, 2, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Mikhail Soumar, Jan 15 2021

Keywords

Comments

Nonnegative integers can be used instead of positive integers, since zero will always be the last element alphabetically and will not change the sequence of the other integers.
This sequence uses standard US English names for numbers. "and" is not used, e.g., 101 is rendered as "one hundred one" rather than "one hundred and one".
a(n) is equivalent to the number of terms in the n-th row of A124172 for which the term in the k-th column is equal to k.
For n < 100, a(n) + 2 = a(200 + n). This is because a(200) = 2, and the numbers starting with "two hundred" will follow all of 1-199 alphabetically, so the range [201, 200 + n] will be in the same order as [1, n]. Similarly, because a(2000) = 4, for n < 999, a(n) + 4 = a(2000 + n). [Editor's note: It is unclear how the author finds a(2000) = 4. Both versions mentioned below give a(2000) = 2. - M. F. Hasler, Jul 05 2024]
From Claudio Meller, Hans Havermann and Michael S. Branicky, Jul 03 2024: (Start)
A formalization of Philip Cohen's solution to "Alphabetizing the Integers" in (Eckler, p. 20).
When alphabetizing in the b-file and a-file, the space is assumed to precede any letter, so EIGHT HUNDRED comes before EIGHTEEN. No commas are used, but hyphens are used. (End)
At least two variants of this sequence are conceivable, depending on whether spaces and hyphens are considered or ignored, when sorting the English names of the numbers. If spaces are considered, "eight hundred" comes before "eighteen"; if they are ignored, "eighteen" comes only after all of "eight hundred ...". The two variants would not differ until a(815), where "eighteen" would be the only "fixed point" (i.e., listed at the 18th place) in the first variant, but not in the second variant (where it is listed in the 2nd place, after "eight"). - M. F. Hasler, Jul 05 2024

Examples

			a(1) = 1 ({one}, the 1st term is 1);
a(2) = 2 ({one, two}, the 1st term is 1 and the 2nd term is 2);
a(3) = 1 ({one, three, two}, the 1st term is 1);
a(4) = 1 ({four, one, three, two}, the 3rd term is 3);
a(11) = a(12) = 2 (the 4th term is 4 and the 7th term is 7);
a(13) = 3 (the 4th term is 4, the 7th term is 7, and the 12th term is 12).
		

Crossrefs

Programs

  • PARI
    apply( {A340671(n, cf=English)=sum(i=1, #n=vecsort([1..n], x->cf(x), 1), n[i]==i)}, [1..99]) \\ See A052360 for English(). To get the "ignore spaces and hyphens" variant, use "CF(x)=[c|c<-Vecsmall(English(x)), c>64]" as 2nd optional argument. To get the list of fixed points, replace "sum(i=1,(...))" by "[i|i<-[1..(...)]". - M. F. Hasler, Jul 05 2024
  • Python
    from num2words import num2words
    def a(n):
        sorted_list = sorted([num2words(m) for m in range(1, n+1)])
        return sum(m == num2words(sorted_list.index(m)+1) for m in sorted_list)
    print([a(n) for n in range(1, 101)]) # [Note: this program retains the "and" and commas. - Michael S. Branicky, Jul 05 2024]
    
  • Python
    # see link for faster version
    from bisect import insort
    from num2words import num2words
    from itertools import count, islice
    def n2w(n): # remove " and" and commas
        return num2words(n).replace(" and", "").replace(", ", " ")
    def agen(): # generator of terms
        names = [] # a sorted list
        for n in count(1):
            insort(names, (n2w(n), n-1))
            fixed = [j+1 for j in range(n) if names[j][1] == j]
            yield len(fixed) # use "yield fixed" for list of fixed points
    print(list(islice(agen(), 87))) # Michael S. Branicky, Jul 05 2024
    

A385328 The number of people in a variation of the Josephus problem when the first person is freed and the elimination process is to skip the number of people equaling the number of letters in consecutive numbers, then eliminate the next person.

Original entry on oeis.org

1, 2, 5, 26, 50, 82, 857, 1114, 3340, 3733, 3777, 11023, 12960, 17992, 47253, 329414, 367572, 382265
Offset: 1

Views

Author

Tanya Khovanova, Nathan Sheffield, and the MIT PRIMES STEP junior group, Jun 25 2025, Jun 25 2025, Jul 06 2025

Keywords

Comments

This sequence uses the US spelling. [Specifically, A005589. - Michael S. Branicky, Jul 23 2025]
This sequence can be used in magic tricks with SpellUnderDown dealing pattern. The first three people are skipped, corresponding to three letters in O-N-E, and the next person is eliminated. Then, three people are skipped corresponding to three letters in T-W-O, and the next person is eliminated. Then, 5 people are skipped, corresponding to 5 letters in T-H-R-E-E.
The deck sizes in this sequence guarantee that after the dealing, the last card is the one that was initially on top.
A naive probabilistic argument predicts the probability that A380204(k) = 1 is 1/k and expects this sequence to be infinite and distributed roughly as A002387. - Michael S. Branicky, Jul 23 2025

Examples

			Suppose there are 5 people in a circle. After three people are skipped (for O-N-E), the person number 4 is eliminated. The leftover people are 5,1,2,3 in order. Then three people are skipped (for T-W-O), and person number 3 is eliminated. The leftover people are 5,1,2 in order. Then 5 people are skipped (for T-H-R-E-E), and person 2 is eliminated. The leftover people are 5,1 in order. Then 4 people are skipped (for F-O-U-R), and person number 5 is eliminated. Person 1 is freed. Thus, 5 is in this sequence.
		

Crossrefs

Formula

{k | A380204(k) = 1}. - Michael S. Branicky, Jul 23 2025

Extensions

a(15)-a(18) from Michael S. Branicky, Jul 23 2025

A001162 Numbers containing an odd number of letters.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 10, 15, 16, 17, 21, 22, 23, 26, 27, 28, 31, 32, 33, 36, 37, 38, 40, 44, 45, 49, 50, 54, 55, 59, 60, 64, 65, 69, 70, 74, 75, 79, 81, 82, 83, 86, 87, 88, 91, 92, 93, 96, 97, 98
Offset: 1

Views

Author

William P. Everts [ bille(AT)regenisys.com ]

Keywords

Crossrefs

Cf. A005589, complement of A001161.
Previous Showing 51-60 of 111 results. Next