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.

A384876 Smallest number m such that both m-1 and m+1 are products of at least n (not necessarily distinct) primes.

This page as a plain text file.
%I A384876 #37 Jun 14 2025 21:42:54
%S A384876 3,5,17,55,161,1457,2431,13121,101249,153089,2086399,7991297,65071999,
%T A384876 72630271,2829746177,2975006719,68278476799,75389157377,159703334911,
%U A384876 1570258288639,9714181341185,91845775327231,551785225781249,2123044908695551,4560483868737535,4560483868737535,424428773098651649
%N A384876 Smallest number m such that both m-1 and m+1 are products of at least n (not necessarily distinct) primes.
%C A384876 The sequence is nondecreasing. - _David A. Corneth_, Jun 13 2025
%e A384876 The smallest number surrounded by semiprime numbers is 5 (between 4 and 6).
%e A384876 And 17 lies between 16 = 2^4 and 18 = 2*3^2.
%p A384876 F:= proc(n) local pq,t,x,y,z,p,i,m;
%p A384876   uses priqueue;
%p A384876   initialize(pq);
%p A384876       insert([-2^n, 2$n], pq);
%p A384876   y:= -infinity; z:= -infinity;
%p A384876     do
%p A384876       t:= extract(pq);
%p A384876       x:= -t[1];
%p A384876       if x-y=2 or x-z=2 then return x-1 fi;
%p A384876       z:= y; y:= x; m:= nops(t);
%p A384876       if t[-1] = 2 then insert([2*t[1],2$m],pq) fi;
%p A384876       p:= nextprime(t[-1]);
%p A384876       for i from m to 2 by -1 while t[i] = t[-1] do
%p A384876         insert([t[1]*(p/t[-1])^(m+1-i), op(t[2..i-1]), p$(m+1-i)], pq)
%p A384876       od;
%p A384876     od
%p A384876 end proc:
%p A384876 seq(F(i),i=1..20); # _Robert Israel_, Jun 12 2025
%o A384876 (PARI) a(n) = my(m=2); while((bigomega(m-1)<n) || (bigomega(m+1)<n), m++); m; \\ _Michel Marcus_, Jun 13 2025
%Y A384876 Cf. A000040, A001222, A099047, A154704, A176462, A384372.
%K A384876 nonn
%O A384876 1,1
%A A384876 _Sinuhe Perea_, Jun 12 2025
%E A384876 a(10)-a(13) from _Alois P. Heinz_, Jun 12 2025
%E A384876 a(14)-a(20) from _Robert Israel_, Jun 12 2025
%E A384876 More terms from _David A. Corneth_, Jun 13 2025