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.

A112998 Numbers n such that n, n+1 and n+2 are 1,2,3-almost primes.

Original entry on oeis.org

61, 73, 193, 277, 397, 421, 613, 661, 757, 1093, 1237, 1453, 1657, 2137, 2341, 2593, 2797, 2917, 3217, 4177, 4621, 5233, 6121, 6133, 6217, 7057, 7537, 8101, 8317, 8353, 8521, 8677, 8893, 9013, 9277, 9721, 9817, 10357, 10957, 11161, 11677, 11701, 12301
Offset: 1

Views

Author

Zak Seidov, Jan 03 2006

Keywords

Comments

It's easy to see that all terms = 1 modulo 12. Primes p are {1,5,7,11} mod 12. Then p+1 = {2,6,8,12} mod 12 and only 2 mod 12 may give semiprime. Cf. A186696 for values of (a(n)-1)/12 = 5,6,16,23,33,35, etc.

Examples

			61 is prime, 62=2*31 is semiprime, 63=3*3*7 is 3-almost prime.
		

Programs

  • Mathematica
    Do[p=Prime[n];If[Total[FactorInteger[p+1]][[2]]==2&&Total[FactorInteger[p+2]][[2]]==3, Print[p]], {n, 1, 1000}];
  • PARI
    list(lim)=my(v=List(),L=(lim+2)\3,t); forprime(p=3,L\3, forprime(q=3,min(L\p,p), t=3*p*q-2; if(t%12==1 && isprime(t) && isprime((t+1)/2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 01 2017

Extensions

Extended and edited by Charles R Greathouse IV, Apr 20 2010