login
A354965
a(1) = 4, a(2) = 6; a(3) = 9; thereafter a(n) is the smallest new semiprime such that the sum of four successive terms is semiprime.
0
4, 6, 9, 14, 10, 22, 39, 15, 35, 26, 46, 34, 49, 58, 25, 51, 21, 62, 69, 33, 38, 65, 77, 55, 57, 85, 94, 87, 95, 82, 91, 93, 111, 86, 121, 119, 143, 106, 129, 115, 123, 118, 122, 74, 133, 142, 166, 145, 158, 202, 169, 177, 141, 146, 159, 183, 134, 203, 161, 187, 155, 178, 201, 215, 185, 206, 209, 194
OFFSET
1,1
MATHEMATICA
s = {4, 6, 9}; Do[a = s[[-1]] + s[[-2]] + s[[-3]]; n = 10; While[MemberQ[s, n] || 2 != PrimeOmega[n] || 2 != PrimeOmega[a + n], n++]; AppendTo[s, n], {120}]; s
PROG
(PARI) issp(k) = bigomega(k)==2; \\ A001358
lista(nn) = my(va = vector(nn)); va[1]=4; va[2]=6; va[3]=9; my(vs = vecsort(va)); my(s=sum(k=1, 3, va[k])); for (n=4, nn, my(k=1); while (!(issp(k) && issp(k+s) && !vecsearch(vs, k)), k++); va[n]=k; vs = vecsort(va); s += k - va[n-3]; ); va; \\ Michel Marcus, Aug 04 2022
CROSSREFS
Cf. A001358 (semiprimes), A338309.
Sequence in context: A048625 A120134 A241451 * A288379 A112381 A182150
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 13 2022
STATUS
approved