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 11-20 of 37 results. Next

A073029 Names for numbers in American English, with each letter transformed into its index in the alphabet.

Original entry on oeis.org

26, 5, 18, 15, 15, 14, 5, 20, 23, 15, 20, 8, 18, 5, 5, 6, 15, 21, 18, 6, 9, 22, 5, 19, 9, 24, 19, 5, 22, 5, 14, 5, 9, 7, 8, 20, 14, 9, 14, 5, 20, 5, 14, 5, 12, 5, 22, 5, 14, 20, 23, 5, 12, 22, 5, 20, 8, 9, 18, 20, 5, 5, 14, 6, 15, 21, 18, 20, 5, 5, 14, 6, 9, 6, 20, 5, 5, 14, 19, 9, 24, 20, 5
Offset: 0

Views

Author

Zak Seidov, Aug 22 2002

Keywords

Comments

Irregular triangle read by rows, in which row n lists the successive indices of the letters in the American English name for n. For example, row one is 15, 14, 5. - N. J. A. Sloane, Apr 22 2023
Find smallest n's for which a(n)=1,2,3,4,...,26.
A: The numbers 10 and 11 never occur. The rows in which the others occur first (assuming use of the "short scale") are 1000 (thousAnd), 10^9 (Billion), 10^27 (oCtillion), 100 (hunDred), 0 (zEro), 4 (Four), 8 (eiGht), 3 (tHree), 5 (fIve), --, -- (j & k don't occur in English names of numbers), 11 (eLeven), 10^6 (Million), 1 (oNe), 0 (zerO), 10^24 (sePtillion), 10^15 (Quadrillion), 0 (zeRo), 6 (Six), 2 (Two), 4 (foUr), 5 (fiVe), 2 (tWo), 6 (siX), 20 (twentY), 0 (Zero). Converting the position in the row plus the preceding row lengths to a linear index n this yields (after subtracting 1 to match offset 0 of the sequence): 18452, ?, ?, 864, 1, 15, 33, 11, 20, -, -, 44, ?, 5, 3, ?, ?, 2, 23, 7, 17, 21, 8, 25, 115, 0. The graph nicely shows the position & frequency of the individual letters. - M. F. Hasler, Feb 06 2016

Examples

			Top row is for "zero"; "z" is the 26th letter in the alphabet, "e" the fifth, "r" the 18th and "o" the 15th, so the first row is 26,5,18,15.
		

Crossrefs

Cf. A005589 (row lengths).
Cf. A073327 (row sums).
Cf. A072922.

Programs

  • Mathematica
    alef=Characters["abcdefghijklmnopqrstuvwxyz"]; numb="zeroonetwothreefourfivesixseveneightnineteneleven[...]"; ch=Characters[numb]; seq[n_] := Position[alef, ch[[n]]][[1, 1]] (* Franklin T. Adams-Watters, Jun 02 2006 *)
    (* see the link to a001477.txt, copy the first 17 lines and then paste and assign to the variable 'str' as a string as follows *)
    str = "zeroonetwothreefourfivesixseveneightnineteneleventwelvethirteenfourteenfifteensixteen";
    Characters@ str /. Flatten[ Table[ {FromCharacterCode[96 + n] -> n}, {n, 26}]] (* Robert G. Wilson v, Jun 08 2010 *)
  • PARI
    A073029_row(n)=select(t->t>64,Vec(Vecsmall(English(n))))%32 \\ See A052360 for English(). - M. F. Hasler, Feb 06 2016
    
  • Python
    from num2words import num2words
    def row(n): return [ord(c)-96 for c in num2words(n).replace(" and", "") if c.isalpha()]
    print([e for n in range(17) for e in row(n)]) # Michael S. Branicky, Apr 22 2023

Extensions

Corrected and extended by Franklin T. Adams-Watters, Jun 02 2006, Oct 24 2006

A072956 Turban numbers: without letters r, t, or u.

Original entry on oeis.org

1, 5, 6, 7, 9, 11, 1000000, 1000001, 1000005, 1000006, 1000007, 1000009, 1000011, 5000000, 5000001, 5000005, 5000006, 5000007, 5000009, 5000011, 6000000, 6000001, 6000005, 6000006, 6000007, 6000009, 6000011, 7000000, 7000001, 7000005, 7000006, 7000007, 7000009
Offset: 1

Views

Author

Michael Joseph Halm, Aug 13 2002

Keywords

References

  • M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002).

Crossrefs

Cf. A006933 (eban numbers: without 'e'), A008521 (without 'o'), A008523 (without 't'), A008537 (without 'n'), A089590 (without 'u'), A072957 (urban numbers: without r or u), A089589 (without 'i').

Programs

  • PARI
    is(n)=!setintersect(Set(Vec(English(n))),["r","t","u"]) \\ See A052360 for English(). - M. F. Hasler, Apr 01 2019
    
  • Python
    from num2words import num2words
    from itertools import islice, product
    def ok(n): return set(num2words(n)) & {"r", "t", "u"} == set()
    def agen(): # generator of terms < 10**304
        base, pows = [k for k in range(1, 1000) if ok(k)], [1]
        yield from ([0] if ok(0) else []) + base
        for e in range(3, 304, 3):
            if set(num2words(10**e)[4:]) & {"r", "t", "u"} == set():
                pows = [10**e] + pows
                for t in product([0] + base, repeat=len(pows)):
                    if t[0] == 0: continue
                    yield sum(t[i]*pows[i] for i in range(len(t)))
    print(list(islice(agen(), 66))) # Michael S. Branicky, Aug 19 2022

A072957 Urban numbers: without 'r' or 'u'.

Original entry on oeis.org

1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 50, 51, 52, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 75, 76, 77, 78, 79, 80, 81, 82, 85, 86, 87, 88, 89, 90, 91, 92, 95, 96, 97, 98, 99, 1000000, 1000001, 1000002
Offset: 1

Views

Author

Michael Joseph Halm, Aug 13 2002

Keywords

References

  • M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002).

Crossrefs

Cf. A006933 (eban numbers: without 'e'), A008521 (without 'o'), A008523 (without 't'), A008537 (without 'n'), A089590 (without 'u'), A072956 (turban numbers: without r, t or u), A089589 (without 'i').

Programs

  • PARI
    is(n)=!setintersect(Set(Vec(English(n))),["r","u"]) \\ See A052360 for English(). - M. F. Hasler, Apr 01 2019
    /* Alternate code, not using English(): (valid for 1 <= n < one trillion, which should be forbidden due to the 'r' but returns 1) */
    is(n)={setintersect( Set(digits(n)), [3,4]) && return; !while(n=divrem(n,10^6), n[2]<100||return; n=n[1])} \\ M. F. Hasler, Apr 01 2019
    
  • Python
    from num2words import num2words
    from itertools import islice, product
    def ok(n): return set(num2words(n)) & {"r", "u"} == set()
    def agen(): # generator of terms < 10**304
        base, pows = [k for k in range(1, 1000) if ok(k)], [1]
        yield from ([0] if ok(0) else []) + base
        for e in range(3, 304, 3):
            if set(num2words(10**e)[4:]) & {"r", "u"} == set():
                pows = [10**e] + pows
                for t in product([0] + base, repeat=len(pows)):
                    if t[0] == 0: continue
                    yield sum(t[i]*pows[i] for i in range(len(t)))
    print(list(islice(agen(), 66))) # Michael S. Branicky, Aug 19 2022

Extensions

Missing term 52 inserted by Michael S. Branicky, Aug 19 2022

A067278 a(n) = letters(n) + a(n-1); a(0) = 0.

Original entry on oeis.org

0, 3, 6, 11, 15, 19, 22, 27, 32, 36, 39, 45, 51, 59, 67, 74, 81, 90, 98, 106, 112, 121, 130, 141, 151, 161, 170, 181, 192, 202, 208, 217, 226, 237, 247, 257, 266, 277, 288, 298, 303, 311, 319, 329, 338, 347, 355, 365, 375, 384, 389, 397, 405, 415, 424, 433, 441
Offset: 0

Views

Author

Scott A. Brown, Feb 22 2002

Keywords

Examples

			0 + one = 3, 3 + two = 6, 6 + three = 11, 11 + four = 15, 15 + five = 19, ....
		

Crossrefs

Formula

a(n) = A005589(n) + a(n-1). - Michael S. Branicky, Mar 03 2025

A227857 Number of numbers whose American English name has no letter in common with that of n.

Original entry on oeis.org

5, 7, 29, 15, 36, 3, 95, 11, 1, 5, 2, 19, 2, 0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 3, 0, 2, 0, 2, 0, 2, 0, 0, 0, 4, 1, 4, 1, 4, 0, 1, 0, 0, 0, 12, 0, 5, 0, 2, 0, 6, 0, 0, 0, 12, 0, 1, 0, 1, 0, 12, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2013

Keywords

Comments

The sequence is well defined and zero for n sufficiently large (> 6.1*10^30 ?) because "million", "billion" etc. have a letter in common with all small numbers except for three, which is letter-disjoint with six. Therefore, 3 is letter-disjoint with six, six million, six billion, six nonillion (10^30) and any nonempty sum of two or more of these. See also example of a(5).

Examples

			a(0) = 5 = # {6, 50, 56, 60, 66} because "zero" has no letter in common with: six, fifty, fifty-six, sixty, sixty-six.
a(5) = 3 = # {2, 2000, 2002} because "five" has no letter in common with: two, two thousand, two thousand two. ("thousand" is not considered; "one thousand" is excluded.)
a(3) = 15 = 2^4-1 because any nonzero sum_{i=0,6,9,30} e_i*10^i with e_i in {0, 6} is "letter-disjoint" with three.
		

Programs

  • PARI
    A227857(n,lang=English/*see A052360*/,L=999,o=0)={n==5 && L+=2000; n==3 && return(15)/*can't be computed explicitely*/; n=setminus(Set(Vec(lang(n))),Set([" ","-"])); sum(k=o,L,!setintersect( Set(Vec(lang(k))), n))}

A241858 Positions of vowels in "one, two, three, four, five, six, ...".

Original entry on oeis.org

1, 3, 6, 10, 11, 13, 14, 17, 19, 21, 24, 26, 28, 29, 34, 36, 38, 40, 42, 44, 48, 51, 54, 57, 58, 61, 62, 65, 66, 69, 72, 73, 76, 79, 80, 83, 85, 88, 89, 91, 92, 96, 97, 100, 102, 104, 105, 109, 115, 119, 121, 124, 130, 133, 140, 141, 144, 149, 150, 154, 159, 161, 164, 169
Offset: 1

Views

Author

J. Lowell, Apr 30 2014

Keywords

Comments

Consider only letters, but not spaces or punctuation.

Examples

			The letters in "four" are the twelfth through fifteenth letters in "one, two, three, four, five, six, ...". The o and u, which are 13 and 14, are vowels.
		

Crossrefs

Programs

  • PARI
    A241858_vec(N,v=Vec("aeiou"),n,s,p,o)=vector(N,j, until( setsearch(v,s[p-o]), o+#s"@"]); p) \\ see A052360 for English(). - M. F. Hasler, Aug 11 2020

Extensions

More terms from Alois P. Heinz, Apr 30 2014
a(62)-a(64) from M. F. Hasler, Aug 11 2020

A008537 Numbers that do not contain the letter 'n'.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 8, 12, 30, 32, 33, 34, 35, 36, 38, 40, 42, 43, 44, 45, 46, 48, 50, 52, 53, 54, 55, 56, 58, 60, 62, 63, 64, 65, 66, 68, 80, 82, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Keywords

Comments

From M. F. Hasler, Apr 01 2019: (Start)
This sequence contains 42 nonzero terms below 10^9, plus the initial a(1) = 0.
Since "hundred", "thousand", "million" etc. are forbidden, the only way to extend the sequence would be to use long scale with "milliard" for 10^9: then the next term would be a(44) = 2*10^9 = "two milliards", a(45) = 2*10^9 + 2, and so on.
The 2019 "April Fools contest" on codeforces.com referred to these numbers as "Kanban numbers", i.e., numbers which ban the letters 'k', 'a' and 'n'. But no 'k' ever appears, and unless we consider "milliard", 'a' only appears (in "thousand" and later "quadrillion") in conjunction with 'n', which therefore is the only relevant. So "n-ban (or maybe: anban) numbers" would be more a adequate name. (End)

Crossrefs

Cf. A006933 (eban numbers: without 'e'), A089589 (without 'i'), A008521 (without 'o'), A089590 (without 'u'), A008523 (without 't'), A072956 (turban numbers: without r, t or u), A072957 (urban numbers: without r or u).

Programs

  • PARI
    is(n)=!setsearch(Set(Vec(English(n))),"n") \\ See A052360 for English(). - M. F. Hasler, Apr 01 2019
    
  • Python
    from num2words import num2words
    afull = [k for k in range(100) if "n" not in num2words(k)]
    print(afull) # Michael S. Branicky, Aug 18 2022

Extensions

Edited by M. F. Hasler, Apr 01 2019

A226911 Remainder modulo n of the sum of the letters of the English word(s) for n (A073327: a=1, ..., z=26).

Original entry on oeis.org

0, 0, 2, 0, 2, 4, 2, 1, 6, 9, 8, 3, 8, 6, 5, 0, 7, 1, 10, 7, 15, 11, 2, 23, 24, 3, 10, 16, 4, 10, 10, 30, 24, 24, 2, 8, 17, 35, 25, 4, 36, 16, 11, 12, 36, 44, 8, 37, 28, 16, 49, 20, 16, 18, 53, 6, 17, 57, 49, 37, 9, 31, 27, 29, 9, 17, 28, 10, 1, 40, 2, 24, 20, 22, 2, 10, 21, 3
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Jun 22 2013

Keywords

Comments

By definition, a(n) < n so iterated application of this function to any initial value n will create a strictly decreasing sequence ending in 0.

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:
    map(f, [$1..100]); # Robert Israel, Jun 12 2019
  • Mathematica
    a[n_] := Mod[Total@ Flatten[ ToCharacterCode[#] - 96 & /@ Characters@ StringDelete[ IntegerName[n], Except@ LetterCharacter]], n] (* after Michael De Vlieger in A362065 *); Array[a, 78] (* Robert G. Wilson v, Apr 22 2023 *)
  • PARI
    A226911 = n->A073327(n)%n

Formula

a(n) = A073327(n) mod n.
It appears that a(n) = A073327(n) for n > 279. - Robert Israel, Jun 12 2019

A230763 Length of segments delimited by the letter "e" when the sequence is spelled out in English.

Original entry on oeis.org

6, 1, 8, 5, 2, 7, 4, 10, 1, 2, 2, 3, 7, 10, 2, 1, 2, 6, 19, 8, 10, 2, 2, 2, 2, 2, 20, 2, 10, 2, 4, 7, 11, 8, 2, 2, 2, 2, 5, 10, 2, 4, 7, 1, 2, 5, 2, 2, 2, 10, 2, 5, 10, 11, 2, 8, 2, 1, 10, 1, 6, 3, 10, 2, 11
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Oct 29 2013

Keywords

Comments

Translate the sequence S to English, to get English(S) = (SIX, ONE, EIGHT, FIVE, TWO, SEVEN, FOUR, TEN, ONE, TWO, TWO, THREE, SEVEN, TEN, TWO, ONE, TWO, SIX, NINETEEN, EIGHT, TEN, TWO, TWO, TWO, TWO, TWO, TWENTY, TWO, TEN, TWO, FOUR, SEVEN, ELEVEN, ...).
Then insert a stroke immediately after each letter "E" of S: "SIX, ONE|, E|IGHT, FIVE|, TWO, SE|VE|N, FOUR, TE|N, ONE|, TWO, TWO, THRE|E|, SE|VE|N, TE|N, TWO, ONE|, TWO, SIX, NINE|TE|E|N, E|IGHT, TE|N, TWO, TWO, TWO, TWO, TWO, TWE|NTY, TWO, TE|N, TWO, FOUR, SE|VE|N, E|LE|VE|N," ...
Now the length of each chunk is given by the sequence S itself. In case of several possible choices compatible with this property, we require the smallest one to be chosen.

Examples

			We see thus that the sequence cannot start with ONE, or TWO, or THREE, or FOUR or FIVE (because the presence or the absence of the letter "E" in those numbers leads to a contradiction). We could start with THIRTY, FORTY, FIFTY and SIXTY also -- but SIX is the smallest available integer. After SIX, we could also have chosen TWENTY, but again, we want the smallest integer fitting the pattern, which is ONE; therefore, the sequence starts: S = (SIX, ONE|, ...)
See the link to Angelini's page for further developments.
		

Crossrefs

Cf. A052360.

Programs

  • PARI
    /* see A052360 for the function English(). We implement a function which "caches" the English words (as Vecsmall() of ASCII codes) in an array for faster treatment. */
    VET=[];VE(n)={#VETL+a[j] || (( i==L+a[j] ) != (s[i] ==101))) && return; s[i] != 101 && next; L=i; j++)}
    /* This extends the sequence 'a' by 'n' terms. Note, the last terms added may turn out to be not "valid", when the sequence is extended further. Could be programmed much more efficiently. */
    extend(n,a=[],s=Vecsmall([]))={check(a,s)||return; n-- || return(a); my(t); for(k=1,99,(t=extend(n,concat(a,k),concat(s,VE(k))))&& return(t))}
    /* To produce the sequence, use, e.g. */ extend(50)

A049528 Number of letters in n-th prime (in English).

Original entry on oeis.org

3, 5, 4, 5, 6, 8, 9, 8, 11, 10, 9, 11, 8, 10, 10, 10, 9, 8, 10, 10, 12, 11, 11, 10, 11, 13, 15, 15, 14, 18, 21, 19, 21, 20, 19, 18, 20, 20, 20, 22, 21, 19, 19, 21, 21, 20, 16, 21, 21, 20, 21, 20, 18, 18, 20, 20, 19, 20, 22, 19, 21, 21, 17, 18, 20, 21, 21, 23
Offset: 1

Views

Author

Keywords

Examples

			a(13) = 8 because 'forty-one' contains 8 letters (not counting the hyphen).
		

Crossrefs

Programs

  • Python
    from sympy import nextprime
    from itertools import count, islice
    from num2words import num2words as n2w
    def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())
    def agen(p=2):
        while True: yield f(p); p = nextprime(p)
    print(list(islice(agen(), 68))) # Michael S. Branicky, Jul 12 2022

Formula

a(n) = A005589(A000040(n)) or a(n) = A052360(A000040(n)) depending on whether hyphens and spaces are excluded or included. - Jonathan Vos Post, Oct 19 2007
a(n) = A005589(A000040(n)) since it does not count spaces or hyphens. - Michael S. Branicky, Jul 12 2022

Extensions

a(66) and beyond from Michael S. Branicky, Jul 12 2022
Previous Showing 11-20 of 37 results. Next