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.

Previous Showing 11-13 of 13 results.

A243544 Primes p such that p^2 - p + 1 is semiprime.

Original entry on oeis.org

5, 11, 29, 37, 41, 43, 53, 61, 71, 73, 83, 97, 109, 113, 127, 137, 149, 157, 167, 181, 191, 211, 223, 229, 241, 271, 277, 281, 307, 317, 331, 359, 389, 421, 433, 443, 461, 463, 487, 499, 547, 557, 571, 587, 601, 617, 631, 659, 661, 683, 691, 701, 709, 733, 757
Offset: 1

Views

Author

K. D. Bajpai, Jun 06 2014

Keywords

Comments

Intersection of A000040 and A180748.

Examples

			11 is in the sequence because 11 is prime and 11^2 - 11 + 1 = 111 = 3 * 37 is semiprime.
29 is in the sequence because 29 is prime and 29^2 - 29 + 1 = 813 = 3 * 271 is semiprime.
17 is not in the sequence though 17 is prime, because 17^2 - 17 + 1 = 273 = 3 * 7 * 13, has more than two prime factors.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A243544 := proc() local a; a:=ithprime(n);  if bigomega(a^2-a+1)=2 then RETURN (a); fi; end: seq(A243544 (), n=1..200);
  • Mathematica
    c = 0; Do[k = Prime[n]; If[PrimeOmega[k^2 - k + 1] == 2, c++; Print[c, " ", k]], {n, 1, 30000}];
    Select[Prime[Range[150]],PrimeOmega[#^2-#+1]==2&] (* Harvey P. Dale, Oct 22 2024 *)
  • PARI
    s=[]; forprime(p=2, 800, if(bigomega(p^2-p+1)==2, s=concat(s, p))); s \\ Colin Barker, Jun 06 2014

A290767 Primes p such that p^2 +/- p +/- 1 are all nonprimes.

Original entry on oeis.org

23, 37, 43, 73, 107, 109, 113, 137, 157, 179, 211, 223, 227, 229, 239, 251, 257, 271, 277, 283, 311, 313, 317, 347, 353, 367, 389, 439, 443, 467, 503, 509, 521, 523, 547, 557, 563, 577, 587, 593, 601, 631, 653, 661, 719, 733, 757, 797, 811, 821, 823, 829, 853, 859, 877, 883
Offset: 1

Views

Author

Ralf Steiner, Aug 10 2017

Keywords

Crossrefs

Programs

  • Maple
    select(p -> isprime(p) and not ormap(isprime, [p^2+p+1,p^2+p-1,p^2-p+1,p^2-p-1]), [2,seq(i,i=3..1000,2)]); # Robert Israel, Aug 10 2017
  • Mathematica
    Select[Prime[Range[1000]], ! (PrimeQ[#^2 + # + 1] || PrimeQ[#^2 + # - 1] ||PrimeQ[#^2 - # + 1] || PrimeQ[#^2 - # - 1]) &]
    Select[Prime[Range[200]],NoneTrue[{#^2+#+1,#^2+#-1,#^2-#+1,#^2-#-1},PrimeQ]&] (* Harvey P. Dale, Oct 13 2024 *)
  • PARI
    is(n) = my(v=[n^2+n+1, n^2+n-1, n^2-n+1, n^2-n-1]); for(k=1, #v, if(ispseudoprime(v[k]), return(0))); 1
    forprime(p=1, 900, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Aug 10 2017

Formula

Intersection of the complements of A053184, A053182, A065508, and A091567 within the primes A000040.

A297868 Prime powers p^e with odd exponent e such that rho(p^(e+1)) is prime, where rho is A206369.

Original entry on oeis.org

8, 27, 32, 125, 243, 512, 1331, 2048, 32768, 50653, 79507, 103823, 131072, 161051, 177147, 357911, 1419857, 2097152, 2248091, 3869893, 11089567, 15813251, 16974593, 20511149, 28934443, 69343957, 115501303, 147008443, 263374721, 536870912, 844596301, 1284365503, 1305751357
Offset: 1

Views

Author

Michel Marcus, Jan 07 2018

Keywords

Comments

Along with A065508, these are the integers mentioned at the bottom of page 4 of the Iannucci link. Let x = p^e, and q = rho(p^(e+1)), then x/rho(x) = (x*p*q)/rho(x*p*q). An example with A065508 is 3, for which rho(3) is 7, so 3 and 3*3*7 have the same x/rho(x) ratio, 3/2.
Note that there are other "rho-friendly pairs" that have a different, yet simple, form like for instance 7^5 and 7^8*117307.
Number of terms < 10^k: 1, 3, 6, 8, 11, 16, 20, 26, 31, 46, 73, 110, 198, 327, 611, 1157, 2135, 4107, 7724, 14771, 28610, etc. - Robert G. Wilson v, Jan 07 2018

Examples

			8=2^3 is a term because rho(2*8)=11 is prime, so 8 and 8*2*11 have the same x/rho(x) ratio, 8/5.
		

Crossrefs

Programs

  • Mathematica
    rho[n_] := n*DivisorSum[n, LiouvilleLambda[#]/# &]; fQ[n_] := Block[{p = FactorInteger[n][[1, 1]]}, PrimeQ[ rho[p n]]]; mx = 10^9; lst = Sort@ Flatten@ Table[ Prime[n]^e, {n, PrimePi[mx^(1/3)]}, {e, 3, Floor@ Log[ Prime@ n, mx], 2}]; Select[lst, fQ] (* Robert G. Wilson v, Jan 07 2018 *)
  • PARI
    rhope(p, e) = my(s=1); for(i=1, e, s=s*p + (-1)^i); s;
    lista(nn) = {for (n=1, nn, if ((e = isprimepower(n,&p)) && (e > 1) && (e % 2) && isprime(rhope(p,e+1)), print1(n, ", ");););}
Previous Showing 11-13 of 13 results.