login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A368683 a(n) is the first semiprime k such that there are as many semiprimes as possible in the n numbers starting at k. 0
4, 9, 33, 33, 91, 118, 213, 213, 213, 213, 143095, 143095, 10496839, 237520705, 10630829, 7225144283, 54712989442, 54712989442 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For n = 5, there are at most 4 semiprimes in 5 consecutive numbers (because at least one of the 5 is divisible by 4). In the 5 consecutive numbers starting at 91 there are 4 semiprimes: 91 = 7 * 13, 93 = 3 * 31, 94 = 2 * 47 and 95 = 5 * 19, and no semiprime < 91 works, so a(5) = 91.
MAPLE
f:= proc(n)
local P, r, T, M, v, t, V, W, m, Ts, k, x, L, p, i;
P:= map(p -> `if`(p^2 <= n, p^2, p), select(isprime, [$1..n/2]));
r:= ilcm(P);
T:= combinat:-cartprod([seq([$0..p-1], p=P)]);
M:= 0;
while not T[finished] do
v:= T[nextvalue]();
t:= chrem(v, P);
V:= [seq(igcd(t+i, r), i=0..n-1)];
if V[1] <> 1 and not isprime(V[1]) then next fi;
W[t]:= select(i -> V[i] = 1 or isprime(V[i]), [$1..n]);
m:= nops(W[t]);
if m > M then
M:= m; Ts:= {t};
elif m = M then Ts:= Ts union {t}
fi
od:
for k from 0 do
for v in Ts do
x:= k*r + v;
L:= W[v] +~ (x-1);
if andmap(t -> numtheory:-bigomega(t) = 2, L) then return x fi;
od;
od:
end proc:
4, 9, 33, seq(f(n), n=4..17);
CROSSREFS
Cf. A001358.
Sequence in context: A119574 A006393 A320920 * A048757 A356825 A173659
KEYWORD
nonn,more
AUTHOR
Robert Israel, Jan 02 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 01:35 EDT 2024. Contains 372431 sequences. (Running on oeis4.)