A335667
a(n) is the smallest even number k such that k-1 and k+1 are both n-almost primes.
Original entry on oeis.org
4, 34, 274, 2276, 8126, 184876, 446876, 18671876, 95234374, 1144976876, 6018359374, 281025390626, 2068291015624, 6254345703124, 181171630859374, 337813720703126, 31079046044921876, 205337027587890626
Offset: 1
a(1) = 4 since 4 - 1 and 4 + 1 are both primes.
a(2) = 34 since 34 - 1 = 33 = 3*11 and 34 + 1 = 35 = 5*7 are both semiprimes.
a(3) = 274 since 274 - 1 = 273 = 3*7*13 and 274 + 1 = 275 = 5^2 * 11 are both 3-almost primes.
-
m = 8; v = Table[0, {m}]; c = 0; o1 = 1; n = 4; While[c < m, o2 = PrimeOmega[n + 1]; If[o1 == o2 && v[[o1]] == 0, c++; v[[o1]] = n]; o1 = o2; n += 2]; v
-
generate(A, B, n, k) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, if(bigomega(m*q+2) == k, listput(list, m*q+1))), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 3, n)));
a(n) = my(x=2^n, y=2*x); while(1, my(v=generate(x, y, n, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jul 10 2023
A356953
Least nonzero starting number in the first run of exactly n consecutive numbers having the same number of prime factors counted with multiplicity, or -1 if no such number exists.
Original entry on oeis.org
1, 2, 33, 1083, 602, 2522, 211673, 6612470, 3405122, 49799889, 202536181, 3195380868, 5208143601, 85843948321, 97524222465, 361385490681003, 441826936079342
Offset: 1
2 and 3 are 2 consecutive numbers and have the same number of prime factors, and 2 is the smallest such number, hence a(2) = 2.
-
card(m)=my(c=0,k=bigomega(m));if(bigomega(m-1)!=k,while(bigomega(m)==k,c++;m++));c
a(n)=if(n==1,return(1));for(m=2,+oo,if(card(m)==n,return(m)))
A358818
a(n) is the least number k such that A046660(k) = A046660(k+1) = n.
Original entry on oeis.org
1, 44, 135, 80, 8991, 29888, 123200, 2316032, 1043199, 24151040, 217713663, 689278976, 11573190656, 76876660736, 311969153024, 2035980763136, 2741258240000, 215189482110975
Offset: 0
-
e[n_] := PrimeOmega[n] - PrimeNu[n]; a[n_] := Module[{k = 1}, While[e[k] != n || e[k + 1] != n, k++]; k]; Array[a, 10, 0]
-
e(n) = {my(f = factor(n)); bigomega(f) - omega(f)};
a(n) = {my(k=1); while(e(k) != n || e(k+1) !=n , k++); k};
A369898
Numbers k such that k and k + 1 each have 9 prime divisors, counted with multiplicity.
Original entry on oeis.org
203391, 698624, 1245375, 1942784, 2176064, 2282175, 2536191, 2858624, 2953664, 3282687, 3560192, 3655935, 3914000, 4068224, 4135616, 4205600, 4244967, 4586624, 4695488, 4744575, 4991679, 5055615, 5450624, 5475519, 5519744, 6141824, 6246800, 6410096, 6655040, 6660224, 6753375, 6816879, 6862400
Offset: 1
a(3) = 1245375 is a term because 1245375 = 3^5 * 5^3 * 41 and 1245376 = 2^6 * 11 * 29 * 61 each have 9 prime factors, counted with multiplicity.
-
with(priqueue):
R:= NULL: count:= 0:
initialize(Q); r:= 0:
insert([-2^9, [2$9]], Q);
while count < 40 do
T:= extract(Q);
if -T[1] = r + 1 then
R:= R, r; count:= count+1;
fi;
r:= -T[1];
p:= T[2][-1];
q:= nextprime(p);
for i from 9 to 1 by -1 while T[2][i] = p do
insert([-r*(q/p)^(10-i), [op(T[2][1..i-1]), q$(10-i)]], Q);
od
od:
R;
A349261
a(n) is the least number k such that A349258(k) = A349258(k+1) = n.
Original entry on oeis.org
2, 14, 125, 135, 2079, 21735, 2730375, 916352, 5955200, 4122495, 444741759, 7391633535, 98228219264
Offset: 1
2 is a term since A349258(2) = A349258(3) = 1.
14 is a term since A349258(14) = A349258(15) = 2.
-
f[p_, e_] := 2^DigitCount[e, 2, 1] - 1; c[1] = 0; c[n_] := Plus @@ f @@@ FactorInteger[n]; seq[len_, nmax_] := Module[{s = Table[0, {len}], k = 0, n = 1, i}, While[n < nmax && k < len, i = c[n]; If[c[n + 1] == i && i <= len && s[[i]] == 0, k++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[8, 3*10^6]
A374449
Triangle read by rows: T(m,k) is the first number that starts a sequence of exactly k consecutive numbers with m prime factors, counted with multiplicity, if such a sequence is possible.
Original entry on oeis.org
5, 2, 4, 9, 33, 8, 27, 170, 1083, 602, 2522, 211673, 16, 135, 1274, 4023, 12122, 204323, 355923, 6612470, 3405122, 49799889, 202536181, 3195380868, 5208143601, 85843948321, 97524222465, 32, 944, 15470, 57967, 632148, 14845324, 69921004, 888781058, 2674685524
Offset: 1
Triangle starts
5 2
4 9 33
8 27 170 1083 603 3533 211673
T(3,2) = 27 because 27 = 3^3 and 28 = 2^2 * 7 each have 3 prime factors (counted with multiplicity) while 26 = 2*13 and 29 (prime) do not.
-
f:= proc(n)
uses priqueue;
local V,L, count, T, v, j, q, p, TP;
V:= Vector(2^n-1); count:= 0;
L:= [(-1)$(2^n),2^n];
initialize(pq);
insert([-2^(n),2$n],pq);
while count < 2^n-1 do
T:= extract(pq); v:= -T[1];
if L[-1] <> v-1 then
for j from 1 while L[-1]-L[-j] = j-1 do
if L[-j]-L[-j-1] <> 1 and V[j] = 0 then
V[j]:= L[-j]; count:= count+1;
fi od fi;
L:= [op(L[2..-1]),v];
q:= T[-1];
p:= nextprime(q);
for j from n+1 to 2 by -1 do
if T[j] <> q then break fi;
TP:= [T[1]*(p/q)^(n+2-j), op(T[2..j-1]), p$(n+2-j)];
insert(TP,pq);
od od;
op(convert(V,list));
end proc:
f(1):= 5,2:
seq(f(i),i=1..3);
A387505
Smallest number m such that m, m+1, m+2, m+3 and m+4 have exactly n prime factors (counted with multiplicity).
Original entry on oeis.org
602, 12122, 632148, 101905622, 15605704374, 1300091574624, 431094129471872
Offset: 3
a(4) = 12122 = 2*11*19*29, a(4)+1 = 12123 = 3^3*449, a(4)+2 = 12124 = 2^2*7*433, a(4)+3 = 12125 = 5^3*97, a(4)+4 = 12126 = 2*3*43*47 (all products of four prime factors).
Comments