A295185
a(n) is the smallest composite number whose prime divisors (with multiplicity) sum to prime(n); n >= 3.
Original entry on oeis.org
6, 10, 28, 22, 52, 34, 76, 184, 58, 248, 148, 82, 172, 376, 424, 118, 488, 268, 142, 584, 316, 664, 1335, 388, 202, 412, 214, 436, 3729, 508, 1048, 274, 2919, 298, 1208, 1256, 652, 1336, 1384, 358, 3801, 382, 772, 394, 6501, 7385, 892, 454, 916, 1864, 478, 5061, 2008, 2056, 2104, 538, 2168, 1108, 562, 5943, 9669
Offset: 3
5=prime(3), g(3,1)=5-3=2, a term in C; k=1, and a(3)=3*B(5-3)=3*2=6; 5~1(2).
17=prime(7), g(7,1)=17-13=4, a term in C; k=1, a(7)=13*B(17-13)=13*4=52; 17~1(4).
211=prime(47); g(47,1)=12, a term in D, R1=2, R2=0, k=z=2, a(47)=197*b(211-197)=197*33=6501; 211~2(12,2), and 211 is first prime of type k=2.
8923=prime(1109); g(1109,1)=30, a term in E. R1=26, R2=6, z=3 and w=2 both comply but 3*(g(n,3)-3)=159 > 5*(g(n,2)-5)=155, so k=w=2. Therefore a(1109)=8887*b(8923-8887)=8887*b(36)=8887*155=1377485; 8923~2(30,6).
40343=prime(4232); g(4232,1)=54, a term in E. R1=58, R2=12,z=6 and w=3, both comply, 3*(g(n,z)-3)=309 and 5*(g(n,w)-5)=305 therefore k=w=3 and a(4232) = 40277*b(40343-40277)=40277*b(66)=40277*305=12284485; 40343~3(54,6,6).
81611=prime(7981); g(81611,1)=42, a term in D, R1=22, R2=0; z complies, k=z=6, a(7981)=81547*b(81611-81547)=81546*b(64)=81546*183=14923101; 81611~6(42,6,4,6,2,4) and is the first prime of type k=6.
If p is the greater of twin/cousin primes then p~1(2), p~1(4), respectively.
Cf.
A000040,
A056240,
A288814,
A292081,
A289993,
A288313,
A297150,
A298615,
A298252,
A297925,
A298366,
A288189.
-
b[n_] := b[n] = Total[Times @@@ FactorInteger[n]];
a[n_] := For[k = 2, True, k++, If[CompositeQ[k], If[b[k] == Prime[n], Return[k]]]];
Table[a[n], {n, 3, 63}] (* Jean-François Alcover, Feb 23 2018 *)
-
a(n) = { my(p=prime(n)); forcomposite(x=6, , my(f=factor(x)); if(f[, 1]~*f[, 2]==p, return(x))); } \\ Iain Fox, Dec 08 2017
A297925
Even numbers k such that k - 5 is prime but k - 3 is not prime.
Original entry on oeis.org
12, 18, 24, 28, 36, 42, 48, 52, 58, 66, 72, 78, 84, 88, 94, 102, 108, 114, 118, 132, 136, 144, 156, 162, 168, 172, 178, 186, 198, 204, 216, 228, 234, 238, 246, 256, 262, 268, 276, 282, 288, 298, 312, 318, 322, 336, 342, 354, 358, 364, 372, 378, 384, 388, 394, 402, 406, 414, 426, 438, 444, 448, 454
Offset: 1
12 is a term because 12 - 5 = 7 is prime, and 12 - 3 = 9 is composite. Also A049591(1)+5=7+5=12 and A107986(2)+3=9+3=12.
18 is a term because 18 - 5 = 13 is prime, and 18 - 3 = 15 is composite.
16 is not a term because 16 - 5 = 11 and 16 - 3 = 13 are both prime.
-
Filtered([8..500], k-> IsPrime(k-5) and not IsPrime(k-3) and (k mod 2)=0); # G. C. Greubel, May 21 2019
-
[n: n in [3..500] | IsPrime(n-5) and not IsPrime(n-3) and (n mod 2) eq 0]; // G. C. Greubel, May 21 2019
-
N:=100
for n from 8 to N by 2 do
if isprime(n-5) and not isprime(n-3) then print (n);
end if
end do
-
Select[Range[6, 500, 2], And[PrimeQ[# - 5], ! PrimeQ[# - 3]] &] (* Michael De Vlieger, Jan 10 2018 *)
Select[Range[6, 500, 2], Boole[PrimeQ[# -{5, 3}]] == {1, 0} &] (* Harvey P. Dale, Jan 30 2024 *)
-
isok(n) = !(n % 2) && isprime(n-5) && !isprime(n-3); \\ Michel Marcus, Jan 09 2018
-
[n for n in (3..500) if is_prime(n-5) and not is_prime(n-3) and (mod(n, 2)==0)] # G. C. Greubel, May 21 2019
A298366
Even numbers n such that n-5 and n-3 are both composite.
Original entry on oeis.org
30, 38, 54, 60, 68, 80, 90, 96, 98, 120, 122, 124, 126, 128, 138, 146, 148, 150, 158, 164, 174, 180, 188, 190, 192, 206, 208, 210, 212, 218, 220, 222, 224, 240, 248, 250, 252, 258, 264, 270, 278, 290, 292, 294, 300, 302, 304, 306, 308, 324, 326, 328, 330, 332, 338, 344, 346, 348, 360, 366, 368, 374, 380
Offset: 1
30 is included because 30-5 = 25, and 30-3 = 27; both composite, and 30 is the smallest even number with this property, hence a(1)=30. Also, A056240(a(1)) = A056240(30) = 161 = A298615(1). 24 is not included because although 24 - 3 = 21, composite; 24 - 5 = 19, prime. 210 is in this sequence, since 205 and 207 are both composite. 113 is the first prime to have a gap 14 ahead of it. Therefore we would expect a run of (14 - 4)/2 = 5 consecutive terms to start at 7 + A000230(7) = 113 + 7 = 120; thus: 120,122,124,126,128. Likewise the first occurrence of run length 7 occurs at gap m = 2*7 + 4 = 18, namely the term corresponding to 7 + A000230(9) = 523 + 7 = 530; thus: 530,532,534,536,538,540,542.
-
[2*n: n in [8..200] | not IsPrime(2*n-5) and not IsPrime(2*n-3)]; // Vincenzo Librandi, Nov 16 2018
-
N:=300:
for n from 8 to N by 2 do
if not isprime(n-5) and not isprime(n-3) then print(n);
end if
end do
-
Rest[2 Select[Range[250], !PrimeQ[2 # - 5] && !PrimeQ[2 # - 3] &]] (* Vincenzo Librandi, Nov 16 2018 *)
Select[Range[2,400,2],AllTrue[#-{3,5},CompositeQ]&] (* Harvey P. Dale, Jul 01 2025 *)
-
select( is_A298366(n)=!(isprime(n-5)||isprime(n-3)||bitand(n,1)||n<9), [5..200]*2) \\ Last 2 conditions aren't needed if n > 4 and even. - M. F. Hasler, Nov 19 2018 and Apr 07 2020 after edit by Michel Marcus, Apr 04 2020
A298615
Let b(k) be A056240(k); this sequence lists numbers b(2n) such that there is at least one m > n for which b(2m) < b(2n) belongs to A297150.
Original entry on oeis.org
161, 217, 329, 371, 427, 511, 581, 623, 1246, 791, 1417, 1243, 1469, 2071, 917, 973, 1507, 1529, 1057, 1099, 1169, 1211, 1267, 1969, 1991, 1393, 2167, 2189, 2587, 1477, 2954, 2321, 2743, 1631, 1687, 2629, 2651, 1757, 1799, 1841, 1897, 1981, 3091, 3113, 2051, 4102
Offset: 1
n=1, a(1) = A056240(A298366(1)) = A056240(30) = 161;
n=24, a(24) = A056240(A298366(24)) = A056240(190) = 1969.
-
A056240(n, p=n-1, m=oo)=if(n<6 || isprime(n), n, n==6, 8, until(p<3 || (n-p=precprime(p-1))*p >= m=min(m, A056240(n-p)*p), ); m);
is_A298366(n)= !isprime(n-5) && !isprime(n-3) && !(n%2) && (n>5);
lista(nn) = {for (n=0, nn, if (is_A298366(n), print1(A056240(n), ", ")););} \\ Michel Marcus, Apr 03 2020
Showing 1-4 of 4 results.
Comments