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 21-30 of 37 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

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))))

A332068 Numbers whose English name has at least two vowels and all the vowels are in alphabetical order.

Original entry on oeis.org

0, 3, 4, 7, 8, 11, 12, 17, 22, 23, 24, 26, 27, 28, 32, 34, 36, 42, 44, 52, 54, 56, 62, 64, 66, 70, 72, 73, 74, 76, 77, 78, 80, 82, 84, 86, 3000000, 3000002, 3000004, 3000040, 3000042, 3000044, 6000000, 6000002, 6000004, 6000040, 6000042, 6000044, 7000000, 7000002, 7000004
Offset: 1

Views

Author

M. F. Hasler, Aug 10 2020

Keywords

Comments

Here (as in most OEIS sequences) vowel means one of the five letters A, E, I, O or U. (One could imagine variants that use Y, too.)
No number with "hUndrEd", "thoUsAnd", or "One / twO / foUr mIllioN" (or "fIvE, nInE"...) in it has the required property.
The vowels are counted with multiplicity: e.g., "thrEE" with two 'E's is listed.
The subsequence of numbers which have at least two distinct vowels in alphabetical order is 0, 4, 8, 22, 24, 26, 28, 32, 34, 44, 52, 54, 62, 64, 72, 74, 76, 78, 80, 82, 84, 86, 3000000, ...

Examples

			Numbers 0, 3, 4, ... have the required property, since their English names are "zErO", "thrEE", "fOUr", ...
Numbers 1, 2, 5, ... ("OnE", "twO", "fIvE", ...) don't have the property (vowels in incorrect order or less than two).
		

Crossrefs

Cf. A052360.
A095947 \ {10} is the subset of numbers having only vowel E, and more than once.
Sequences related to vowels: A037196 (# vowels), A102869, A158352, A158354 (smallest number with n [distinct] vowels in AE / BE), A158353, A158355 (ditto, increasing), A058179 (all 5 vowels), A058180 (ditto, exactly once), A000852, A000861 (start/end with vowel), A019270, A080518 (self-describing), A059437, A079741, A152592, A174879, A241858.
See A332069 for numbers having all 5 vowels, in alphabetical order.

Programs

  • PARI
    select( {is_A332068(n,v=Vec("aeiou"))=#(t=[c|c<-Vec(English(n)),setsearch(v,c)])>1&&t==vecsort(t)}, [0..999]) \\ See A052360 for English(). Insert "Set" after '#' to get the subset of numbers with > 1 distinct vowels.

A332069 Numbers whose American English name contains all 5 vowels in alphabetical order.

Original entry on oeis.org

1084, 1134, 1154, 1164, 1184, 1194, 1234, 1254, 1264, 1284, 1294, 1334, 1354, 1364, 1384, 1394, 1434, 1454, 1464, 1484, 1494, 1534, 1554, 1564, 1584, 1594, 1634, 1654, 1664, 1684, 1694, 1734, 1754, 1764, 1784, 1794, 1804, 1814, 1824, 1834, 1844, 1854, 1864, 1874, 1884, 1894
Offset: 1

Views

Author

M. F. Hasler, Aug 10 2020

Keywords

Comments

The name of the number may contain other vowels (A, E, I, O or U) in any place and order. "American English" means that no "and" is used, e.g., 101 = "one hundred one".
Therefore (and because 1000 = "thousAnd" is the least number using the letter "A"), for any term a(n) < 10^4, the number a(n) + x*10^4 is also in the sequence for any x > 0, and so is any number a(n)*10^(6k) + m, m < 10^(6k), k > 0. (The statement isn't true with x*10^3: for example 1084 + 999000 does not have the letter "A".)
In French, 92 ("quAtrE-vIngt dOUze") has the property, and as a consequence the corresponding sequence consists mainly of 92 + x*100 with any x >= 0, and 472 + x*1000 with any x >= 0 ("quAtrE cent soIxante-dOUze"); there is no other term below 4000, from where on others (4012, 4061, 4062, ...) come into play.
In German, the first number to have an 'o' is "Million". Since the 'I' must be preceded by 'A' and 'E', the corresponding sequence would start only after 18*10^6: 18000005, 18000009, 18000015, 18000019, 18000021, 18000022, ...

Examples

			1084 is "(one) thousAnd EIghty fOUr". This is the smallest number whose English name contains all 5 vowels A, E, I, O, U in this order, therefore a(1) = 1084.
		

Crossrefs

Cf. A052360.
Sequences related to vowels: A037196 (# vowels), A102869, A158352, A158354 (smallest number with n [distinct] vowels in AE / BE), A158353, A158355 (ditto, increasing), A058179 (all 5 vowels), A058180 (ditto, exactly once), A000852, A000861 (start/end with vowel), A019270, A080518 (self-describing), A059437, A079741, A152592, A174879, A241858.
Cf. A332068 (also based on the order of vowels in the English name of numbers).

Programs

  • PARI
    vowels=Vec("aeiou"); (isSubseq(a,b)=forvec(v=vector(#a,i,[i,#b]),vecextract(b,v)==a&&return(1),2)); select( {is_A332069(n)=#Set(n=[c|c<-Vec(English(n)),setsearch(vowels,c)])>4&&isSubseq(vowels,n)}, [0..2000]) \\ See A052360 for English().

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
    

A119482 Numbers that are diminished by taking its sum of letters (writing out its English name and adding the letters using a=1, b=2, c=3, ...).

Original entry on oeis.org

80, 90, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 215, 218, 219, 240, 250, 251, 255, 256, 258, 259, 260, 270, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307
Offset: 1

Views

Author

Tanya Khovanova, Jul 26 2006

Keywords

Comments

Note, since 202 a term, this is American English (e.g. 'two hundred two', not 'two hundred and two'). - Alvin Hoover Belt, Jan 16 2016
Numbers that satisfy A073327(n) < n. - Michel Marcus, Jan 17 2016

Examples

			EIGHTY = 5+9+7+8+20+25 = 74, so 80 is in the sequence.
		

Crossrefs

Cf. A073327.

Programs

  • Mathematica
    f[n_] := Block[{w, g, d = FromDigits /@ If[IntegerLength@ n > 3, Reverse@ TakeDrop[IntegerDigits@ n, -3], {IntegerDigits@ n}], r = <| 2 -> "hundred", 3 -> "thousand" |>, s = <| 10 -> "ten", 20 -> "twenty", 30 -> "thirty", 40 -> "forty", 50 -> "fifty", 60 -> "sixty", 70 -> "seventy", 80 -> "eighty", 90 -> "ninety" |>, t = <| 10 -> "ten", 11 -> "eleven", 12 -> "twelve", 13 -> "thirteen", 14 -> "fourteen", 15 -> "fifteen", 16 -> "sixteen", 17 -> "seventeen", 18 -> "eighteen", 19 -> "nineteen"|>, u = <| 0 -> "", 1 -> "one", 2 -> "two", 3 -> "three", 4 -> "four", 5 -> "five", 6 -> "six", 7 -> "seven", 8 -> "eight", 9 -> "nine" |>}, g[x_] := StringJoin[If[# == 0, "", Lookup[u, #] <> " " <> Lookup[r, 2]] &@ Floor[#/10^2] &@ x, " ", Which[0 <= # < 10, Lookup[u, #], 10 <= # < 20, Lookup[t, #], True, Lookup[s, 10 First@ #] <> " " <> Lookup[u, Last@ #] &@ IntegerDigits@ #] &@ (# - 10^2 Floor[#/10^2]) &@ x]; w = If[Length@ d == 2, g@ First@ d <> " " <> Lookup[r, 3] <> " " <> g@ Last@ d, g@ First@ d]; StringReplace[StringTrim@ w, "  " -> " "]]; Select[Range@ 300, Total[ToCharacterCode[StringReplace[f@ #, " " -> ""]] - 96] < # &] (* Michael De Vlieger, Jan 18 2016 *)
  • PARI
    for (n=1, 1000, if (A073327(n) < n, print1(n, ", "))) \\ using PARI scripts from A052360 and A073327; Michel Marcus, Jan 18 2016

Extensions

More terms from Alvin Hoover Belt, Jan 16 2016

A119960 Positive integers with prime number of characters in their English names, including spaces and hyphens.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 10, 15, 16, 24, 25, 29, 34, 35, 39, 40, 43, 47, 48, 50, 53, 57, 58, 60, 63, 67, 68, 70, 71, 72, 73, 76, 77, 78, 84, 85, 89, 94, 95, 99
Offset: 1

Views

Author

Jonathan Vos Post, Aug 02 2006

Keywords

Comments

Differs due to hyphens and spaces from A072685 Positive integers whose English names contain a prime number of letters. Primes with prime number of characters in their English names, including spaces and hyphens, are a subset of this beginning: 2, 3, 7, 29, 43, 47, 53, 67, 71, 73.

Crossrefs

Programs

  • Mathematica
    Select[Range[99], PrimeQ[ StringLength@ IntegerName[#, "Words"]] &] (* Giovanni Resta, Jun 13 2016 *)

Formula

n such that A052360(n) is prime. n such that A052360(n) is in A000040.

Extensions

Missing a(1) and more terms from Giovanni Resta, Jun 13 2016

A226942 Number of iterations of A226911 until 0 is reached, for starting value n.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jun 23 2013

Keywords

Comments

Iterating the map A226911 was suggested in the SeqFan post by E. Angelini, cf link.

Crossrefs

Programs

  • Maple
    f:= proc(n) local S;
      uses StringTools;
      S:= Select(IsAlpha, convert(n, english));
      convert(map(`-`, convert(S, bytes), 96), `+`) mod n
    end proc:
    g:= proc(n) option remember;
        local v;
        v:= f(n);
        1+procname(v)
    end proc:
    g(0):= 0:
    map(g, [$1..100]); # Robert Israel, Jun 13 2019
  • PARI
    A226942 = n -> for(c=1,9e9,(n=A226911(n))||return(c))

A231072 Number of words in English spelling of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2013

Keywords

Comments

From a(101) on it must be made precise that this sequence uses the American style ("one hundred one"), as in A052360, and not the British style ("one hundred and one"). The choice of long or short scale does not make a difference since, e.g., the word "milliard" in long scale use would simply be replaced by "billion" in short scale. However, the use of "thousand [million]" instead, would lead to different results for numbers such that floor(n/10^6) mod 10^3 is zero. - M. F. Hasler, Nov 03 2013

Examples

			From "zero" to "twenty", the numbers are written in one word, so a(0..20)=1. "Twenty-one" is the first term to require 2 words, so a(21)=2.
		

Crossrefs

Programs

  • PARI
    a(n)=sum(k=7,#n=Vecsmall(English(n)),n[k-3]<65)+1 \\ See A052360 for English(). Only characters 4,...,length-4 need to be checked for space/hyphen since there is no word with less than 3 letters.

A231270 Irregular table read by rows r=0,1,2..., which contain the list of numbers whose (American) English name has no letter in common with that of r.

Original entry on oeis.org

6, 50, 56, 60, 66, 6, 30, 36, 50, 56, 60, 66, 5, 6, 7, 9, 11, 500, 505, 506, 507, 509, 511, 600, 605, 606, 607, 609, 611, 700, 705, 706, 707, 709, 711, 900, 905, 906, 907, 909, 911, 6, 6000000, 6000006, 6000000000, 6000000006, 6006000000, 6006000006
Offset: 0

Views

Author

M. F. Hasler, Nov 06 2013

Keywords

Comments

Row lengths are given in A227857. See there for links (motivation) and further discussion.
I conjecture that the table is finite and ends with row 6000000000000000000006006000006 having the entry [3], see examples and the (supposed) complete list given in the links section.

Examples

			row 0: zero => six, fifty, fifty-six, sixty, sixty-six.
row 1: one => six, thirty, thirty-six, fifty, fifty-six, sixty, sixty-six.
row 2: two => five, six, seven, nine, eleven, five hundred, five hundred five, ..., nine hundred eleven.
row 3: three => six, six million, six million six, six billion, six billion six, six billion six million, six billion six million six, six nonillion, ..., six nonillion six billion six million six.
row 4: four => six,seven,eight,nine,ten,eleven,twelve,......
row 5: five => two, two thousand, two thousand two.
Row 13 and row 15 are the first empty rows, i.e., of length 0, i.e., row 12 [4, 6] is followed by data for row 14 [6], then row 16 [4].
Most rows for larger numbers are empty, e.g. 145..199, 245..299, ..., 712..899, 912..1999. After row 2002 [5], the only nonempty rows are those listed in row 3, containing only [3].
		

Crossrefs

Programs

  • PARI
    {row(n,lang=English/*see A052360*/,LIM=999,start=0,step=1,verbose=0)=n==5 & LIM+=2000; n==3 && return(vector(15,i,6*sum(j=0,3,bittest(i,j)*10^[0,6,9,30][j+1])))/*special case: cannot be computed by "brute force*/; my(a=[],w=lang(n)); verbose&&print1(w," => "); w=Set(Vec(w)); forstep(k=start,LIM,step, setintersect( Set(Vec(lang(k))), w) || (verbose>1&&print1( lang(k)",")) || a=concat(a,k));a}
Previous Showing 21-30 of 37 results. Next