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-10 of 13 results. Next

A053182 Primes p such that p^2 + p + 1 is prime.

Original entry on oeis.org

2, 3, 5, 17, 41, 59, 71, 89, 101, 131, 167, 173, 293, 383, 677, 701, 743, 761, 773, 827, 839, 857, 911, 1091, 1097, 1163, 1181, 1193, 1217, 1373, 1427, 1487, 1559, 1583, 1709, 1811, 1847, 1931, 1973, 2129, 2273, 2309, 2339, 2411, 2663, 2729, 2789, 2957
Offset: 1

Views

Author

Enoch Haga, Mar 01 2000

Keywords

Comments

Roger Horn computed the first 776 terms of this sequence around 1961 to test (with Paul Bateman) their conjecture on the density of simultaneous primes in polynomials. - Charles R Greathouse IV, Apr 05 2011
Starting with a(3)=5 all terms are of the form 6k-1, k in A147683. - Zak Seidov, Nov 10 2008
Primes p such that the sum of divisors of p^2 (sigma(p^2) = A000203(p^2) = p^2+p+1) is prime. - Claudio Meller, Apr 07 2011
The generated prime numbers p^2 + p + 1 are exactly A053183. - Bernard Schott, Dec 20 2012
Positive squarefree k such that the sum of divisors of k^2 is prime. - Peter Munn, Feb 02 2018

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | IsPrime(p^2+p+1)]; // Vincenzo Librandi, Aug 06 2010
  • Mathematica
    Select[Prime[Range[427]], PrimeQ[#^2+#+1]&] (* Bruno Berselli, Nov 08 2011 *)
  • PARI
    isA053182(n)=isprime(n) && isprime(n^2+n+1)  \\ Michael B. Porter, Apr 23 2010
    
  • PARI
    c=0; forprime(p=1,default(primelimit), isprime(p^2+p+1) & write("/tmp/b053182.txt",c++," "p))  \\ M. F. Hasler, Apr 07 2011
    

Extensions

List changed to cross-reference by Franklin T. Adams-Watters, May 12 2010

A053184 Primes p such that p^2+p-1 is prime.

Original entry on oeis.org

2, 3, 5, 11, 13, 19, 31, 41, 53, 59, 83, 89, 101, 103, 131, 149, 163, 181, 191, 193, 199, 233, 241, 263, 281, 331, 349, 373, 401, 419, 431, 433, 449, 461, 463, 499, 541, 569, 571, 659, 673, 683, 691, 709, 739, 743, 761, 769, 809, 863, 881, 941, 1013, 1039
Offset: 1

Views

Author

Enoch Haga, Mar 01 2000

Keywords

Crossrefs

Programs

A091567 Primes p such that p^2-p-1 is prime.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 31, 47, 61, 67, 71, 97, 101, 127, 131, 139, 149, 181, 197, 241, 269, 307, 331, 359, 379, 397, 409, 419, 421, 449, 457, 479, 487, 491, 599, 607, 617, 619, 641, 647, 677, 709, 751, 787, 839, 857, 907, 947, 967, 977, 997, 1051, 1061, 1091
Offset: 1

Views

Author

T. D. Noe, Jan 21 2004

Keywords

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta,UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

Cf. A053182 (p^2+p+1 prime), A053184 (p^2+p-1 prime), A065508 (p^2-p+1 prime).
Cf. A091568 (corresponding primes of the form p^2-p-1).

Programs

A127724 k-imperfect numbers for some k >= 1.

Original entry on oeis.org

1, 2, 6, 12, 40, 120, 126, 252, 880, 2520, 2640, 10880, 30240, 32640, 37800, 37926, 55440, 75852, 685440, 758520, 831600, 2600640, 5533920, 6917400, 9102240, 10281600, 11377800, 16687440, 152182800, 206317440, 250311600, 475917120, 715816960, 866829600
Offset: 1

Views

Author

T. D. Noe, Jan 25 2007

Keywords

Comments

For prime powers p^e, define a multiplicative function rho(p^e) = p^e - p^(e-1) + p^(e-2) - ... + (-1)^e. A number n is called k-imperfect if there is an integer k such that n = k*rho(n). Sequence A061020 gives a signed version of the rho function. As with multiperfect numbers (A007691), 2-imperfect numbers are also called imperfect numbers. As shown by Iannucci, when rho(n) is prime, there is sometimes a technique for generating larger imperfect numbers.
Zhou and Zhu find 5 more terms, which are in the b-file. - T. D. Noe, Mar 31 2009
Does this sequence follow Benford's law? - David A. Corneth, Oct 30 2017
If a term t has a prime factor p from A065508 with exponent 1 and does not have the corresponding prime factor q from A074268, then t*p*q is also a term. - Michel Marcus, Nov 22 2017
For n >= 1, the least n-imperfect numbers are 1, 2, 6, 993803899780063855042560. - Michel Marcus, Feb 13 2018
For any m > 0, if n*p^(2m-1) is k-imperfect, q = rho(p^(2m)) is prime and gcd(pq,n) = 1, then n*p^(2m)*q is also k-imperfect. - M. F. Hasler, Feb 13 2020

Examples

			126 = 2*3^2*7, rho(126) = (2-1)*(9-3+1)*(7-1) = 42.  3*42 = 126, so 126 is 3-imperfect. - _Jud McCranie_ Sep 07 2019
		

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Springer, 1994, B1.

Crossrefs

Cf. A127725 (2-imperfect numbers), A127726 (3-imperfect numbers), A127727 (related primes), A309806 (the k values).
Cf. A061020 (signed version of rho function), A206369 (the rho function).

Programs

  • Mathematica
    f[p_,e_]:=Sum[(-1)^(e-k) p^k, {k,0,e}]; rho[n_]:=Times@@(f@@@FactorInteger[n]); Select[Range[10^6], Mod[ #,rho[ # ]]==0&]
  • PARI
    isok(n) = denominator(n/sumdiv(n, d, d*(-1)^bigomega(n/d))) == 1; \\ Michel Marcus, Oct 28 2017
    
  • PARI
    upto(ulim) = {res = List([1]); rhomap = Map(); forprime(p = 2, 3, for(i = 1, logint(ulim, p), mapput(rhomap, p^i, rho(p^i)); iterate(p^i, mapget(rhomap, p^i), ulim))); listsort(res, 1); res}
    iterate(m, rhoo, ulim) = {my(c); if(m / rhoo == m \ rhoo, listput(res, m); my(frho = factor(rhoo)); for(i = 1, #frho~, if(m%frho[i, 1] != 0, for(e = 1, logint(ulim \ m, frho[i, 1]), if(mapisdefined(rhomap, frho[i, 1]^e) == 0, mapput(rhomap, frho[i, 1]^e, rho(frho[i, 1]^e))); iterate(m * frho[i, 1]^e, rhoo * mapget(rhomap, frho[i, 1]^e), ulim)); next(2))))}
    rho(n) = {my(f = factor(n), res = q = 1); for(i=1, #f~, q = 1; for(j = 1, f[i, 2], q = -q + f[i, 1]^j); res * =q); res} \\ David A. Corneth, Nov 02 2017
    
  • PARI
    A127724_vec=concat(1, select( {is_A127724(n)=!(n%A206369(n))}, [1..10^5]*2))
      /* It is known that the least odd term > 1 is > 10^49. This code defines an efficient function is_A127724, but A127724_vec is better computed with upto(.) */
      A127724(n)=A127724_vec[n] \\ Used in other sequences. - M. F. Hasler, Feb 13 2020

Extensions

Small correction in name from Michel Marcus, Feb 13 2018

A066071 Nonprime numbers k such that phi(k) + 1 is prime.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 14, 18, 21, 22, 26, 27, 28, 32, 34, 36, 38, 40, 42, 46, 48, 49, 54, 55, 57, 58, 60, 62, 63, 74, 75, 76, 77, 82, 86, 88, 91, 93, 94, 95, 98, 99, 100, 106, 108, 110, 111, 114, 115, 117, 118, 119, 122, 124, 125, 126, 132, 133, 134, 135, 142, 145, 146
Offset: 1

Views

Author

Labos Elemer, Dec 03 2001

Keywords

Comments

A039698 with the primes removed. For every prime p, 2p is in the sequence. - Ray Chandler, May 26 2008
Includes 3*p for p in A005382 and p^2 for p in A065508. - Robert Israel, Dec 29 2017

Examples

			Solutions to 1+phi(x)=13 are {13, 21, 26, 28, 36, 42} of which the 5 composites are in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] |not IsPrime(n) and IsPrime(EulerPhi(n)+1)]; // Vincenzo Librandi, Jul 02 2016
  • Maple
    select(n -> not isprime(n) and isprime(1+numtheory:-phi(n)), [$1..1000]); # Robert Israel, Dec 29 2017
  • Mathematica
    Select[Complement[Range@ #, Prime@ Range@ PrimePi@ #] &@ 150, PrimeQ[EulerPhi@ # + 1] &] (* Michael De Vlieger, Jul 01 2016 *)
  • PARI
    isok(k) = { !isprime(k) && isprime(eulerphi(k) + 1) } \\ Harry J. Smith, Nov 10 2009
    

A074268 Primes of the form p^2 - p + 1 where p is prime.

Original entry on oeis.org

3, 7, 43, 157, 4423, 6163, 19183, 22651, 26407, 37057, 113233, 121453, 143263, 208393, 292141, 375157, 412807, 527803, 590593, 843643, 981091, 1041421, 1193557, 1246573, 1441201, 1514131, 1905781, 2023507, 2397853, 2453923, 2548813, 2626021, 2864557
Offset: 1

Views

Author

Enoch Haga, Jan 16 2004

Keywords

Comments

Note that p^2 - p + 1 = p * phi(p) + 1 when p is prime.

Crossrefs

Cf. A065508 (values of p).

Programs

  • Mathematica
    Select[Table[p = Prime[n]; p*EulerPhi[p] + 1, {n, 270}], PrimeQ] (* Arkadiusz Wesolowski, Dec 13 2011 *)
    Select[Table[p^2-p+1,{p,Prime[Range[300]]}],PrimeQ] (* Harvey P. Dale, Sep 22 2015 *)

A190275 Semiprimes of the form p*(p^2 - p + 1).

Original entry on oeis.org

6, 21, 301, 2041, 296341, 486877, 2666437, 3420301, 4304341, 7152001, 38159521, 42387097, 54296677, 95235601, 158048281, 229971241, 265434901, 383712781, 454166017, 775307917, 972261181, 1063290841, 1304557801, 1392422041, 1730882401, 1863895261, 2631883561, 2879450461, 3714274297, 3845297341, 4070454361, 4256780041, 4849695001, 5328809461, 5722533337, 5838483601, 7218898681, 7841065621
Offset: 1

Views

Author

Giorgio Balzarotti, May 07 2011

Keywords

Comments

This sequence is infinite, assuming Schinzel's Hypothesis H.
Related to Rassias Conjecture ("for any odd prime p there are primes q < r such that p*q = q + r + 1") setting p = q. Generalization can be achieved by removing semiprimality condition and accepting p^e, e >= 2.
These are semiprimes m = p*q such that 1/p + 1/q - 1/m = p/q. Cf. A326690. - Amiram Eldar and Thomas Ordowski, Jul 22 2019

Examples

			a(1) = 6 = 2*3 = 2*(2^2-2+1).
a(2) = 21 = 3*7 = 3*(3^2-3+1).
a(3) = 301 = 7*43 = 7*(7^2-7+1).
		

Crossrefs

Cf. A065508 (primes p such that p^2-p+1 is prime).
Cf. A001358 (semiprime), A003415 (arithmetic derivative), A164643, A190272 (n'=a-1), A190273 (n'=a+1), A190274 (n'=p^2-1).

Programs

  • Maple
    seq(`if`(isprime((ithprime(i)^2-ithprime(i)+1))=true,(ithprime(i)^2-ithprime(i)+1)*ithprime(i),NULL),i=1..300);
  • Mathematica
    p = Select[Prime@ Range@ 500, PrimeQ[#^2 - # + 1] &]; p (p^2 - p + 1) (* Giovanni Resta, Jul 22 2019 *)
  • PARI
    forprime(p=2,1e4,if(isprime(k=p^2-p+1),print1(p*k", "))) \\ Charles R Greathouse IV, May 08 2011

A259145 Numbers k such that k^2 - phi(k) is prime, where phi() is A000010.

Original entry on oeis.org

2, 3, 7, 13, 33, 35, 65, 67, 77, 79, 91, 133, 139, 151, 163, 193, 221, 247, 249, 287, 299, 321, 337, 341, 349, 377, 379, 437, 457, 481, 533, 541, 551, 561, 581, 591, 595, 611, 613, 643, 721, 727, 763, 769, 779, 789, 803, 817, 843, 851, 869, 917, 919, 991
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(n) is a cyclic number (see A003277) for all n.
A065508 is the subsequence of prime terms. - Michel Marcus, Jun 19 2015

Examples

			a(1) = 2, since phi(2) = 1, thus 2^2 - 1 = 3 (prime).
a(3) = 7, since phi(7) = 6, thus 7^2 - 6 = 43 (prime).
a(5) = 33, since phi(33) = 20, thus 33^2 - 20 = 1069 (prime).
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | IsPrime(n^2 - EulerPhi(n))]; // Vincenzo Librandi, Jun 21 2015
    
  • Mathematica
    Select[Range[2000], PrimeQ[#^2 - EulerPhi[#]] &]
  • PARI
    main(size)={ v=vector(size); i=0; m=1; while(iAnders Hellström, Jul 08 2015 */

A136240 Numbers n among A006093 such that n^2 + n + 1 is prime.

Original entry on oeis.org

1, 2, 6, 12, 66, 78, 138, 150, 162, 192, 336, 348, 378, 456, 540, 612, 642, 726, 768, 918, 990, 1020, 1092, 1116, 1200, 1230, 1380, 1422, 1548, 1566, 1596, 1620, 1692, 1746, 1788, 1800, 1932, 1986, 2010, 2016, 2112, 2136, 2142, 2238, 2280, 2556, 2646
Offset: 1

Views

Author

Lekraj Beedassy, Dec 23 2007

Keywords

Comments

See A074268 for the primes associated with a(n).

Crossrefs

Cf. A136241.

Programs

  • Mathematica
    Select[Prime[Range[400]]-1,PrimeQ[#^2+#+1]&] (* Harvey P. Dale, Feb 11 2022 *)
  • PARI
    isA136240(n) = {isprime(n+1) && isprime(n^2+n+1)} \\ Michel Marcus, Jul 28 2013

Formula

a(n) = A065508(n) - 1.

A259504 Numbers n such that n and n+1 are the product of exactly three (not necessarily distinct) primes.

Original entry on oeis.org

27, 44, 75, 98, 116, 124, 147, 153, 164, 170, 171, 174, 230, 244, 245, 284, 285, 332, 356, 369, 387, 425, 428, 429, 434, 435, 474, 506, 507, 530, 548, 555, 574, 595, 602, 603, 604, 605, 609, 627, 637, 638, 645, 651, 657, 710
Offset: 1

Views

Author

Zak Seidov, Nov 08 2015

Keywords

Comments

Conjecture: this sequence is infinite.
Number of terms < 10^k: 0, 4, 63, 727, 7014, 64556, 585725, 5284711, ... . - Robert G. Wilson v, Nov 09 2015
a(n) = p^3 where p is prime iff p is in intersection of A065508 and A005383. - Altug Alkan, Nov 24 2015
There are 47753279 terms less than 10^9 and 432841730 terms less than 10^10. - Charles R Greathouse IV, Jun 27 2019

Examples

			27=3*3*3, 28=2*2*7.
		

Crossrefs

Intersection of A014612 and A045920.
Cf. A067813.

Programs

  • Mathematica
    Select[Range[1000], 3 == PrimeOmega[#] == PrimeOmega[# + 1] &]
  • PARI
    forcomposite(n=1, 1e3, if(bigomega(n)==3 && bigomega(n+1)==3, print1(n, ", "))); \\ Altug Alkan, Nov 08 2015
    
  • PARI
    list(lim)=my(v=List(),was=1,is); forfactored(n=28,lim\1+1, is=vecsum(n[2][,2])==3; if(is && was, listput(v,n[1]-1)); was=is); Vec(v) \\ Charles R Greathouse IV, Jun 26 2019
Showing 1-10 of 13 results. Next