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.

Showing 1-3 of 3 results.

A118883 Smallest prime p with bigomega(p+1)=n, where bigomega(m)=A001222(m) is the number of prime divisors of m (counted with multiplicity).

Original entry on oeis.org

2, 3, 7, 23, 31, 223, 127, 383, 1151, 3583, 5119, 6143, 8191, 129023, 73727, 245759, 131071, 917503, 524287, 5505023, 10616831, 14680063, 18874367, 109051903, 169869311, 654311423, 738197503, 2264924159, 2818572287, 3758096383, 2147483647, 24159191039
Offset: 1

Views

Author

Rick L. Shepherd, May 03 2006

Keywords

Comments

Equivalently, smallest prime p such that p+1 is an n-almost prime. For smallest prime p such that p+1 is a squarefree n-almost prime, see A098026.

Examples

			a(4) = 23 because 23 is prime and 23+1 = 2*2*2*3 has 4 prime factors (24 is a 4-almost prime).
		

Crossrefs

Programs

  • Mathematica
    (* copied directly from A073919 with only a sign change *) ptns[n_, 0] := If[n==0, {{}}, {}]; ptns[n_, k_] := Module[{r}, If[n v, Return[v]]; minp = Min@@ Select[l - 1, ProvablePrimeQ]; If[minp < v, v = minp]]] (* First do <Robert G. Wilson v *) Array[a, 32] (* Robert G. Wilson v, Jul 21 2011 *)
  • PARI
    almost_primes(A, B, n) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, listput(list, m*q)), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 2, n)));
    a(n) = my(x=2^n, y=2*x); while(1, my(v=almost_primes(x, y, n)); for(k=1, #v, if(isprime(v[k]-1), return(v[k]-1))); x=y+1; y=2*x); \\ Daniel Suteu, Jan 07 2025

Extensions

a(26)-a(32) from Donovan Johnson, Feb 02 2011

A081547 Smallest composite number which is 1 more than the product of n (not necessarily distinct) prime numbers.

Original entry on oeis.org

4, 10, 9, 25, 33, 65, 129, 385, 513, 1025, 2049, 4097, 8193, 16385, 32769, 98305, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2003

Keywords

Comments

a(2*n+1) = 2^(2*n+1)+1, n>0. - Vladeta Jovovic, Apr 02 2003

Crossrefs

Programs

  • Mathematica
    cno[n_]:=Module[{a=2^n+1},If[PrimeQ[a],2^(n-1)*3+1,a]]; Join[{4,10}, Array[cno,30,3]] (* Harvey P. Dale, Mar 24 2012 *)
  • Python
    from sympy import isprime
    def A081547(n): return 10 if n==2 else ((3<Chai Wah Wu, Sep 02 2024

Formula

For n>2, a(n) = 2^n+1 unless this is a Fermat prime (A019434), in which case a(n) = 2^(n-1)*3+1 (which is divisible by 5). - Dean Hickerson, Apr 05 2003

Extensions

More terms from Vladeta Jovovic, Apr 02 2003

A321169 a(n) is the smallest prime p such that p + 2 is a product of n primes (counted with multiplicity).

Original entry on oeis.org

3, 2, 43, 79, 241, 727, 3643, 15307, 19681, 164023, 1673053, 885733, 2657203, 18600433, 23914843, 100442347, 358722673, 645700813, 4519905703, 18983603959, 48427561123, 31381059607, 261508830073, 1307544150373, 3295011258943, 24006510600883, 12709329141643, 53379182394907, 190639937124673, 2615579937350539
Offset: 1

Views

Author

Amiram Eldar and Zak Seidov, Jan 10 2019

Keywords

Comments

a(n) ~ c * 3^n. - David A. Corneth, Jan 11 2019

Examples

			a(1) = 3 as 3 + 2 = 5 (prime),
a(2) = 2 as 2 + 2 = 4 = 2*2 (semiprime),
a(3) = 43 as 43 + 2 = 45 = 3*3*5  (3-almost prime),
a(4) = 79 as 79 + 2 = 81 = 3*3*3*3 (4-almost prime).
		

Crossrefs

Programs

  • Mathematica
    ptns[n_, 0] := If[n == 0, {{}}, {}]; ptns[n_, k_] := Module[{r}, If[n < k, Return[{}]]; ptns[n, k] = 1 + Union @@ Table[PadRight[#, k] & /@ ptns[n - k, r], {r, 0, k}]]; a[n_] := Module[{i, l, v}, v = Infinity; For[i = n, True, i++, l = (Times @@ Prime /@ # &) /@ ptns[i, n]; If[Min @@ l > v, Return[v]]; minp = Min @@ Select[l - 2, PrimeQ]; If[minp < v, v = minp]]] ; Array[a, 10] (* after Amarnath Murthy at A073919 *)
  • PARI
    a(n) = forprime(p=2, , if (bigomega(p+2) == n, return (p))); \\ Michel Marcus, Jan 10 2019
    
  • PARI
    a(n) = {my(p3 = 3^n, u, c); if(n <= 2, return(4 - n)); if(isprime(p3 - 2), return(p3 - 2)); forprime(p = 5, oo, if(isprime(p3 / 3 * p - 2), u = p3 / 3 * p - 2; break ) ); for(i = 2, n, if(p3 * (5/3)^i > u, return(u)); for(j = 1, oo, if(p3 * j \ 3^i > u, next(2)); if(bigomega(j) == i, if(isprime(p3 / 3^(i) * j - 2), u = p3 / 3^(i) * j - 2; next(2) ) ) ) ); return(u) } \\ David A. Corneth, Jan 11 2019
Showing 1-3 of 3 results.