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: Carole Dubois

Carole Dubois's wiki page.

Carole Dubois has authored 289 sequences. Here are the ten most recent ones:

A363938 Lexicographically earliest sequence of numbers in a hexagonal spiral such that their neighbors have no common prime factor.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 8, 17, 15, 19, 12, 23, 25, 29, 10, 31, 14, 27, 16, 21, 37, 33, 26, 41, 22, 35, 43, 47, 18, 49, 24, 53, 39, 20, 51, 55, 28, 59, 61, 32, 45, 34, 67, 57, 40, 63, 71, 36, 65, 38, 73, 79, 30, 83, 77, 46, 89, 69, 91, 58, 81, 85, 87
Offset: 1

Author

Carole Dubois, Jun 29 2023

Keywords

Examples

			a(11) = 8 because the neighbors of the 11th hexagon are 3, 13, 17, 21, 33, 37, which do not have any common prime divisor with 8.
		

Crossrefs

A363765 Lexicographically earliest sequence of numbers in a hexagonal spiral such that their neighbors have no common digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 44, 11, 20, 13, 22, 14, 23, 15, 24, 16, 25, 17, 26, 33, 27, 30, 28, 34, 55, 29, 40, 35, 60, 57, 46, 37, 18, 39, 47, 19, 36, 45, 70, 12, 48, 51, 49, 31, 50, 21, 38, 41, 53, 61, 42, 58, 32, 80, 52, 64, 59, 62, 81, 56, 43, 72
Offset: 1

Author

Carole Dubois, Jun 20 2023

Keywords

Comments

This sequence ends with 672 terms.

Examples

			a(26) = 27 because the neighbors of the 26th hexagon are 10, 30, 33, 44, 48, 51 which have no common digit with 27.
a(673) can't be calculated because its neighbors would be 216, 397, and 548, and they use all digits.
		

Crossrefs

A358998 Nonprimes whose sum of factorials of digits is a prime.

Original entry on oeis.org

10, 12, 20, 21, 30, 100, 110, 111, 122, 133, 134, 135, 136, 143, 153, 155, 178, 187, 202, 212, 220, 221, 303, 304, 305, 306, 314, 315, 316, 330, 340, 341, 350, 351, 360, 361, 403, 413, 430, 505, 513, 515, 530, 531, 550, 551, 603, 630, 708, 718, 780, 781, 807
Offset: 1

Author

Carole Dubois, Feb 11 2023

Keywords

Examples

			134 is in the sequence because it is not prime and 1! + 3! + 4! = 1 + 6 + 24 = 31 which is a prime number.
202 is also in the sequence because it is not prime and 2! + 0! + 2! = 5 prime.
		

Crossrefs

Cf. A061602, A084405 (Primes such that the sum of the factorials of the digits is also prime).

Programs

  • Mathematica
    Select[Range[1000], ! PrimeQ[#] && PrimeQ[Total[IntegerDigits[#]!]] &] (* Amiram Eldar, Feb 11 2023 *)
  • Python
    from sympy import isprime
    from math import factorial
    S=[]
    nomb=200
    i=0
    while len(S) < nomb:
        i+=1
        if isprime(i):
            continue
        som=0
        for j in range(len(str(i))):
            som+=factorial(int(ix[j]))
        if  not isprime(som):
            continue
        S.append(i)
    
  • Python
    from sympy import isprime
    from math import factorial
    def f(n): return sum(factorial(int(d)) for d in str(n))
    def ok(n): return not isprime(n) and isprime(f(n))
    print([k for k in range(900) if ok(k)]) # Michael S. Branicky, Feb 11 2023

Formula

A165451 INTERSECT A002808. - R. J. Mathar, Feb 23 2023

A354839 Beginning with 0, smallest positive integer not yet in the sequence such that the concatenation of two digits of the sequence separated by a comma is prime.

Original entry on oeis.org

0, 2, 3, 1, 7, 9, 70, 5, 30, 20, 21, 10, 22, 31, 11, 12, 32, 33, 13, 14, 15, 34, 16, 17, 18, 35, 36, 19, 71, 37, 38, 39, 72, 90, 23, 73, 74, 75, 91, 76, 77, 92, 93, 78, 94, 79, 700, 24, 100, 25, 95, 96, 101, 97, 98, 99, 701, 102, 300, 26, 103, 104, 105, 301
Offset: 0

Author

Carole Dubois, Jun 08 2022

Keywords

Examples

			a(4)=1 because this is the first number not in the sequence whose first digit is 3 (last digit of a(3)), concatenated with its first digit 1, is prime: 31.
a(14)=31 because this is the first number not in the sequence whose first digit is 2 (last digit of a(13)), concatenated with its first digit 3, is prime: 23.
		

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, k, mink = {0}, 0, 1; yield 0
        for n in count(2):
            k, prevdig = mink, str(k%10)
            while k in aset or not isprime(int(prevdig+str(k)[0])): k += 1
            aset.add(k); yield k
            while mink in aset: mink += 1
    print(list(islice(agen(), 64))) # Michael S. Branicky, Jun 09 2022

A354375 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a square and those sums themselves form another infinite 2D square lattice with the same property.

Original entry on oeis.org

0, 1, 2, 6, 3, 999, 4, 5, 12, 7, 799, 8, 9, 89, 29, 79, 10, 88, 8999, 69, 11, 78, 39, 97, 19, 13, 87, 7999, 59, 14, 15, 169, 39999, 68, 49999, 699, 16, 22, 96, 159, 178, 21, 17, 599, 59999, 49, 58999, 168, 25, 18, 187, 100, 4999, 20, 177, 28, 23, 186, 89999, 99999, 199999, 98999, 9999, 77, 24, 27
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     11--78--39--97--19--13
      |                   |
     69   4---5--12---7  87
      |   |           |   |
   8999  999  0---1  799 7999
      |   |       |   |   |
     88   3---6---2   8  59
      |               |   |
     10--79--29--89---9  14
                          |
           ... 39999-169-15
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a square: 0 + 1 + 2 + 6 = 9, 0 + 6 + 3 + (9+9+9) = 36, 0 + 999 + 4 + 5 = 36, 0 + 5 + (1+2) + 1 = 9. This is true for any 2 X 2 square on the (infinite) grid; the digits of the upper right corner add up to 36, for instance: (1+9) + (1+3) + (8+7) + 7 = 36; the lower right 2 X 2 square produces 36 = 9 + (1+4) + (1+5) + (1+6+9); etc.
All those successive "square sums" form the hereunder "second-level" spiral:
.
       36---9--36--81
        |           |
       36   9--36  81
        |       |   |
       36--36--36  36
                    |
           ... 81--36
.
Though the terms of this new spiral are not distinct (only multiples of 9), the sum of the digits inside any 2 X 2 square is a square again; the upper left 2 X 2 square produces for instance the square 36 = (3+6) + 9 + 9 + (3+6); the lower left 2 X 2 square produces the square 36 again = (3+6) + 9 + (3+6) + (3+6); the lower right 2 X 2 square produces also the square 36 = (3+6) + (3+6) + (3+6) + (8+1); the initial "center square" produces the same 36 = 9 + (3+6) + (3+6) + (3+6); etc.
		

A354374 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a prime and those sums themselves form another infinite 2D square lattice with the same property.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 11, 7, 9, 10, 12, 14, 17, 13, 15, 19, 39, 24, 16, 23, 29, 5999, 33, 18, 25, 42, 69, 699, 20, 26, 21, 999, 299, 599, 22, 28, 30, 31, 34, 38, 27, 37, 36, 40, 59, 4999, 43, 32, 35, 41, 49, 102, 47, 69999, 44, 45, 48, 99, 58, 52, 111, 689, 46, 51, 698, 79999, 9999999, 50, 68
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     16--23--29-5999-33--18
      |                   |
     24   5---8--11---7  25
      |   |           |   |
     39   6   0---1   9  42
      |   |       |   |   |
     19   3---4---2  10  69
      |               |   |
     15--13--17--14--12 699
                          |
        ... 999--21--26--20
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a prime: 0 + 1 + 2 + 4 = 7, 0 + 4 + 3 + 6 = 13, 0 + 6 + 5 + 8 = 19, 0 + 8 + (1+1) + 1 = 11. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to the prime 29, for instance: (3+3) + (1+8) + (2+5) + 7 = 29; etc.
All those successive "prime sums" form the hereunder "second-level" spiral:
.
     37--19--43 ...
      |
     43  11--19--19--23
      |   |           |
     31  13   7--13  31
      |   |       |   |
     29  19--11--19  29
      |               |
     29--47--53--29--23
.
Though the terms of this new spiral are not distinct, the sum of the digits inside any 2 X 2 square is prime again; the upper left 2 X 2 square produces the prime 29 = (3+7) + (1+9) + (1+1) + (4+3); the lower left 2 X 2 square produces the prime 43 = (2+9) + (1+9) + (4+7) + (2+9); the lower right 2 X 2 square produces the prime 37 = (1+9) + (2+9) + (2+3) + (2+9); the initial "center square" produces the prime 23 = 7 + (1+3) + (1+9) + (1+1); etc.
		

A354373 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a prime.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 11, 7, 9, 10, 12, 14, 15, 13, 16, 18, 23, 21, 17, 25, 27, 19, 22, 20, 24, 34, 33, 30, 26, 32, 28, 35, 29, 36, 31, 38, 37, 41, 40, 44, 39, 45, 43, 42, 48, 47, 51, 46, 49, 53, 55, 59, 60, 57, 50, 66, 75, 64, 54, 58, 62, 71, 52, 73, 79, 82, 84, 80, 56, 88, 61, 93, 68, 65, 67, 91
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     17--25--27--19--22--20
      |                   |
     21   5---8--11---7  24
      |   |           |   .
     23   6   0---1   9   .
      |   |       |   |   .
     18   3---4---2  10
      |               |
     16--13--15--14--12
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a prime: 0 + 1 + 2 + 4 = 7, 0 + 4 + 3 + 6 = 13, 0 + 6 + 5 + 8 = 19, 0 + 8 + (1+1) + 1 = 11. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to 19, for instance: (2+2) + (2+0) + (2+4) + 7 = 19; etc.
		

Crossrefs

A354372 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a square.

Original entry on oeis.org

0, 1, 2, 6, 3, 7, 4, 5, 12, 8, 13, 9, 10, 22, 31, 21, 11, 17, 16, 25, 14, 18, 34, 19, 40, 15, 43, 24, 33, 27, 20, 49, 52, 28, 26, 30, 23, 42, 36, 39, 37, 59, 29, 51, 32, 69, 89, 41, 46, 35, 48, 38, 57, 66, 45, 50, 44, 55, 47, 99, 68, 98, 53, 54, 56, 65, 77, 61, 62, 60, 105, 104, 58, 70, 75, 67, 79
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     14--18--34--19--40--15
      |                   |
     25   4---5--12---8  43
      |   |           |   .
     16   7   0---1  13   .
      |   |       |   |   .
     17   3---6---2   9
      |               |
     11--21--31--22--10
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a square: 0 + 1 + 2 + 6 = 9, 0 + 6 + 3 + 7 = 16, 0 + 7 + 4 + 5 = 16, 0 + 5 + (1+2) + 1 = 9. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to 25, for instance: (4+0) + (1+5) + 8 + (4+3) = 25; etc.
		

Crossrefs

A354371 Square array read by antidiagonals such that the sum of the digits inside any 2 X 2 square is itself a square.

Original entry on oeis.org

1, 2, 3, 4, 12, 5, 6, 7, 14, 11, 16, 8, 10, 13, 17, 19, 22, 9, 15, 20, 26, 27, 69, 31, 18, 40, 34, 32, 42, 78, 49, 21, 24, 30, 41, 43, 46, 51, 33, 23, 25, 39, 37, 44, 64, 68, 59, 54, 48, 28, 29, 38, 58, 74, 70, 72, 92, 52, 63, 36, 35, 87, 101, 98, 80, 82, 84, 177, 121, 65, 60, 45, 96, 53, 103, 76
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the lexicographically earliest permutation of the positive integers with this property.

Examples

			Array:
.
    1,   2,   4,   6,  16,  19,  27,  42,  46,  68,  72,  84, 120, 138, 156, ...
    3,  12,   7,   8,  22,  69,  78,  51,  59,  92, 177,  94, 134, 175, 165, ...
    5,  14,  10,   9,  31,  49,  33,  54,  52, 121, 132, 195, 166, 249, 162, ...
   11,  13,  15,  18,  21,  23,  48,  63,  65,  77,  75,  97, 131, 178, 171, ...
   17,  20,  40,  24,  25,  28,  36,  60,  55,  86,  81,  93, 169, 147, 174, ...
   26,  34,  30,  39,  29,  35,  45,  57,  62, 130,  90, 150, 200, 289, 303, ...
   32,  41,  37,  38,  87,  96,  89,  47,  50,  71, 186, 204, 146, 202, 205, ...
   43,  44,  58, 101,  53,  56, 105, 110,  61,  79,  73, 113, 149, 142, 198, ...
   64,  74,  98, 103,  83, 114,  67, 112,  66,  95, 108, 100, 140, 145, 194, ...
   70,  80,  76, 159, 123,  85, 179, 168,  99, 104, 107, 115, 129, 153, 210, ...
   82, 119, 188, 199, 117, 116, 128, 141,  91,  88, 106, 102, 158, 185, 163, ...
  109, 122, 111, 118, 137, 125, 126, 127, 136, 139, 148, 157, 213, 258, 172, ...
  124, 167, 176, 135, 222, 155, 143, 144, 133, 231, 197, 240, 164, 211, 214, ...
  151, 152, 184, 193, 161, 173, 298, 229, 160, 187, 154, 196, 201, 189, 223, ...
  170, 238, 267, 206, 232, 181, 180, 215, 224, 203, 212, 221, 183, 259, 233, ...
  ...
.
The sum of the digits inside the upper 2 X 2 squares is (1 + 2) + (3 + 1 + 2) = 9 (a square);
The sum of the digits inside the next horizontal 2 X 2 square is (2 + 4) + (1 + 2 + 7) = 16 (a square);
The sum of the digits inside the next horizontal 2 X 2 square is (4 + 6) + (7 + 8) = 25 (a square);
...
The sum of the digits inside the 2nd vertical 2 X 2 square on the left is (3 + 1 + 2) + (5 + 1 + 4) = 16 (a square);
The sum of the digits inside the next vertical 2 X 2 square on the left is (5 + 1 + 4) + (1 + 1 + 1 + 3) = 16 (a square);
...
The sum of the digits inside the lower right 2 X 2 square is (1 + 8 + 9) + (2 + 2 + 3) + (2 + 5 + 9) + (2 + 3 + 3) = 49 (a square); etc.
		

Crossrefs

Cf. A325785.

A354370 Successive pairs of terms (i, j) such that (i + j) is a prime number and at least i is a prime number. This is the lexicographically earliest infinite sequence of distinct terms > 1 with this property.

Original entry on oeis.org

2, 3, 5, 6, 7, 4, 11, 8, 13, 10, 17, 12, 19, 18, 23, 14, 29, 24, 31, 16, 37, 22, 41, 20, 43, 28, 47, 26, 53, 30, 59, 38, 61, 36, 67, 34, 71, 32, 73, 40, 79, 48, 83, 44, 89, 42, 97, 52, 101, 50, 103, 46, 107, 56, 109, 54, 113, 60, 127, 64, 131, 62, 137, 74, 139, 58, 149, 78, 151, 72, 157, 66, 163, 70
Offset: 1

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

The terms 1, 9, 15, 21, 25, 27, 33, 35, 39, 45, ... will never appear in the sequence; they form A014076, the "Odd nonprimes". Two prime terms can form a pair (2 and 3 for instance) but the first term must always be a prime [the pair (5, 6) is ok].

Examples

			The earliest pairs with their prime sum: (2, 3) = 5, (5, 6) = 11, (7, 4) = 11, (11, 8) = 19, (13, 10) = 23, (17, 12) = 29, (19, 18) = 37, (23, 14) = 37, etc.
		

Crossrefs

Cf. A354367, A354368, A354369 (same idea), A014076.

Programs