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.

User: Jean-Marc Falcoz

Jean-Marc Falcoz's wiki page.

Jean-Marc Falcoz has authored 337 sequences. Here are the ten most recent ones:

A376128 The absolute difference of two successive terms is prime and the absolute difference of two successive digits is also prime.

Original entry on oeis.org

0, 2, 4, 1, 3, 5, 7, 9, 6, 8, 13, 16, 14, 25, 20, 27, 24, 29, 42, 47, 49, 46, 35, 30, 53, 50, 31, 36, 38, 57, 52, 41, 64, 61, 63, 58, 69, 72, 70, 75, 86, 81, 68, 135, 74, 79, 242, 469, 246, 83, 85, 252, 425, 202, 413, 130, 203, 136, 131, 358, 147, 94, 92, 97, 270, 241, 302, 429, 250, 207, 205, 258, 149
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Sep 11 2024

Keywords

Examples

			Terms a(1) to a(15) are 0,2,4,1,3,5,7,9,6,8,13,16,14,25,20.
The successive absolute differences between two terms are the primes 2,2,3,2,2,2,2,3,2,5,3,2,11,5.
The successive absolute differences between two digits are the primes 2,2,3,2,2,2,2,3,2,7,2,2,5,5,3,2,3,3,2.
		

Crossrefs

Programs

  • Python
    # uses A219248gen in A219248
    from sympy import isprime
    from itertools import count, islice
    def c(an, k):
        return isprime(abs(an-k)) and isprime(abs(an%10-int(str(k)[0])))
    def agen(): # generator of terms
        an, aset = 0, {0}
        while True:
            yield an
            an = next(k for k in A219248gen(seed=str(an%10)) if k not in aset and c(an, k))
            aset.add(an)
    print(list(islice(agen(), 73))) # Michael S. Branicky, Sep 11 2024

A375614 Lexicographically earliest infinite sequence of distinct nonnegative pairs of terms that interpenetrate to produce a prime number.

Original entry on oeis.org

0, 11, 3, 17, 2, 23, 6, 13, 1, 21, 4, 19, 7, 27, 5, 33, 8, 39, 103, 10, 153, 20, 107, 12, 131, 15, 109, 16, 111, 26, 113, 24, 101, 30, 119, 14, 123, 25, 117, 29, 141, 22, 127, 18, 133, 31, 129, 28, 121, 34, 169, 36, 137, 32, 167, 38, 147, 35, 171, 43, 157, 37, 9, 41, 149, 44, 159, 55, 139, 46, 151, 45, 163, 48, 173, 42, 143, 51, 187, 49, 177, 52, 183, 50, 161, 54, 179, 47, 189
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 22 2024

Keywords

Comments

The term a(n) must always be exactly one digit longer or shorter than the term a(n+1).

Examples

			Interpenetrate a(1) = 0 and a(2) = 11 to form 101 (a prime number);
interpenetrate a(2) = 11 and a(3) = 3 to form 131 (a prime number);
interpenetrate a(3) = 3 and a(4) = 17 to form 137 (a prime number);
interpenetrate a(4) = 17 and a(5) = 2 to form 127 (a prime number);
interpenetrate a(5) = 2 and a(6) = 23 to form 223 (a prime number);
interpenetrate a(6) = 23 and a(7) = 6 to form 263 (a prime number);
interpenetrate a(7) = 6 and a(8) = 13 to form 163 (a prime number);
interpenetrate a(8) = 13 and a(9) = 1 to form 113 (a prime number);
(...)
interpenetrate a(18) = 39 and a(19) = 103 to form 13093 (a prime number);
(...)
interpenetrate a(167) = 277 and a(168) = 1009 to form 1207079 (a prime number); etc.
		

Crossrefs

Programs

  • Maple
    Q:= proc(a,b) local La, Lb, i;
      La:= convert(a,base,10);
      Lb:= convert(b,base,10);
      add(La[i]*10^(2*i-2),i=1..nops(La)) + add(Lb[i]*10^(2*i-1),i=1..nops(Lb))
    end proc:
    f:= proc(n) local d,x;
      d:= 1+ilog10(n);
      if n::odd then
        for x from 10^(d-2) to 10^(d-1) - 1 do
          if not(member(x,S)) and isprime(Q(n,x)) then return x fi
        od
      fi;
      for x from 10^d+1 to 10^(d+1) - 1 by 2 do
        if not(member(x,S)) and isprime(Q(x,n)) then return x fi
      od;
    FAIL
    end proc:
    R:= 0,11: S:= {0,11}: v:= 11:
    for i from 2 to 100 do
      v:= f(v);
      R:= R,v;
      S:= S union {v};
    od:
    R; # Robert Israel, Aug 22 2024
  • Python
    from sympy import isprime
    from itertools import islice
    def ip(s, t): return int("".join(x+v for x, v in zip(s, t))+s[-1])
    def agen(): # generator of terms
        seen, an, found = set(), 0, True
        while found:
            yield an
            seen.add(an)
            s = str(an)
            d, found = len(s), False
            if s[-1] in "1379" and d > 1:
                for k in range(10**(d-2), 10**(d-1)):
                    if k not in seen and isprime(ip(s, str(k))):
                        an, found = k, True
                        break
            if not found:
                for k in range(10**d, 10**(d+1)):
                    if k not in seen and isprime(ip(str(k), s)):
                        an, found = k, True
                        break
    print(list(islice(agen(), 90))) # Michael S. Branicky, Aug 22 2024

A375328 Terms as well as digits fit the prime/prime/nonprime pattern; this is the lexicographically earliest injective sequence with this property.

Original entry on oeis.org

2, 3, 0, 5, 7, 1, 23, 13, 20, 37, 17, 21, 53, 43, 24, 73, 47, 26, 229, 239, 22, 67, 29, 25, 83, 31, 27, 97, 59, 32, 127, 137, 4, 251, 271, 33, 157, 173, 6, 331, 359, 35, 433, 457, 8, 379, 521, 52, 653, 673, 9, 571, 739, 55, 677, 823, 12, 71, 751, 57, 827, 853, 15, 79, 2203, 28, 2207, 263, 30, 2213, 283, 34, 2243
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 13 2024

Keywords

Examples

			a(4) = 5, a(5) = 7, a(6) = 1, a(7) = 23, a(8) = 13, a(9) = 20; we see that a(4), a(5), a(7) and a(8) are primes and that a(6) and a(9) are nonprimes. The digits involved fit the pattern prime/prime/nonprime too; they are 5,7,1,2,3,1,3,2 and 0.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def bgen(i): # generates terms with p/p/np, p/np/p, or np/p/p digits
        digs = ["014689", "2357"]
        for digits in count(1):
            patt = [digs[(i+j)%3 < 2] for j in range(digits)]
            yield from (int("".join(s)) for s in product(*patt) if digits==1 or s[0]!="0")
    def agen(): # generator of terms
        seen, s = set(), 0
        for n in count(1):
            p = (n-1)%3 < 2
            an = next(k for k in bgen(s) if k not in seen and isprime(k)==p)
            yield an
            seen.add(an)
            s += len(str(an))
    print(list(islice(agen(), 99))) # Michael S. Branicky, Aug 13 2024

A375327 Terms as well as digits fit the nonprime/nonprime/prime pattern; this is the lexicographically earliest injective sequence with this property.

Original entry on oeis.org

0, 1, 2, 4, 6, 3, 8, 9, 5, 10, 20, 13, 14, 21, 17, 16, 24, 43, 18, 26, 47, 40, 28, 67, 44, 30, 83, 46, 34, 97, 48, 36, 131, 12, 49, 7, 60, 38, 139, 15, 64, 29, 42, 66, 31, 45, 68, 59, 62, 69, 71, 63, 80, 79, 65, 81, 211, 39, 82, 11, 50, 85, 19, 51, 87, 41, 54, 92, 61, 56, 93, 89, 58, 95, 103, 84, 70, 151, 120
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 13 2024

Keywords

Examples

			a(9) = 5, a(10) = 10, a(11) = 20, a(12) = 13, a(13) = 14, a(14) = 21 ; we see that a(9) and a(12) are primes and that a(10), a(11), a(13); and a(14) are nonprimes. The digits involved fit the pattern nonprime/nonprime/prime too; they are 5,1,0,2,0,1,3,1,4,2 and 1.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def bgen(i): # generates terms with np/np/p, np/p/np, or p/np/np digits
        digs = ["014689", "2357"]
        for digits in count(1):
            patt = [digs[(i+j)%3 == 2] for j in range(digits)]
            yield from (int("".join(s)) for s in product(*patt) if digits==1 or s[0]!="0")
    def agen(): # generator of terms
        seen, s = set(), 0
        for n in count(1):
            p = (n-1)%3 == 2
            an = next(k for k in bgen(s) if k not in seen and isprime(k)==p)
            yield an
            seen.add(an)
            s += len(str(an))
    print(list(islice(agen(), 99))) # Michael S. Branicky, Aug 13 2024

A375326 Terms as well as digits fit the nonprime/prime pattern; this is the lexicographically earliest injective sequence with this property.

Original entry on oeis.org

0, 2, 1, 3, 4, 5, 6, 7, 8, 29, 20, 31, 21, 59, 24, 71, 26, 79, 28, 263, 9, 283, 12, 13, 15, 17, 42, 43, 45, 47, 62, 67, 63, 83, 65, 97, 82, 131, 30, 293, 85, 139, 34, 307, 87, 151, 36, 313, 92, 179, 38, 317, 93, 421, 39, 347, 95, 431, 50, 367, 120, 383, 121, 397, 124, 503, 126, 547, 128, 563, 129, 587, 130
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 12 2024

Keywords

Examples

			a(9) = 8, a(10) = 29, a(11) = 20, a(12) = 31; we see that a(9) and a(11) are nonprimes and that a(10) and a(12) are primes. The digits involved fit the pattern nonprime/prime too; they are 8, 2, 9, 2, 0, 3, 1.
		

Crossrefs

Cf. A217555.

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def bgen(i): # generates terms with prime/nonprime or nonprime/prime digits
        digs = ["014689", "2357"]
        for digits in count(1):
            patt = [digs[(i+j)&1] for j in range(digits)]
            yield from (int("".join(s)) for s in product(*patt) if s[0]!="0")
    def agen(): # generator of terms
        seen, s, an = {0, 2}, 2, 2
        yield from [0, 2]
        for n in count(3):
            p = (n&1) == 0
            an = next(k for k in bgen(s) if k not in seen and isprime(k)==p)
            yield an
            seen.add(an)
            s += len(str(an))
    print(list(islice(agen(), 99))) # Michael S. Branicky, Aug 12 2024

A375244 List of triples {w;x;y} where «w» is the w-th «pyramid», "x" = the number of elements in the «pyramid» that are not erased (before the end-level erasure); "y" is the number of steps in the pyramid until the iteration stops. See the Comments section for more details.

Original entry on oeis.org

1, 13, 12, 2, 12, 11, 3, 12, 10, 4, 11, 10, 5, 2, 4, 6, 11, 9, 7, 127, 79, 8, 10, 9, 9, 9, 7, 10, 1, 3, 11, 1, 2, 12, 10, 8, 13, 10, 8, 14, 126, 78, 15, 121, 77, 16, 9, 8, 17, 119, 75, 18, 8, 6, 19, 118, 74, 20, 1, 3, 21, 136, 76, 22, 1, 2, 23, 134, 75, 24, 120, 74, 25, 9, 9, 26, 121, 74, 27, 7, 8, 28, 116, 73
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 07 2024

Keywords

Comments

Start the top of a "pyramid" with an integer w.
Form the lower level by adding w to each digit of w.
Erase any term having one or more duplicates, as well as its duplicates.
Iterate.
All "pyramids" will be blocked at some point, because their lowest level will end up completely erased.

Examples

			We start the first pyramid with w = 1:
.
                                 1
                                 2
                                 4
                                 8
                                16
                               17.22
                            18.24.24.24
             (a triple erasure, 22 will be erased later)
                               19.26
                            20.28.28.32
             (a double erasure, 20 will be erased later)
                            22.20.35.34
              (we erase now the 22-pair and the 20-pair)
                            38.40.37.38
      (a double erasure again, 40 will be erased at the next step)
                            44.40.40.44
.
The iteration stops there. w = 1, x = 13 as 13 terms were not erased in the blocked pyramid, y = 12 as the now blocked-pyramid has 12 levels.
Those numbers form the first triple of the sequence {1;13;12}.
		

Crossrefs

Cf. A351330.

A375243 Infinite variant of A375232.

Original entry on oeis.org

0, 10, 20, 100, 30, 102, 40, 101, 203, 105, 60, 1024, 300, 107, 200, 150, 304, 1026, 80, 109, 230, 10457, 0, 120, 306, 110, 204, 1058, 303, 10279, 0, 1046, 302, 501, 0, 201, 3048, 170, 206, 1059, 330, 1042, 0, 1000, 320, 105678, 400, 210, 3000, 190, 202, 1045, 360, 1027, 800, 1001, 2034, 510, 0, 10269
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 07 2024

Keywords

Comments

Instead of stopping the sequence when no integer is available, we extend it with 0 and go on (0 being the only term allowed to be repeated whenever nothing else works). This method seems to work ad infinitum.
Around 90% of the terms are not equal to 0.
For the first 1000 terms, the largest chunk between two successive 0 is the 24-integer long serie [101101, 2630, 8015, 40044, 10122, 333330, 1907, 200222, 10456, 10200, 80008, 101110, 3204, 5107, 6660, 9012, 1400, 202000, 8051, 10276, 40400, 101111, 20223, 5109].

Examples

			The finite sequence A375232 ends with 80, 109, 230, 10457. If we extend it with a(23) = 0, we can compute a(24) = 120, a(25) = 306 then 110, 204, 1058, 303 and 10279. No more integers are available at that stage. But, again, we can extend the sequence with a(31) = 0, then a(32) = 1046 and 302, 501, 0, 201, 3048, 170, etc.
A repeated single 0 is counted as a term of the sequence.
		

Crossrefs

A375232 Two terms that contain the digit "d" are always separated by "d" terms that do not contain the digit "d". This is the lexicographically earliest sequence of distinct nonnegative integers with this property.

Original entry on oeis.org

0, 10, 20, 100, 30, 102, 40, 101, 203, 105, 60, 1024, 300, 107, 200, 150, 304, 1026, 80, 109, 230, 10457
Offset: 1

Author

Eric Angelini and Jean-Marc Falcoz, Aug 06 2024

Keywords

Comments

The sequence is finite, there is no 23rd term.

Examples

			As we start the sequence with a(1) = 0, the digit 0 must be present in every term of the sequence.
We extend it now with a(2) = 10 as 10 is the smallest integer not present that contains the digit 0.
The next term will be a(3) = 20 as 20 is the smallest integer not present that contains the digit 0.
The next term will be a(4) = 100 as 100 is the smallest integer not present that contains both the digits 0 and 1.
The next term will be a(5) = 30 as 30 is the smallest integer not present that contains the digit 0.
The next term will be a(6) = 102 as 102 is the smallest integer not present that contains the digits 0, 1 and 2.
The next term will be a(7) = 40 as 40 is the smallest integer not present that contains the digit 0.
The next term will be a(8) = 101 as 101 is the smallest integer not present that contains both the digits 0 and 1.
Etc.
		

Crossrefs

Cf. A284516.

Extensions

a(14) and successive terms computed by Michael S. Branicky.

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

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

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

Original entry on oeis.org

4, 16, 19, 22, 24, 25, 34, 41, 70, 97, 119, 128, 138, 152, 155, 170, 174, 222, 232, 258, 285, 296
Offset: 1

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.
This sequence is conjectured to be finite and full.

Examples

			4 has an imbalance of 4 units when written in French and cut between A and T:
Q+U+A = 39 and T+R+E = 43. We have indeed 43 - 39 = 4.
16 has an imbalance of 16 units when written in French and cut between E and I:
S+E = 24 and I+Z+E = 40. We have indeed 40 - 24 = 16.
The cuts in the integers below are made using this sign ——:
QUA——TRE (43——39 = 4)
SE——IZE (24——40 = 16)
DIXN——EUF (51——32 = 19)
VING——TDEUX (52——74 = 22)
VINGTQ——UATRE (89——65 = 24)
VIN——GTCINQ (45——70 = 25)
TRENTEQ——UATRE (99——65 = 34)
QUARA——NTEETUN (58——99 = 41)
SOIXANTE——DIX (107——37 = 70)
QUATR——EVINGTDIXSEPT (77——174 = 97)
C——ENTDIXNEUF (3——122 = 119)
CEN——TVINGTHUIT (22——150 = 128)
CEN——TTRENTEHUIT (22——160 = 138)
CENTCINQUANTEDEU——X (176——24 = 152)
CENTCINQUANTECIN——Q (172——17 = 155)
CE——NTSOIXANTEDIX (8——178 = 170)
CENTSOIXANTEQUATO——RZE (223——49 = 174)
DEUXCENTVINGTDEUX—— (222——0 = 222)
DEUXCENTTRENTEDEUX—— (232——0 = 232)
DEUXCENTCINQUANTEHUIT—— (258——0 = 258)
D——EUXCENTQUATREVINGTCINQ (4——289 = 285)
DE——UXCENTQUATREVINGTSEIZE (9——305 = 296).
No integer has been found that could be cut in more than one way.
		

Crossrefs

Cf. A104059, A373317 (English version), A083967.