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.
%I A118883 #17 Jan 07 2025 10:07:12 %S A118883 2,3,7,23,31,223,127,383,1151,3583,5119,6143,8191,129023,73727,245759, %T A118883 131071,917503,524287,5505023,10616831,14680063,18874367,109051903, %U A118883 169869311,654311423,738197503,2264924159,2818572287,3758096383,2147483647,24159191039 %N 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). %C A118883 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. %H A118883 Robert G. Wilson v, <a href="/A118883/b118883.txt">Table of n, a(n) for n = 1..421</a> %e A118883 a(4) = 23 because 23 is prime and 23+1 = 2*2*2*3 has 4 prime factors (24 is a 4-almost prime). %t A118883 (* copied directly from A073919 with only a sign change *) 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 - 1, ProvablePrimeQ]; If[minp < v, v = minp]]] (* First do <<NumberTheory`PrimeQ`. ptns[n, k] is list of partitions of n into exactly k parts *) (* appended by _Robert G. Wilson v_ *) Array[a, 32] (* _Robert G. Wilson v_, Jul 21 2011 *) %o A118883 (PARI) %o A118883 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))); %o A118883 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 %Y A118883 Cf. A073919, A098026, A073918. %K A118883 nonn %O A118883 1,1 %A A118883 _Rick L. Shepherd_, May 03 2006 %E A118883 a(26)-a(32) from _Donovan Johnson_, Feb 02 2011