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 Rebert

Jean-Marc Rebert's wiki page.

Jean-Marc Rebert has authored 162 sequences. Here are the ten most recent ones:

A387064 Total number of entries in rows 0 to n of Pascal's triangle multiple of n.

Original entry on oeis.org

0, 3, 1, 2, 2, 4, 3, 6, 4, 6, 10, 10, 12, 12, 21, 22, 8, 16, 18, 18, 30, 42, 47, 22, 38, 20, 74, 18, 65, 28, 81, 30, 16, 113, 136, 132, 94, 36, 147, 195, 140, 40, 162, 42, 199, 210, 217, 46, 126, 42, 146, 302, 261, 52, 110, 335, 243, 374, 394, 58, 363, 60, 465, 416
Offset: 0

Author

Jean-Marc Rebert, Aug 15 2025

Keywords

Examples

			The first two rows of Pascal's triangle are [1] and [1, 1]. Since all elements are divisible by 1, a(1) equals the total number of such divisible terms: 1 + 2 = 3.
		

Programs

  • Mathematica
    a[n_] := Sum[Boole[Divisible[Binomial[k, i], n]], {k, 0, n}, {i, 0, k}]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    a(n) = if (n, sum(r=0, n, sum(k=0, r, !(binomial(r,k) % n))), 0); \\ Michel Marcus, Aug 15 2025
    
  • Python
    from sympy import isprime, integer_nthroot
    def A387064(n):
        if isprime(n): return n-1
        a, b = integer_nthroot(n,2)
        if b and isprime(a): return n-a
        r, c = [1], n==1
        for m in range(n):
            s = [1]
            for i in range(m):
                s.append((r[i]+r[i+1])%n)
                c += s[-1]==0
            r = s+[1]
            c += (n==1)<<1
        return int(c) # Chai Wah Wu, Aug 21 2025

Formula

a(p) = p-1, a(p^2) = p*(p-1) for p prime. Conjecture: a(p^k) = (p-1)*p^(k-1) for p prime. - Chai Wah Wu, Aug 21 2025

A385315 Smallest number k such that both k^n - 1 and k^n + 1 have n prime factors, counted with repetitions.

Original entry on oeis.org

4, 12, 66, 920, 26, 132, 79, 17958, 53, 693, 4181, 122160, 29791, 32318, 971
Offset: 1

Author

Jean-Marc Rebert, Aug 12 2025

Examples

			a(1) = 4, because 4^1 - 1 = 3 and 4^1 + 1 = 5, and no lesser number has this property.
See the Links section for more examples.
		

Programs

  • PARI
    a(n) = my(k=2, kn=k^n); while ((bigomega(kn-1)!=n) || (bigomega(kn+1)!=n), k++;kn=k^n); k; \\ Michel Marcus, Aug 18 2025

Formula

a(n) >= max(A368162(n), A368163(n)). - Daniel Suteu, Sep 02 2025

A386842 a(n) is the smallest prime number p in a sequence of n consecutive primes, such that the numbers formed by the last n digits of each prime in the sequence create another sequence of n consecutive prime numbers, all strictly less than p.

Original entry on oeis.org

13, 131, 3079, 31307, 130211, 6006047, 65770459, 2174896369, 123463673149, 7326324078721
Offset: 1

Author

Jean-Marc Rebert, Aug 05 2025

Keywords

Examples

			a(2) = 131, because it is the smallest prime p such that there exists a sequence of 2 consecutive primes (131, 137), and the last 2 digits of each prime (31 and 37) are themselves consecutive prime numbers less than p.
1 [13] -> ending with 1 digit [3] (both consecutive primes)
2 [131, 137] -> ending with 2 digits [31, 37] (both consecutive primes)
3 [3079, 3083, 3089] -> ending with 3 digits [79, 83, 89] (both consecutive primes)
4 [31307, 31319, 31321, 31327] -> ending with 4 digits [1307, 1319, 1321, 1327] (both consecutive primes)
		

Crossrefs

Programs

  • PARI
    a(n)={my(m=10^n,c=0,q,r); forprime(p=m, oo, if(!isprime(p%m), c=0, if(c&&nextprime(q%m+1)==p%m, c++, c=1;r=p); if(c==n, return(r)); q=p ))} \\ Andrew Howroyd, Aug 09 2025

A386475 Least prime starting a run of exactly n consecutive primes with identical counts of odd digits.

Original entry on oeis.org

2, 5, 3, 11, 97, 503, 499, 491, 14303, 14293, 157259, 157253, 1525723, 4576997, 4576993, 4576991, 10411013, 33388093, 188332121, 194259301, 2853982501, 2853982499, 2853982477, 3913474277, 10883385143, 22809734971, 34883348389, 34883348369, 34883348341
Offset: 1

Author

Jean-Marc Rebert, Jul 23 2025

Keywords

Comments

Consecutive previous primes of the selected prime are ignored even though the may also have an identical count of digits.

Examples

			a(2) = 5, because the two primes in the sequence starting at 5, namely 5 and 7, each contain the same number of odd digits, and no earlier prime sequence meets this criterion.
In [2], each number contains 0 odd digits.
In [5, 7], each number contains 1 odd digit.
In [3, 5, 7], each number contains 1 odd digit.
In [11, 13, 17, 19], each number contains 2 odd digits.
In [97, 101, 103, 107, 109], each number contains 2 odd digits.
In [503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
In [499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
In [491, 499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
In [14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits.
In [14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits.
		

Crossrefs

Programs

  • Mathematica
    oddn[n_] := Plus @@ Mod[IntegerDigits@ n, 2]; T = Table[0, {99}]; p = 1; While[p < 2  10^6, p = NextPrime[p]; c = oddn[p]; r=1; q=p; While[True, q = NextPrime[q]; If[oddn[q] == c, r++, Break[]]]; If[T[[r]] == 0, T[[r]] = p]]; Take[T, Position[T, 0][[1, 1]] - 1] (* Giovanni Resta, Jul 23 2025 *)

Extensions

More terms from Giovanni Resta, Jul 23 2025

A386519 Index of the smallest prime p such that the number of digits L in the repeating decimal period of 1/p equals the n-th prime.

Original entry on oeis.org

5, 12, 13, 52, 2431, 16, 153888, 27417323062119920, 223378173194137397198, 452, 406, 150886, 23, 40, 2153717, 28, 92971458509, 130, 40998
Offset: 1

Author

Jean-Marc Rebert, Jul 24 2025

Keywords

Comments

In general, for (q,2*5)=1, the length of the period of 1/q is equal to the multiplicative order of 10 modulo q, which is the smallest k such that 10^k == 1 (mod q). It follows that a(n) must be a prime divisor of 10^prime(n)-1. Hence, apart from a(2), we have prime(a(n)) = A147555(n) and a(20) is the index of the prime 241573142393627673576957439049. - Giovanni Resta, Jul 24 2025

Examples

			a(1) = 5, since the 5th prime, p = 11, has a repeating decimal period of length L = 2, and 2 = prime(1). There is no smaller prime for which the period length equals the 1st prime.
 n      a(n)         p  L
 1         5        11  2
 2        12        37  3
 3        13        41  5
 4        52       239  7
 5      2431     21649 11
 6        16        53 13
 7    153888   2071723 17
		

Crossrefs

Extensions

a(8)-a(19) from Giovanni Resta, Jul 24 2025

A386495 Least prime starting a sequence of exactly n consecutive primes with identical counts of even digits.

Original entry on oeis.org

2, 17, 13, 11, 7, 5, 3, 491, 14303, 14293, 157259, 157253, 1525723, 4576997, 4576993, 4576991, 10411013, 33388093, 188332121, 194259301, 2853982501, 2853982499, 2853982477, 3913474277, 10883385143, 22809734971, 34883348389, 34883348369, 34883348341, 742012786121
Offset: 1

Author

Jean-Marc Rebert, Jul 23 2025

Keywords

Comments

Consecutive previous primes of the selected prime are ignored even though the may also have an identical count of digits.

Examples

			a(2) = 17, because the two primes in the sequence starting at  — namely [17, 19] — each contain the same number of even digits, and no earlier prime sequence meets this criterion.
n In [a(n), ...]
1 In [2], each of the 1 number contain 1 even digit.
2 In [17, 19], each of the 2 numbers contains 0 even digit.
3 In [13, 17, 19], each of the 3 numbers contains 0 even digit.
4 In [11, 13, 17, 19], each of the 4 numbers contains 0 even digit.
5 In [7, 11, 13, 17, 19], each of the 5 numbers contains 0 even digit.
6 In [5, 7, 11, 13, 17, 19], each of the 6 numbers contains 0 even digit.
7 In [3, 5, 7, 11, 13, 17, 19], each of the 7 numbers contains 0 even digit.
8 In [491, 499, 503, 509, 521, 523, 541, 547], each of the 8 numbers contains 1 even digit.
9 In [14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each of the 9 numbers contains 2 even digits.
10 In [14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each of the 10 numbers contains 2 even digits.
11 In [157259, 157271, 157273, 157277, 157279, 157291, 157303, 157307, 157321, 157327, 157349], each of the 11 numbers contains 1 even digit.
12 In [157253, 157259, 157271, 157273, 157277, 157279, 157291, 157303, 157307, 157321, 157327, 157349], each of the 12 numbers contains 1 even digit.
		

Crossrefs

Programs

  • PARI
    \\ See Corneth link
    
  • PARI
    card(p)={my(c=0,u=digits(p),n=sum(i=1,#u,u[i]%2==0),even=n);while(even==n,p=nextprime(p+1);u=digits(p);even=sum(i=1,#u,u[i]%2==0);c++);c}
    data(pp=10^9)={my(u=vector(30),r=0);forprime(p=2,pp,my(n=card(p));if(u[n]==0,u[n]=p;if(n>r,r=n)));u[1..r]}

Extensions

a(19)-a(20) from David A. Corneth, Jul 23 2025
a(21)-a(26) from Jean-Marc Rebert, Jul 24 2025
a(27)-a(30) from Giovanni Resta, Jul 24 2025

A386004 Primes whose digit set intersects the odd digits in at most one element and intersects the even digits in at most two elements.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 181, 211, 223, 227, 229, 233, 241, 263, 269, 277, 281, 283, 383, 401, 409, 421, 433, 443, 449, 461, 463, 467, 487, 499, 601, 607, 641, 643, 647, 661, 677, 683, 727, 787, 809, 811, 821, 823, 827, 829, 863
Offset: 1

Author

Jean-Marc Rebert, Jul 14 2025

Keywords

Comments

From David A. Corneth, Jul 14 2025: (Start)
Terms can have at most three distinct digits.
Terms > 5 cannot have a digit 5. Proof: Terms > 5 are odd as they are prime. They cannot have a last digit 5. So if they have a digit 5 then they have at least two distinct odd digits contradicting the sequence definition of having at most one odd digit. (End)

Examples

			101 is a term because it is prime and its digit set is {0, 1} — containing at most one odd digit and no more than two distinct even digits.
1021 is a term because it is prime and its digit set is {0,1,2} — containing at most one odd digit and no more than two distinct even digits.
		

Programs

  • Mathematica
    Select[Prime[Range[150]],Length[Intersection[d=IntegerDigits[#],{1,3,5,7,9}]]<=1 && Length[Intersection[d,{0,2,4,6,8}]]<=2 &] (* Stefano Spezia, Jul 14 2025 *)
  • PARI
    is(n) = if(!isprime(n), return(0)); my(s=Set(digits(n)), odd=0); if(#s>3,return(0)); odd=sum(i=1, #s ,bitand(s[i], 1)); if(odd > 1, return(0)); if(#s-odd > 2, return(0)); 1 \\ David A. Corneth, Jul 14 2025

A385714 a(n) is the smallest positive integer k such that the Diophantine equation x^3 + y^3 + z^3 = k^n, where 0 < x < y < z has an integer solution, or -1 if no such integer exists.

Original entry on oeis.org

36, 6, 6, 11, 6, 3, 6, 6, 3, 6, 6, 3, 6, 6, 3, 6, 6, 3, 6, 6, 3, 6, 3, 2, 6, 3, 2, 6, 3, 2, 6, 3, 2, 6, 3, 2
Offset: 1

Author

Jean-Marc Rebert, Jul 07 2025

Keywords

Examples

			n [x, y, z]         k^n
1 [1, 2, 3]       36 = 36^1;
2 [1, 2, 3]       36 = 6^2;
3 [3, 4, 5]      216 = 6^3;
4 [12, 17, 20] 14641 = 11^4;
5 [6, 12, 18]   7776 = 6^5;
6 [1, 6, 8]      729 = 3^6;
		

Crossrefs

Formula

For 4 < n <= 22, if n == 0 (mod 3) then a(n) = 3, else a(n)=6.
From Chai Wah Wu, Jul 15 2025: (Start)
Conjecture: if n >= 24 and n == 0 (mod 3), then a(n) = 2. Verified for n <= 69.
Conjecture: if n >= 23 and n == 2 (mod 3), then a(n) = 3. Verified for n <= 44.
Conjecture: if n >= 7 and n == 1 (mod 3), then a(n) = 6. (End)
From David A. Corneth, Jul 15 2025: (Start)
For n >= 24 and n == 0 (mod 3) indeed we have a(n) = 2. Proof: holds for n = 24. For multiples of 3 that are >= 27 and m >= 0 we have:
2^(27 + 3*m) = (18 * 2^m)^3 + (366 * 2^m)^3 + (440 * 2^m)^3.
In general 2 <= a(n+3) <= a(n) therefore a(n) <= 6 for n >= 4. (End).

Extensions

a(7)-a(12) from David A. Corneth, Jul 07 2025
a(16)-a(27) from Chai Wah Wu, Jul 15 2025
a(28)-a(34) from David A. Corneth, Jul 15 2025, Jul 17 2025

A385611 Numbers that can be written as s^w + t^x + u^y + v^z with 1 < s < t < u and {s,t,u,v} = {w,x,y,z} (the sequence of exponents can be any permutation of s,t,u,v).

Original entry on oeis.org

202, 245, 254, 322, 340, 348, 377, 383, 400, 422, 460, 465, 468, 532, 545, 548, 568, 603, 628, 688, 700, 730, 736, 738, 739, 845, 865, 876, 892, 922, 936, 961, 977, 1002, 1029, 1033, 1036, 1092, 1122, 1138, 1174, 1205, 1234, 1236, 1265, 1269, 1338, 1403, 1407, 1433
Offset: 1

Author

Jean-Marc Rebert, Jul 04 2025

Keywords

Examples

			202 = 2^5 + 3^4 + 4^3 + 5^2.
628 = 2^2 + 3^5 + 4^4 + 5^3.
936 = 2^2 + 3^5 + 4^3 + 5^4.
1234 = 2^2 + 3^4 + 4^5 + 5^3.
		

Crossrefs

A385512 a(n) is the least prime p > n in which the digits of n appear as an ordered but not necessarily contiguous subsequence.

Original entry on oeis.org

101, 11, 23, 13, 41, 53, 61, 17, 83, 19, 101, 101, 127, 103, 149, 151, 163, 107, 181, 109, 1201, 211, 223, 223, 241, 251, 263, 127, 281, 229, 307, 131, 1321, 233, 347, 353, 367, 137, 383, 139, 401, 241, 421, 431, 443, 457, 461, 347, 487, 149, 503, 151, 521, 353, 541
Offset: 0

Author

Jean-Marc Rebert, Jul 01 2025

Keywords

Examples

			a(11) = 101, because 101 is the least prime p > 11 in which the digits of 11 appear as an ordered but non-necessarily contiguous subsequence.
		

Crossrefs

Programs

  • Python
    from sympy import sieve
    def osub(n, t): # n > 0 is an ordered_subsequence of t
        if t < n: return False
        while n and t:
            if n%10 == t%10:
                n //= 10
            t //= 10
        return n == 0
    def a(n): return next(p for p in sieve if p > n and osub(n, p)) if n else 101
    print([a(n) for n in range(55)]) # Michael S. Branicky, Jul 01 2025