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.

Showing 1-3 of 3 results.

A372222 Numbers which have no imbalance when they are written in English and cut at the right place (see the definition of the imbalance in the Comments section).

Original entry on oeis.org

3, 41, 74, 130, 151, 155, 159, 168, 181, 198, 200, 205, 209, 227, 244, 252, 274, 282, 342, 353, 372, 383, 431, 445, 449, 454, 484, 485, 486, 489, 528, 533, 555, 559, 581, 585, 586, 589, 641, 645, 649, 654, 655, 656, 659, 681, 686, 708, 757, 761, 765, 769, 787, 791, 796, 823, 858, 888, 928, 933, 955, 959, 981, 985, 986, 989, 1004
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 01 2024

Keywords

Comments

Take a number. Write this number in capital letters. Remove any spaces or hyphens to form a single block of contiguous letters. Cut this block into two parts using a vertical line which is tangent to at least one of the letters. The word ONE, for example, admits four cuts, the first before the O, the second between the O and the N, the third between the N and the E, the fourth after the E. These respective cuts produce the four pairs of subsets of following letters: —/ONE, O/NE, ON/E, ONE/—. A weight is now assigned to each subset. To do this, we replace each letter in the subset by its rank in the alphabet. Then we add up these ranks within the subset. The weights of the four successive pairs above are therefore {0;34}, {15;19}, {29;5}, {34;0}. The absolute difference of the two numbers that form such a pair is called imbalance. The successive imbalances in the example here are 34, 4, 24 and 34. As none is equal to zero, 1 ("ONE") is not part of the sequence.

Examples

			a(1) = 3 = THREE has no imbalance when cut between H and R as T+H = 28 = R+E+E;
a(2) = 41 = FORTYONE has no imbalance when cut between T and Y as F+O+R+T = 59 = Y+O+N+E;
a(3) = 74 = SEVENTYFOUR has no imbalance when cut between T and Y as S+E+V+E+N+T = 85 = Y+F+O+U+R; etc.
The cuts in the first integers of the sequence below are made using the equal (=) sign:
TH=REE (28=28)
FORT=YONE (59=59)
SEVENT=YFOUR (85=85)
ONEHUNDRE=DTHIRTY (104=104)
ONEHUNDRE=DFIFTYONE (104=104)
ONEHUNDRED=FIFTYFIVE (108=108)
ONEHUNDRED=FIFTYNINE (108=108)
ONEHUNDREDS=IXTYEIGHT (127=127)
ONEHUNDRED=EIGHTYONE (108=108)
ONEHUNDREDN=INETYEIGHT (122=122)
TWOH=UNDRED (66=66)
TWOHU=NDREDFIVE (87=87)
TWOHU=NDREDNINE (87=87)
TWOHUNDREDT=WENTYSEVEN (152=152)
TWOHUNDREDF=ORTYFOUR (138=138)
TWOHUNDRE=DFIFTYTWO (128=128)
TWOHUNDREDS=EVENTYFOUR (151=151)
TWOHUNDRED=EIGHTYTWO (132=132)
THREEHUNDREDF=ORTYTWO (136=136)
THREEHUNDRE=DFIFTYTHREE (126=126)
THREEHUNDREDS=EVENTYTWO (149=149)
THREEHUNDRED=EIGHTYTHREE (130=130)
FOURHUNDRED=THIRTYONE (134=134)
FOURHUNDRE=DFORTYFIVE (130=130)
FOURHUNDRE=DFORTYNINE (130=130)
FOURHUNDRE=DFIFTYFOUR (130=130)
FOURHUNDRED=EIGHTYFOUR (134=134)
FOURHUNDR=EDEIGHTYFIVE (125=125)
FOURHUNDRE=DEIGHTYSIX (130=130)
FOURHUNDR=EDEIGHTYNINE (125=125)
... etc.
		

Crossrefs

Programs

  • Python
    from num2words import num2words
    def n2w(n): return "".join(c for c in num2words(n).replace(" and", "") if c.isalpha())
    def ok(n):
        d = [ord(c) - ord('A') + 1 for c in n2w(n).upper()]
        if sum(d)%2 == 1: return False
        return any(sum(d[:i]) == sum(d[i:]) for i in range(1, len(d)))
    print([k for k in range(1005) if ok(k)]) # Michael S. Branicky, Jun 03 2024

A373317 Numbers which are their own imbalance when written in English (see the definition of the imbalance in the Comments section).

Original entry on oeis.org

17, 25, 100, 115, 116, 144, 157, 182, 184, 186, 191, 193, 199, 223, 236
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 01 2024

Keywords

Comments

Take a number. Write this number in capital letters. Remove any spaces or hyphens to form a single block of contiguous letters. Cut this block into two parts using a vertical line which is tangent to at least one of the letters. The word ONE, for example, admits four cuts, the first before the O, the second between the O and the N, the third between the N and the E, the fourth after the E. These respective cuts produce the four pairs of subsets of following letters: —/ONE, O/NE, ON/E, ONE/—. A weight is now assigned to each subset. To do this, we replace each letter in the subset by its rank in the alphabet. Then we add up these ranks within the subset. The weights of the four successive pairs above are therefore {0;34}, {15;19}, {29;5}, {34;0}. The absolute difference of the two numbers that form such a pair is called imbalance. The successive imbalances in the example here are 34, 4, 24 and 34. None is equal to 1 ("ONE"). Thus 1 is not in the sequence.
This sequence is conjectured to be finite and full.
It is true that there are no more terms. Computationally, there are none < 10^8. Let v(n) be the sum of the valuations of all the letters in the name of n. Terms in the sequence require n < v(n). Now note that if 1000^(e-1) <= n < 1000^e, then v(n) <= (314+216)*e, where the loose upper bound comes from "sevenhundredseventyseven" and "quattuordecillion" considering all terms up to 10^66 using English names of large numbers (see Wikipedia link; similar bounds can be derived for extended naming schemes). Thus, (i) v(n) <= 530*e <= 1000^(e-1) for e >= 3; and (ii) for e < 3, v(n) <= 314 + (314+102) + (314+84) = 1128, where 102 and 84 come from "thousand" and "million", respectively. Bound (i) shows there can be no terms >= 10^6; (ii) that there are no terms >= 1128; indeed, (ii) can be extended down to show there are no terms >= 314). - Michael S. Branicky, Jun 03 2024

Examples

			17 has an imbalance of 17 units when cut between V and E:
S+E+V = 46 and E+N+T+E+E+N = 63. We have indeed 63 - 46 = 17.
25 has an imbalance of 25 units when cut between N and T:
T+W+E+N = 62 and T+Y+F+I+V+E = 87. We have indeed 87 - 62 = 25.
The cuts in the integers below are made using the sign ——:
SEV——ENTEEN (46——63 = 17)
TWEN——TYFIVE (87——62 = 25)
ONEHUNDRE——D (104——4 = 100)
ON——EHUNDREDFIFTEEN (29——144 = 115)
ONEHUNDREDSIX——TEEN (160——44 = 116)
ONEHUNDREDFORTYF——OUR (198——54 = 144)
ONEHUNDREDFIFTYSE——VEN (198——41 = 157)
ON——EHUNDREDEIGHTYTWO (29——211 = 182)
ON——EHUNDREDEIGHTYFOUR (29——213 = 184)
ONEHUNDREDEIGHTYSI——X (210——24 = 186)
ONEHUNDREDNINETYO——NE (210——19 = 191)
ON——EHUNDREDNINETYTHREE (29——222 = 193)
ONEHUNDREDNINETYNI——NE (218——19 = 199)
TWOHUNDREDTWENTYT——HREE (259——36 = 223)
TWOHUNDREDTHIRTYSI——X (260——24 = 236).
No integer has been found that could be cut in more than one way.
		

Crossrefs

Cf. A104059, A373321 (French version), A083967, A372222.

Programs

  • Python
    from num2words import num2words
    def n2w(n): return "".join(c for c in num2words(n).replace(" and", "") if c.isalpha())
    def ok(n):
        d = [ord(c) - ord('A') + 1 for c in n2w(n).upper()]
        if sum(d) < n: return False
        return any(abs(sum(d[:i])-sum(d[i:])) == n for i in range(1, len(d)))
    print([k for k in range(1005) if ok(k)]) # Michael S. Branicky, Jun 03 2024

A373356 Numbers which have no imbalance when they are written in French and cut at the right place (see the definition of the imbalance in the Comments section).

Original entry on oeis.org

8, 34, 52, 77, 82, 108, 121, 127, 130, 139, 172, 186, 232, 274, 287, 291, 313, 314, 319, 333, 341, 347, 355, 362, 394, 409, 426, 434, 471, 489, 535, 569, 576, 598, 602, 636, 674, 688, 731, 737, 743, 763, 807, 811, 838, 843, 854, 896, 921, 927, 934, 939, 986, 1094, 1162, 1255, 1292, 1306
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 02 2024

Keywords

Comments

Take a number. Write this number in capital letters. Remove any spaces or hyphens to form a single block of contiguous letters. Cut this block into two parts using a vertical line which is tangent to at least one of the letters. The word ONE, for example, admits four cuts, the first before the O, the second between the O and the N, the third between the N and the E, the fourth after the E. These respective cuts produce the four pairs of subsets of following letters: —/ONE, O/NE, ON/E, ONE/—. A weight is now assigned to each subset. To do this, we replace each letter in the subset by its rank in the alphabet. Then we add up these ranks within the subset. The weights of the four successive pairs above are therefore {0;34}, {15;19}, {29;5}, {34;0}. The absolute difference of the two numbers that form such a pair is called imbalance. The successive imbalances in the example here are 34, 4, 24 and 34.

Examples

			a(1) = 8 = HUIT is balanced when cut between U and I as H+U = 29 = I+T;
a(2) = 34 = TRENTEQUATRE is balanced when cut between E and Q as T+R+E+N+T+E = 82 = Q+U+A+T+R+E;
a(3) = 52 = CINQUANTEDEUX is balanced when cut between N and T as C+I+N+Q+U+A+N = 79 = T+E+D+E+U+X; etc.
The cuts in the first integers of the sequence below are made using the equal (=) sign:
HU=IT (29=29)
TRENTE=QUATRE (82=82)
CINQUAN=TEDEUX (79=79)
SOIXANT=EDIXSEPT (102=102)
QUATREV=INGTDEUX (104=104)
CENTH=UIT (50=50)
CENTVIN=GTETUN (87=87)
CENTVIN=GTSEPT (87=87)
CENTT=RENTE (62=62)
CENTTRE=NTENEUF (85=85)
CENTSOIXA=NTEDOUZE (110=110)
CENTQUATRE=VINGTSIX (124=124)
DEUXCENTT=RENTEDEUX (116=116)
DEUXCENTSOIX=ANTEQUATORZE (163=163)
DEUXCENTQUAT=REVINGTSEPT (155=155)
DEUXCENTQUAT=REVINGTONZE (155=155)
TROISCEN=TTREIZE (103=103)
TROISCENT=QUATORZE (123=123)
TROISCEN=TDIXNEUF (103=103)
TROISCENTT=RENTETROIS (143=143)
TROISCENTQ=UARANTEETUN (140=140)
TROISCENTQ=UARANTESEPT (140=140)
TROISCENTCI=NQUANTECINQ (135=135)
TROISCENTS=OIXANTEDEUX (142=142)
TROISCENTQUATR=EVINGTQUATORZE (200=200)
QUATREC=ENTNEUF (85=85)
QUATRECENT=VINGTSIX (124=124)
QUATRECENTT=RENTEQUATRE (144=144)
QUATRECENTSO=IXANTEETONZE (158=158)
QUATRECENTQU=ATREVINGTNEUF (162=162)
CINQCENTT=RENTECINQ (105=105)
CINQCENTSO=IXANTENEUF (119=119)
CINQCENTSOI=XANTESEIZE (128=128)
CINQCENTQUATRE=VINGTDIXHUIT (167=167)
SIXCEN=TDEUX (74=74)
...
		

Crossrefs

Showing 1-3 of 3 results.