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.

A358049 a(1) = 2, a(2) = 3; afterwards a(n) is least new prime > a(n-1) such that a(n-2) + a(n) and a(n-1) + a(n) are semiprimes.

Original entry on oeis.org

2, 3, 7, 19, 67, 127, 151, 271, 463, 823, 883, 991, 1051, 1087, 2011, 2251, 2311, 2371, 2383, 2731, 2803, 2971, 3271, 3391, 3643, 3823, 4111, 4483, 6343, 6379, 6763, 7879, 8443, 9199, 9283, 9643, 10159, 10639, 10867, 10939, 11047, 11299, 11467, 11587, 11971, 12511, 12583, 14071
Offset: 1

Views

Author

Zak Seidov, Oct 27 2022

Keywords

Comments

Aside from the first two terms, all terms are 7 mod 12. - Charles R Greathouse IV, Dec 07 2022

Examples

			2 + 7 = 9 = 3*3 and 3 + 7 = 10 = 2*5 are semiprimes.
		

Crossrefs

Cf. A001358.
Aside from the first two terms, a subsequence of A068229.

Programs

  • Mathematica
    Do[While[MemberQ[s, p] || 2 != PrimeOmega[s[[-2]] + p] || 2 != PrimeOmega[s[[-1]] + p], p = NextPrime[p]]; AppendTo[s, p], {60}]; s
  • PARI
    issp(n) = bigomega(n) == 2; \\ A001358
    lista(nn) = my(va = vector(nn)); va[1] = 2; va[2] = 3; for (n=3, nn, my(p=nextprime(va[n-1]+1)); while (!issp(va[n-2]+p) || !issp(va[n-1]+p), p = nextprime(p+1)); va[n] = p;); va; \\ Michel Marcus, Nov 14 2022