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-5 of 5 results.

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

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 347, 359, 383, 467, 479, 503, 563, 587, 719, 839, 863, 887, 983, 1019, 1187, 1283, 1307, 1319, 1367, 1439, 1487, 1523, 1619, 1823, 1907, 2027, 2039, 2063, 2099, 2207, 2447, 2459, 2579, 2819, 2879
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Comments

Sum of reciprocals ~ 1.477.

Examples

			83 is in the sequence because 83 - 1 = 2*41 has 2 prime factors.
		

Crossrefs

Except for 2 and 3, this is identical to A005385.

Programs

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

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.

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

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 157, 163, 167, 173, 179, 181, 191, 193, 211, 223, 227, 229, 239, 241, 257, 263, 269, 277, 281, 283, 293, 311, 313, 317, 331
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2002

Keywords

Comments

Up to 83, this is the sequence of prime numbers A000040. 89 is not in the sequence because both 89-1 = 88 = 2*2*2*11 and 89+1 = 90 = 2*3*3*5 have 4 prime factors.

Examples

			97 is in the sequence because 97+1 = 98 = 2*7*7 has 3 prime factors.
		

Crossrefs

Union of A079150 and A079151. Cf. A079149, A079153.

Programs

  • Magma
    bg:=func; [2] cat [p: p in PrimesInInterval(3,340)| bg(p-1) le 3 or bg(p+1) le 3]; // Marius A. Burtea, Jan 16 2020
  • Mathematica
    Select[Prime /@ Range[70], PrimeOmega[# - 1] <= 3 || PrimeOmega[# + 1] <= 3 & ] (* Jean-François Alcover, Jul 02 2013 *)
  • 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 either p-1 or 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.

A301590 Primes p such that there are no other solutions to A023900(x) = A023900(p) than a power of p.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 43, 47, 53, 59, 67, 71, 79, 83, 101, 103, 107, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 191, 197, 199, 211, 223, 227, 229, 239, 251, 257, 263, 269, 271, 283, 293, 307, 311, 317, 331, 347, 359, 367, 373, 379, 383, 389
Offset: 1

Views

Author

Michel Marcus, Mar 24 2018

Keywords

Comments

In the definition, A023900(p) = 1-p. One has sign(A023900(n)) = (-1)^A001221(n), so a different solution x can only exist if x has at least 3 distinct prime factors. The smallest number of the form p*q*r such that (p-1)*(q-1)*(r-1) = P-1 for primes p, q, r, P is 2*3*7 = 42, eliminating P = 13 = A301591(1) from this sequence. This is the case whenever (P+1)/2 = p > 3 is a prime (in A005382), whence P-1 = (2-1)*(3-1)*(p-1), which eliminates all P > 5 in A005383 from this sequence. - M. F. Hasler, Aug 14 2021

Examples

			2 is a term because there are no other solutions to A023900(x) = A023900(2) = -1 than other powers of 2.
13 is not a term because A023900(42) = -12 = A023900(13). Similarly, no P > 5 in A005383 is a term because A023900(P) = 1-P = (1-2)*(1-3)*(1-p) = A023900(2*3*p) with p = (P+1)/2. - _M. F. Hasler_, Aug 14 2021
		

Crossrefs

Complement (within the primes) of A301591, which has A005383 \ {3, 5} as a subsequence. Appears to have A079151 \ {13} as subsequence.

Programs

  • PARI
    f(n) = sumdivmult(n, d, d*moebius(d)); /* A023900 */
    isok(p, vp) = {for (k=p+1, p^2-1, if (f(k) == vp, return (0)); ); return (1); }
    lista(nn) = {forprime(p=2, nn, vp = f(p); if (isok(p, vp), print1(p, ", ")); ); }
    
  • PARI
    select( {is_A301590(p)=!forcomposite(k=p+1, p^2-1, A023900(k)!=1-p|| return)&& isprime(p)}, primes([1,399])) \\ M. F. Hasler, Aug 14 2021
Showing 1-5 of 5 results.