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.

Showing 1-4 of 4 results.

A079149 Primes p such that either p-1 or p+1 has at most 2 prime factors, counted with multiplicity; i.e., primes p such that either bigomega(p-1) <= 2 or bigomega(p+1) <= 2, where bigomega(n) = A001222(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 23, 37, 47, 59, 61, 73, 83, 107, 157, 167, 179, 193, 227, 263, 277, 313, 347, 359, 383, 397, 421, 457, 467, 479, 503, 541, 563, 587, 613, 661, 673, 719, 733, 757, 839, 863, 877, 887, 983, 997, 1019, 1093, 1153, 1187, 1201, 1213, 1237
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Comments

There are only 2 primes such that both p-1 and p+1 have at most 2 prime factors - 3 and 5. Proof: If p > 5 then whichever of p-1 and p+1 is divisible by 4 has at least 3 prime factors.
Primes which are not the sum of two consecutive composite numbers. - Juri-Stepan Gerasimov, Nov 15 2009

Crossrefs

Union of A079147 and A079148. Cf. A060254, A079152.

Programs

  • Mathematica
    Select[Prime[Range[500]],MemberQ[PrimeOmega[{#-1,#+1}],2]&] (* Harvey P. Dale, Sep 04 2011 *)
  • PARI
    s(n) = {sr=0; ct=0; forprime(x=2,n, if(bigomega(x-1) < 3 || bigomega(x+1) < 3, print1(x" "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); } \\ Lists primes p<=n such that p+-1 has at most 2 prime factors.

A079151 Primes p such that p-1 has at most 3 prime factors, counted with multiplicity; i.e., primes p such that bigomega(p-1) = A001222(p-1) <= 3.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 23, 29, 31, 43, 47, 53, 59, 67, 71, 79, 83, 103, 107, 131, 139, 149, 167, 173, 179, 191, 223, 227, 239, 263, 269, 283, 293, 311, 317, 347, 359, 367, 383, 389, 419, 431, 439, 443, 467, 479, 499, 503, 509, 557, 563, 587, 599, 607, 619, 643
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Comments

Can it be proved that this is a subsequence of A301590, except for a(5) = 13? (Checked up to A301591(10^4) = 427421.) - M. F. Hasler, Aug 14 2021

Examples

			149 is in the sequence because 149 - 1 = 2*2*37 has 3 prime factors.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := Reap[sr = 0; ct = 0; For[x = 2, x <= n, x = NextPrime[x], If[PrimeOmega[x - 1] < 4, Sow[x]; sr += 1.0/x; ct += 1]]][[2, 1]]; s[700] (* Jean-François Alcover, Jun 08 2013, translated and adapted from Pari *)
    Select[Prime[Range[120]],PrimeOmega[#-1]<4&] (* Harvey P. Dale, Oct 02 2017 *)
  • PARI
    s(n)=sr=0; ct=0; forprime(x=2,n, if(bigomega(x-1) < 4, print1(x" "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); \\ Lists primes p<=n such that p-1 has at most 3 prime factors.
    
  • PARI
    list(lim)=my(v=List([2,3]),t); forprime(p=2,(lim-1)\2, if(isprime(t=2*p+1), listput(v,t))); forprime(p=2,(lim-1)\4, forprime(q=2,min(p,(lim-1)\2\p), if(isprime(t=2*p*q+1), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Mar 06 2017

Extensions

Typos in definition corrected by Harvey P. Dale, Oct 02 2017

A079150 Primes p such that p+1 has at most 3 prime factors, counted with multiplicity; i.e., primes p such that bigomega(p+1) = A001222(p+1) <= 3.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 37, 41, 43, 61, 67, 73, 97, 101, 109, 113, 137, 157, 163, 173, 181, 193, 211, 229, 241, 257, 277, 281, 283, 313, 317, 331, 337, 353, 373, 397, 401, 409, 421, 433, 457, 523, 541, 547, 577, 601, 613, 617, 641, 653, 661, 673, 677
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Examples

			173 is in the sequence because 173+1 = 2*3*29 has 3 prime factors.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200]],PrimeOmega[#+1]<4&] (* Harvey P. Dale, Feb 02 2012 *)
  • PARI
    s(n) = {sr=0; ct=0; forprime(x=2,n, if(bigomega(x+1) < 4, print1(x" "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); } \\ Lists primes p<=n such that p+1 has at most 3 prime factors.

A079153 Primes p such that both p-1 and p+1 have at most 3 prime factors, counted with multiplicity; i.e., primes p such that bigomega(p-1) <= 3 and bigomega(p+1) <= 3, where bigomega(n) = A001222(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 29, 43, 67, 173, 283, 317, 653, 787, 907, 1867, 2083, 2693, 2803, 3413, 3643, 3677, 4253, 4363, 4723, 5443, 5717, 6197, 6547, 6653, 8563, 8573, 9067, 9187, 9403, 9643, 10733, 11443, 11587, 12163, 12917, 13997, 14107, 14683, 15187
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Comments

Sum of reciprocals ~ 1.495. There are 3528 primes of this kind <= 10^7.
From a(7) = 19 onward, this sequence is identical to A063644(n-6). - Robin Saunders, Sep 22 2014

Examples

			907 is in the sequence because both 907-1 = 2*3*151 and 907+1 = 2*2*227 have 3 prime factors.
		

Crossrefs

Intersection of A079150 and A079151. Cf. A079152.

Programs

  • Maple
    filter:= p -> isprime(p) and numtheory:-bigomega(p-1) <= 3 and numtheory:-bigomega(p+1) <= 3:
    select(filter, [2,seq(2*i+1, i=1..10^4)]); # Robert Israel, Nov 11 2014
  • Mathematica
    Select[Prime[Range[2000]],Max[PrimeOmega[#+{1,-1}]]<4&] (* Harvey P. Dale, Oct 07 2015 *)
  • PARI
    s(n) = {sr=0; ct=0; forprime(x=2,n, if(bigomega(x-1) < 4 && bigomega(x+1) < 4, print1(x" "); sr+=1.0/x; ct+=1; ); ); print(); print(ct" "sr); } \\ Lists primes p<=n such that both p-1 and p+1 have at most 3 prime factors.
Showing 1-4 of 4 results.