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: Daniel Suteu

Daniel Suteu's wiki page.

Daniel Suteu has authored 80 sequences. Here are the ten most recent ones:

A379768 a(n) is the smallest prime p such that omega(p^n + 1) = n.

Original entry on oeis.org

2, 3, 5, 43, 17, 47, 151, 1697, 59, 2153, 521, 13183, 30089, 66569, 761
Offset: 1

Author

Daniel Suteu, Jan 06 2025

Keywords

Comments

2*10^6 < a(16) <= 206874667; a(18) = 33577; a(20) <= 3258569.
A219018(n) <= a(n) <= A280005(n).

Examples

			a(3) = 5 is the smallest prime of the set {p(i)} = {5, 11, 13, 19, 23, ...} where omega(p(i)^3 + 1) = 3.
		

Programs

  • Mathematica
    a[n_] := Module[{p = 2}, While[PrimeNu[p^n + 1] != n, p = NextPrime[p]]; p]; Print[Array[a, 11]]
  • PARI
    a(n) = forprime(p=2, oo, if(omega(p^n+1) == n, return(p)));

A368210 Irregular triangle T(n,k) read by rows (n >= 1, 0 <= k <= max(A001222([1..n]))), giving the number of k-almost primes in [1,n].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 4, 2, 1, 4, 2, 1, 1, 4, 3, 1, 1, 4, 4, 1, 1, 5, 4, 1, 1, 5, 4, 2, 1, 6, 4, 2, 1, 6, 5, 2, 1, 6, 6, 2, 1, 6, 6, 2, 1, 1, 7, 6, 2, 1, 1, 7, 6, 3, 1, 1, 8, 6, 3, 1, 1, 8, 6, 4, 1, 1, 8, 7, 4, 1, 1, 8, 8, 4, 1, 1, 9, 8, 4, 1
Offset: 1

Author

Daniel Suteu, Dec 17 2023

Keywords

Comments

The smallest k-almost prime is 2^k, therefore the n-th row has 1+floor(log_2(n)) terms.

Examples

			First few rows are:
1;
1, 1;
1, 2;
1, 2, 1;
1, 3, 1;
1, 3, 2;
1, 4, 2;
1, 4, 2, 1;
1, 4, 3, 1;
1, 4, 4, 1;
...
		

Crossrefs

Programs

  • PARI
    tabf(nn) = for(n=1, nn, my(v=vector(n, j, bigomega(j))); for(k=0, vecmax(v), print1(#select(x->x==k, v), ", ")); print());
    
  • PARI
    almost_prime_count(n,k) = if(k==0, return(n>=1)); if(k==1, return(primepi(n))); (f(m, p, k, j=0)=my(s=sqrtnint(n\m, k), count=0); if(k==2, forprime(q=p, s, count += primepi(n\(m*q)) - j; j+=1); return(count)); forprime(q=p, s, count += f(m*q, q, k-1, j); j+=1); count); f(1, 2, k);
    nth_row(n) = for(k=0, logint(n, 2), print1(almost_prime_count(n, k), ", "));
    tabf(nn) = for(n=1, nn, nth_row(n); print());
    upto(nn) = for(n=1, nn, nth_row(n));
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A368210_T(n,k):
        if k==0: return int(n>=1)
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        return int(sum(primepi(n//prod(c[1] for c in a))-a[-1][0] for a in g(n,0,1,1,k)) if k>1 else primepi(n)) # Chai Wah Wu, Sep 02 2024

A368162 a(n) is the smallest number k > 0 such that bigomega(k^n + 1) = n.

Original entry on oeis.org

1, 3, 3, 43, 7, 32, 23, 643, 17, 207, 251, 3255, 255, 1568, 107
Offset: 1

Author

Daniel Suteu, Dec 14 2023

Keywords

Comments

a(16) <= 206874667; a(17) = 4095; a(18) = 6272; a(21) = 1151.

Examples

			a(5) = 7 is the smallest number of the set {k(i)} = {7, 14, 24, 26, 46, 51, ...} where k(i)^5 + 1 has exactly 5 prime factors counted with multiplicity.
		

Programs

  • PARI
    a(n) = my(k=1); while (bigomega(k^n+1) != n, k++); k;

A368163 a(n) is the smallest number k > 1 such that bigomega(k^n - 1) = n.

Original entry on oeis.org

3, 4, 4, 10, 17, 8, 25, 5, 28, 9, 81, 13, 289, 64, 100, 41, 6561, 31, 6657, 57, 529, 1025
Offset: 1

Author

Daniel Suteu, Dec 14 2023

Keywords

Comments

a(23) <= 196609; a(24) = 79; a(25) <= 28561; a(26) = 14015; a(27) = 961; a(28) = 729; a(30) = 361; a(32) = 2047.

Examples

			a(5) = 17 is the smallest number of the set {k(i)} = {17, 19, 21, 26, 27, 39, 45, ...} where k(i)^5 - 1 has exactly 5 prime factors counted with multiplicity.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=2); while (bigomega(k^n-1) != n, k++); k;

A361256 Smallest base-n strong Fermat pseudoprime with n distinct prime factors.

Original entry on oeis.org

2047, 8911, 129921, 381347461, 333515107081, 37388680793101, 713808066913201, 665242007427361, 179042026797485691841, 8915864307267517099501, 331537694571170093744101, 2359851544225139066759651401, 17890806687914532842449765082011
Offset: 2

Author

Daniel Suteu, Mar 06 2023

Keywords

Comments

Main diagonal of A360184.

Crossrefs

Programs

  • PARI
    strong_check(p, base, e, r) = my(tv=valuation(p-1, 2)); tv > e && Mod(base, p)^((p-1)>>(tv-e)) == r;
    strong_fermat_psp(A, B, k, base) = A=max(A, vecprod(primes(k))); (f(m, l, lo, k, e, r) = my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, forstep(p=lift(1/Mod(m, l)), hi, l, if(isprimepower(p) && gcd(m*base, p) == 1 && strong_check(p, base, e, r), my(n=m*p); if(n >= A && (n-1) % znorder(Mod(base, p)) == 0, listput(list, n)))), forprime(p=lo, hi, base%p == 0 && next; strong_check(p, base, e, r) || next; my(z=znorder(Mod(base, p))); gcd(m,z) == 1 || next; my(q=p, v=m*p); while(v <= B, list=concat(list, f(v, lcm(l, z), p+1, k-1, e, r)); q *= p; Mod(base, q)^z == 1 || break; v *= p))); list); my(res=f(1, 1, 2, k, 0, 1)); for(v=0, logint(B, 2), res=concat(res, f(1, 1, 2, k, v, -1))); vecsort(Set(res));
    a(n) = if(n < 2, return()); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=strong_fermat_psp(x, y, n, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x);

A360184 Square array A(n, k) read by antidiagonals downwards: smallest base-n strong Fermat pseudoprime with k distinct prime factors for k, n >= 2.

Original entry on oeis.org

2047, 15841, 703, 800605, 8911, 341, 293609485, 152551, 4371, 781, 10761055201, 41341321, 129921, 24211, 217, 5478598723585, 12283706701, 9224391, 4382191, 29341, 325, 713808066913201, 1064404682551, 2592053871, 381347461, 3405961, 58825, 65, 90614118359482705
Offset: 2

Author

Daniel Suteu, Mar 04 2023

Keywords

Comments

The array A(n, k) starts as follows:
k = 2 3 4 5 6
n = 2: 2047 15841 800605 293609485 10761055201
n = 3: 703 8911 152551 41341321 12283706701
n = 4: 341 4371 129921 9224391 2592053871
n = 5: 781 24211 4382191 381347461 9075517561
n = 6: 217 29341 3405961 557795161 333515107081

Crossrefs

Cf. A001262, A180065 (row n=2), A271873.

Programs

  • PARI
    strong_check(p, base, e, r) = my(tv=valuation(p-1, 2)); tv > e && Mod(base, p)^((p-1)>>(tv-e)) == r;
    strong_fermat_psp(A, B, k, base) = A=max(A, vecprod(primes(k))); (f(m, l, lo, k, e, r) = my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, forstep(p=lift(1/Mod(m, l)), hi, l, if(isprimepower(p) && gcd(m*base, p) == 1 && strong_check(p, base, e, r), my(n=m*p); if(n >= A && (n-1) % znorder(Mod(base, p)) == 0, listput(list, n)))), forprime(p=lo, hi, base%p == 0 && next; strong_check(p, base, e, r) || next; my(z=znorder(Mod(base, p))); gcd(m,z) == 1 || next; my(q=p, v=m*p); while(v <= B, list=concat(list, f(v, lcm(l, z), p+1, k-1, e, r)); q *= p; Mod(base, q)^z == 1 || break; v *= p))); list); my(res=f(1, 1, 2, k, 0, 1)); for(v=0, logint(B, 2), res=concat(res, f(1, 1, 2, k, v, -1))); vecsort(Set(res));
    T(n, k) = if(n < 2, return()); my(x=vecprod(primes(k)), y=2*x); while(1, my(v=strong_fermat_psp(x, y, k, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x);
    print_table(n, k) = for(x=2, n, for(y=2, k, print1(T(x, y), ", ")); print(""));
    for(k=2, 9, for(n=2, k, print1(T(n, k-n+2)", ")));

A356866 Smallest Carmichael number (A002997) with n prime factors that is also a strong pseudoprime to base 2 (A001262).

Original entry on oeis.org

15841, 5310721, 440707345, 10761055201, 5478598723585, 713808066913201, 1022751992545146865, 5993318051893040401, 120459489697022624089201, 27146803388402594456683201, 14889929431153115006659489681
Offset: 3

Author

Daniel Suteu, Oct 01 2022

Keywords

Crossrefs

Programs

  • PARI
    carmichael_strong_psp(A, B, k, base) = A=max(A, vecprod(primes(k+1))\2); (f(m, l, p, k, k_exp, congr, u=0, v=0) = my(list=List()); if(k==1, forprime(q=u, v, my(t=m*q); if((t-1)%l == 0 && (t-1)%(q-1) == 0, my(tv=valuation(q-1, 2)); if(tv > k_exp && Mod(base, q)^(((q-1)>>tv)< k_exp && Mod(base, q)^(((q-1)>>tv)<u, u=r); list=concat(list, f(t, L, r, k-1, k_exp, congr, u, v)))))))); list); my(res=f(1, 1, 3, k, 0, 1)); for(v=0, logint(B, 2), res=concat(res, f(1, 1, 3, k, v, -1))); vecsort(Vec(res));
    a(n,base=2) = if(n < 3, return()); my(x=vecprod(primes(n+1))\2,y=2*x); while(1, my(v=carmichael_strong_psp(x,y,n,base)); if(#v >= 1, return(v[1])); x=y+1; y=2*x);

Formula

a(n) >= max(A180065(n), A006931(n)).

A356821 Lucas-Carmichael numbers k that have an abundancy index sigma(k)/k that is larger than the abundancy indices of all smaller Lucas-Carmichael numbers.

Original entry on oeis.org

399, 6304359999, 408598269695, 517270926095, 20203946790335
Offset: 1

Author

Amiram Eldar and Daniel Suteu, Aug 29 2022

Keywords

Comments

The rounded values of sigma(k)/k are 1.604, 1.612, 1.666, 1.706, 1.752, ...
The sequence includes the smallest abundant Lucas-Carmichael number, which is <= 1012591408428327888883952080728349448745451794025524955777432246705535.

Crossrefs

Similar sequences: A328691, A329460.

Programs

  • Mathematica
    lc = Import["https://oeis.org/A006972/b006972.txt", "Table"][[;; , 2]]; rm = 0; s = {}; Do[n = lc[[k]]; r = DivisorSigma[-1, n]; If[r > rm, AppendTo[s, n]; rm = r], {k, 1, Length[lc]}]; s

Extensions

a(5) from Martin Ehrenstein, Jul 30 2023

A353409 Smallest overpseudoprime to base 2 (A141232) with n distinct prime factors.

Original entry on oeis.org

2047, 13421773, 14073748835533
Offset: 2

Author

Daniel Suteu, May 07 2022

Keywords

Comments

a(5) > 2^64.
a(5) <= 1376414970248942474729,
a(6) <= 48663264978548104646392577273,
a(7) <= 294413417279041274238472403168164964689,
a(8) <= 98117433931341406381352476618801951316878459720486433149,
a(9) <= 1252977736815195675988249271013258909221812482895905512953752551821.

Crossrefs

A352987 Carmichael numbers (A002997) that are overpseudoprimes to base 2 (A141232).

Original entry on oeis.org

65700513721, 168003672409, 459814831561, 13685652197857, 34477679139751, 74031531351121, 92327722290241, 206175669172201, 704077371354601, 1882982959757929, 2901482064497017, 3715607011189609, 5516564718607489, 5636724028491697, 6137426373439681, 14987802403246609
Offset: 1

Author

Daniel Suteu, May 06 2022

Keywords

Comments

If we define f(n) to be the smallest number in the sequence with n prime factors, then we have:
f(3) = 65700513721,
f(4) <= 84286331493236478328609,
f(5) <= 3848515708338676403444146123852434164444641.

Crossrefs

Intersection of A002997 and A141232.
Intersection of A291637 and A141232.