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: Louis

Louis's wiki page.

Louis has authored 81 sequences. Here are the ten most recent ones:

A384793 a(n) is the start of the first occurrence of exactly n consecutive zeroless primes (A038618).

Original entry on oeis.org

461717, 162119, 75431, 81421, 19661, 5923, 4813, 1319, 2917, 1117, 1721, 521, 911, 613, 311, 11519, 25411, 7321, 7717, 8819, 9413, 5519, 9613, 2311, 2, 41213, 16319, 1423, 21121, 8219, 162221, 71233, 113, 68521, 148627, 192611, 86531, 48413, 269219, 13313, 275521, 11113, 111521
Offset: 1

Author

Hugo Pfoertner, based on an idea by René-Louis Clerc, Jun 20 2025

Keywords

Examples

			a(25) = 2 because the 25 primes 2, 3, ..., 97 don't have a zero in their decimal representation, terminated by 101.
a(1) = 461717 because it is the smallest zeroless prime, whose nearest lower and upper prime neighbors 461707 and 461801 both have at least one zero in their decimal representation.
		

Crossrefs

A384306 Primes whose sum of digits in both base 8 and base 10 are recursively prime down to 2, 3, 5, or 7.

Original entry on oeis.org

2, 3, 5, 7, 131, 311, 887, 1013, 1949, 2399, 2621, 2957, 3251, 3323, 3701, 4289, 4919, 4973, 5099, 5101, 5477, 5927, 5981, 6359, 6599, 6779, 6863, 8069, 8447, 8573, 8627, 8669, 8951, 9677, 10141, 10181, 10211, 10589, 10631, 11399, 11597, 12101, 12479, 12659, 12983
Offset: 1

Author

Jean-Louis Lascoux, May 25 2025

Keywords

Comments

A prime p belongs to this sequence if in both bases 8 and 10 the iterative digit-sum process yields only prime values down to one of {2, 3, 5, 7}.

Examples

			a(5) = 131:
In base 8: 131 = 203_8 -> 2+0+3 = 5 -> 5 is prime -> ends in 5.
In base 10: 1+3+1 = 5 -> 5 is prime -> ends in 5.
All intermediate values for both bases are primes, and the last values are in {2,3,5,7}.
a(6) = 887:
In base 8: 887 = 1567_8 -> 1+5+6+7 = 19 -> 19 is prime -> 19 = 23_8 -> 2+3 = 5-> 5 is prime -> ends in 5.
In base 10: 8+8+7 = 23 -> 23 is prime -> 2+3 = 5 -> 5 is prime -> ends in 5.
All intermediate values for both bases are primes, and the last values are in {2,3,5,7}.
		

Crossrefs

Subsequence of A070027.

Programs

  • Maple
    q:= (n, k)-> isprime(n) and (n q(x, 8) and q(x, 10), [$1..20000])[];  # Alois P. Heinz, May 27 2025
  • PARI
    isokb(p,b) = while(1, my(s=sumdigits(p, b)); if (! isprime(s), return(0)); if (sMichel Marcus, May 27 2025
    
  • Python
    from gmpy2 import digits, is_prime
    def rp(n, b): return is_prime(n) and (n < b or rp(sum(map(int, digits(n, b))), b))
    def ok(n): return rp(n, 10) and rp(n, 8)
    print([k for k in range(2, 13000) if ok(k)]) # Michael S. Branicky, May 27 2025

A383919 Primes made up of 0's and seven 1's only.

Original entry on oeis.org

11110111, 11111101, 101101111, 101111011, 110111011, 111010111, 1001110111, 1010011111, 1011110011, 1100101111, 1101010111, 1101110011, 1110011101, 1110110011, 1111100101, 1111110001, 10010110111, 10011101011, 10011110101, 10100111101, 10111001011, 10111110001, 11001011101
Offset: 1

Author

René-Louis Clerc, May 15 2025

Keywords

Comments

Expression of the primes that are 0-successors of the preprime 1111111 (= 239*4649); they constitute the infinite set of secondary primes with seven 1's and zeros denoted {1111111} (Definitions 1, 2, 3, 4 of Clerc).

Crossrefs

Intersection of A020449 and A062337.

Programs

  • PARI
    list(M) = for(i=3, M, for(j=2, i-1, for(k=1, j-1, for(r=1, k-1, for(l=1, r-1, for(m=1, l-1, my(p=10^i+10^j+10^k+10^r+10^l+10^m+1); isprime(p) && print1(p, ", ")))))))
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A383919_gen(): # generator of terms
        for a in count(6):
            for b in range(5,a):
                for c in range(4,b):
                    for d in range(3,c):
                        for e in range(2,d):
                            for f in range(1,e):
                                if isprime(p:=10**a+10**b+10**c+10**d+10**e+10**f|1):
                                    yield(p)
    A383919_list = list(islice(A383919_gen(),23)) # Chai Wah Wu, May 28 2025

A383918 Primes made up of 0's and five 1's only.

Original entry on oeis.org

101111, 10011101, 10101101, 10110011, 10111001, 11000111, 11100101, 100100111, 100111001, 101001011, 101100011, 110010101, 110101001, 111000101, 111001001, 1000011011, 1000110101, 1001000111, 1001001011, 1001010011, 1010000111, 1010001101, 1010010011, 1010100011, 1010110001
Offset: 1

Author

René-Louis Clerc, May 15 2025

Keywords

Comments

Expression of the primes that are 0-successors of the preprime 11111 (= 41*271); they constitute the infinite set of secondary primes with five 1's and zeros denoted {11111} (Definitions 1, 2, 3, 4 of Clerc).

Crossrefs

Programs

  • Maple
    f:= proc(n) local R,c,i;
     sort(select(isprime, [seq(1+10^(n-1) + add(10^i,i=c), c=combinat:-choose(n-2,3))]))
    end proc:
    map(op,[seq(f(i),i=6..10)]); # Robert Israel, May 29 2025
  • PARI
    list(M) = for(i=3, M, for(j=2, i-1, for(k=1, j-1, for(r=1, k-1, my(p=10^i+10^j+10^k+10^r+1); isprime(p) && print1(p, ", ")))))
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A383918_gen(): # generator of terms
        for a in count(4):
            for b in range(3,a):
                for c in range(2,b):
                    for d in range(1,c):
                        if isprime(p:=10**a+10**b+10**c+10**d|1):
                            yield(p)
    A383918_list = list(islice(A383918_gen(),30)) # Chai Wah Wu, May 29 2025

A381257 Numbers k such that 6*k+1 divides 6^k+1.

Original entry on oeis.org

0, 1, 6, 30, 58, 70, 73, 90, 101, 105, 121, 125, 146, 153, 166, 170, 181, 182, 185, 210, 233, 241, 242, 266, 282, 290, 322, 373, 381, 385, 390, 397, 441, 445, 446, 450, 453, 530, 557, 562, 585, 593, 601, 602, 605, 606, 621, 646, 653, 670, 685, 710, 726, 805, 810, 817, 833, 837, 853, 866
Offset: 1

Author

René-Louis Clerc, Feb 18 2025

Keywords

Comments

The numbers are called Curzon numbers by Tattersall (p. 85, exercise 43).

Examples

			6*30+1 = 181 divides 6^30+1 = 221073919720733357899777.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Second Edition, Cambridge University Press, 2005, p. 85.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 866], PowerMod[6, #, 6#+1]==6#&]  (* James C. McMahon, Apr 02 2025 *)
  • PARI
    isok(n) = my(m=6*n+1); Mod(6, m)^n==-1

A381256 Numbers k such that 5*k+1 divides 5^k+1.

Original entry on oeis.org

0, 1, 625, 57057, 7748433, 30850281, 111494625, 393423745, 499088601, 519341361, 1051107705, 1329416385, 1616038425, 2215448001, 2433936225, 2852972265, 3399207273, 4344683849, 4961725281, 5454760185, 5485530369, 6578054145, 6678031745, 7701979761, 7807302825
Offset: 1

Author

René-Louis Clerc, Feb 18 2025

Keywords

Comments

The numbers are called Curzon numbers by Tattersall (p. 85, exercise 43).

Examples

			5*625+1 = 3126 divides 5^625+1.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Second Edition, Cambridge University Press, 2005, p. 85.

Crossrefs

Programs

  • PARI
    isok(n) = my(m=5*n+1); Mod(5, m)^n==-1

A381258 Numbers k such that 7*k+1 divides 7^k+1.

Original entry on oeis.org

0, 1, 135, 5733, 11229, 42705, 50445, 117649, 131365, 168093, 636405, 699825, 1269495, 2528155, 4226175, 6176709, 6502545, 9365265, 9551115, 13227021, 14464485, 14912625, 20859435, 26903605, 28251265, 30589905, 32660901, 37597329, 41506875, 42766465, 55452075, 56192535, 111898605
Offset: 1

Author

René-Louis Clerc, Feb 18 2025

Keywords

Comments

The numbers are called Curzon numbers by Tattersall (p. 85, exercise 43).

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Second Edition, Cambridge University Press, 2005, p. 85.

Crossrefs

Programs

  • Mathematica
    Select[Range[0,10^7],PowerMod[7,#,7#+1]==7#&] (* James C. McMahon, Mar 05 2025 *)
  • PARI
    isok(n) = my(m=7*n+1); Mod(7, m)^n==-1

A379767 Triangle read by rows: row n lists numbers which are the n-th powers of their digit sum.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 81, 0, 1, 512, 4913, 5832, 17576, 19683, 0, 1, 2401, 234256, 390625, 614656, 1679616, 0, 1, 17210368, 52521875, 60466176, 205962976, 0, 1, 34012224, 8303765625, 24794911296, 68719476736, 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432
Offset: 1

Author

René-Louis Clerc, Jan 02 2025

Keywords

Comments

Each row begins with 0, 1. Solutions can have no more than R(n) digits, since (R(n)*9)^n < 10^R(n), hence, for each n, there are a finite number of solutions (Property 1 and table 1 of Clerc).

Examples

			Triangle begins:
  1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
  2 | 0, 1, 81;
  3 | 0, 1, 512, 4913, 5832, 17576, 19683;
  4 | 0, 1, 2401, 234256, 390625, 614656, 1679616;
  5 | 0, 1, 17210368, 52521875, 60466176, 205962976;
  6 | 0, 1, 34012224, 8303765625, 24794911296, 68719476736;
  7 | 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432;
  8 | 0, 1, 20047612231936, 72301961339136, 248155780267521;
  9 | 0, 1, 3904305912313344, 45848500718449031, 150094635296999121;
  ...
		

Crossrefs

Rows 3..6 are A061209, A061210, A254000, A375343.
Row lengths are 1 + A046019(n).
Cf. A001014, A007953, A061211 (largest terms), A133509.
Cf. A152147.

Programs

  • PARI
    R(n) = for(j=2,oo, if((j*9)^n <10^j, return(j)));
    row(n) = my(L=List()); for (k=0, sqrtnint(10^R(n),n), if (k^n == sumdigits(k^n)^n, listput(L, k^n))); Vec(L)

A378947 Number of row states in an automaton for the enumeration of the number of fixed polyominoes with bounding box of width n.

Original entry on oeis.org

1, 2, 6, 16, 40, 99, 247, 625, 1605, 4178, 11006, 29292, 78652, 212812, 579672, 1588242, 4374282, 12103404, 33628824, 93786966, 262450878, 736710357, 2073834417, 5853011847, 16558618507, 46949351272, 133390812252, 379708642286, 1082797114046, 3092894319075, 8848275403639
Offset: 0

Author

Louis Marin, Dec 11 2024

Keywords

Comments

The states track the non-crossing partitions of the connected components and whether each side of the bounding rectangle has been reached.
a(n) is an upper bound on the order of the generating function of row n of A292357.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 2, 6][n+1],
           ((3*n^2+2*n-12)*a(n-1)+(n^2-13*n+15)*a(n-2)
            -3*(n-3)*(n-1)*a(n-3))/((n-2)*(n+3)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 20 2024
  • Mathematica
    a[n_] := a[n] = If[n < 3, {1, 2, 6}[[n+1]],
       ((3*n^2 + 2*n - 12)*a[n-1] + (n^2 - 13*n + 15)*a[n-2]
       - 3*(n-3)*(n-1)*a[n-3])/((n-2)*(n+3))];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 26 2025, after Alois P. Heinz *)
  • PARI
    b(n) = (1 + (hammingweight(bitxor(n, n>>1)))) >> 1;
    C(n) = binomial(2*n, n)/(n+1);
    a(n) = 1 + sum(m=1, 2^n-1, C(b(m)) * 2^((m % 2)==0) * 2^(m<2^(n-1))); \\ Michel Marcus, Dec 12 2024
    
  • PARI
    a(n) = {1 + sum(k=1, (n+1)\2, (binomial(n+1, 2*k)+2*binomial(n,2*k)+binomial(n-1,2*k))*binomial(2*k, k)/(k+1))} \\ Andrew Howroyd, Dec 17 2024

Formula

a(n) = 1 + Sum_{m=1..2^n-1} A000108(A069010(m)) * 2^[m=0 mod 2] * 2^[m<2^(n-1)], where [] is the Iverson bracket.
From Andrew Howroyd, Dec 17 2024: (Start)
a(n) = 1 + Sum_{k=1..floor((n+1)/2)} (binomial(n+1, 2*k) + 2*binomial(n,2*k) + binomial(n-1,2*k)) * binomial(2*k, k)/(k+1).
a(n) = A001006(n+1) + 2*A001006(n) + A001006(n-1) - 3 for n > 0. (End)

Extensions

More terms from Michel Marcus, Dec 12 2024
a(26) onwards from Andrew Howroyd, Dec 17 2024

A377482 Iterated integer log of n: denote A001414(n) by b(n). a(n) = n if b(n) = n. Otherwise, a(n) = b(n) + b(b(n)) + ... + b^k(n), where k is the smallest integer such that b^k(n) is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 7, 11, 11, 7, 11, 7, 13, 20, 19, 19, 17, 19, 19, 20, 17, 13, 23, 20, 17, 34, 20, 11, 29, 17, 31, 17, 34, 19, 19, 17, 37, 38, 35, 11, 41, 19, 43, 34, 11, 42, 47, 11, 34, 19, 40, 17, 53, 11, 35, 13, 35, 31, 59, 19, 61, 67, 13, 19, 37, 35, 67
Offset: 1

Author

Louis-Simon Cyr, Oct 29 2024

Keywords

Comments

Can be understood as an exotic way of measuring how far a number is from being prime, since omitting n = 1, 4, |a(n) - n| = 0 if and only if n is prime. Note that A274718(n) = k - 1 when a(n) = b(n) + b(b(n)) + ... + b^k(n). The scatter plot for n >= 10000 shows intriguing regularities.

Examples

			a(24) is computed as follows: 24 = (2^3) * 3, 2 * 3 + 3 = 9. 9 = (3^2), 3 + 3 = 6. 6 = 2 * 3, 2 + 3 = 5. Since 5 is prime, we stop and take the sum: 9 + 6 + 5 = 20.
		

Crossrefs

Programs

  • Python
    from sympy import*
    def a(n):
     t=0
     while n not in (1,4) and not isprime(n):
      n=sum(p*e for p,e in factorint(n).items());t+=n
     return t or n