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.

A049282 Primes p such that both p-2 and p+2 are squarefree.

Original entry on oeis.org

3, 5, 13, 17, 19, 31, 37, 41, 53, 59, 67, 71, 89, 103, 107, 109, 113, 131, 139, 157, 163, 179, 181, 193, 197, 199, 211, 229, 233, 239, 251, 257, 269, 271, 283, 293, 307, 311, 337, 347, 379, 383, 397, 401, 409, 419, 431, 433, 449, 463, 467, 487, 491, 499, 503
Offset: 1

Views

Author

Keywords

Examples

			37 is here because neither 37+2 nor 37-2 is divisible by squares.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A049282:=n->`if`(isprime(n) and issqrfree(n-2) and issqrfree(n+2), n, NULL): seq(A049282(n), n=1..10^3); # Wesley Ivan Hurt, Jun 25 2016
  • Mathematica
    lst={}; Do[p=Prime[n]; If[SquareFreeQ[p-2]&&SquareFreeQ[p+2], AppendTo[lst,p]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 20 2008 *)
    Select[Prime[Range[100]],AllTrue[#+{2,-2},SquareFreeQ]&] (* Harvey P. Dale, Apr 18 2025 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (issquarefree(p-2) && issquarefree(p+2), print1(p, ", "))); \\ Michel Marcus, Jun 22 2016

Formula

Intersection of A049231 and A049233.

A318959 Primes p (> 2) such that p - 2 and p - 1 are nonsquarefree.

Original entry on oeis.org

29, 101, 127, 137, 149, 173, 277, 281, 317, 353, 389, 461, 509, 541, 569, 577, 641, 677, 727, 821, 857, 877, 929, 977, 1109, 1129, 1181, 1217, 1277, 1289, 1361, 1423, 1433, 1451, 1613, 1667, 1721, 1777, 1861, 1877, 1901, 1913, 1973, 2081, 2153, 2297, 2333, 2351
Offset: 1

Views

Author

Seiichi Manyama, Sep 06 2018

Keywords

Examples

			21 (= 23 - 2) is squarefree. So 23 is not a term.
27 = 3^3 and 28 = 2^2*7. So 29 is a term.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(3, 2500)| not IsSquarefree(p-2) and not IsSquarefree(p-1)]; // Vincenzo Librandi, Sep 06 2018
  • Mathematica
    Select[Prime[Range[500]], !SquareFreeQ[# - 2] && !SquareFreeQ[# - 1] &] (* Vincenzo Librandi, Sep 06 2018 *)
  • PARI
    forprime(p=2, 1e4, if(!issquarefree(p-1)&&!issquarefree(p-2), print1(p, ", "))); \\ Altug Alkan, Sep 06 2018
    

A319049 Primes p such that none of p - 1, p - 2 and p - 3 are squarefree.

Original entry on oeis.org

101, 127, 353, 727, 1277, 1423, 1451, 1667, 2153, 2351, 2647, 3187, 3251, 3511, 3701, 3719, 3727, 4421, 4951, 5051, 5393, 5527, 6427, 6653, 6959, 7517, 7867, 8527, 9127, 9551, 9803, 9851, 10243, 10253, 10487, 10831, 11273, 11351, 11777, 11827, 12007, 12251, 12277
Offset: 1

Views

Author

Seiichi Manyama, Sep 08 2018

Keywords

Comments

If p is a term, so that there are primes q,r,s such that q^2|p-3, r^2|p-2 and s^2|p-1, then the sequence includes all primes == p (mod q^2*r^2*s^2). In particular, the sequence is infinite, and a(n)/(n*log(n)) is bounded above and below by constants. - Robert Israel, Sep 09 2018

Examples

			98 = 2*7^2, 99 = 3^2*11 and 100 = 2^2*5^2. So 101 is a term.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(13000) | not IsSquarefree(p-1) and not IsSquarefree(p-2) and not IsSquarefree(p-3)]; // Vincenzo Librandi, Sep 17 2018
  • Maple
    Res:= NULL: count:= 0:
    p:= 1;
    while count < 100 do
      p:= nextprime(p);
      if not ormap(numtheory:-issqrfree, [p-1,p-2,p-3]) then
        count:= count+1; Res:= Res, p
      fi
    od:
    Res; # Robert Israel, Sep 09 2018
  • Mathematica
    Select[Prime[Range[2000]], !SquareFreeQ[# - 1] && !SquareFreeQ[# - 2] && !SquareFreeQ[# - 3]&] (* Jean-François Alcover, Sep 17 2018 *)
    Select[Prime[Range[1500]],NoneTrue[#-{1,2,3},SquareFreeQ]&] (* Harvey P. Dale, Apr 11 2022 *)
  • PARI
    isok(p) = isprime(p) && !issquarefree(p-1) && !issquarefree(p-2) && !issquarefree(p-3); \\ Michel Marcus, Sep 09 2018
    

A049229 Primes p such that p-2 is not squarefree.

Original entry on oeis.org

11, 29, 47, 83, 101, 127, 137, 149, 173, 191, 227, 263, 277, 281, 317, 353, 389, 443, 461, 479, 509, 541, 569, 577, 587, 607, 641, 659, 677, 727, 821, 827, 839, 857, 877, 911, 929, 947, 977, 983, 1019, 1031, 1091, 1109, 1129, 1163, 1181, 1217, 1277, 1289
Offset: 1

Views

Author

Keywords

Comments

This sequence is infinite and its relative density in the sequence of the primes is equal to 1 - 2 * Product_{p prime} (1-1/(p*(p-1))) = 1 - 2 * A005596 = 0.252088... - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2,300]],!SquareFreeQ[#-2]&] (* Harvey P. Dale, Nov 14 2012 *)
  • PARI
    isok(p) = (p>2) && isprime(p) && !issquarefree(p-2); \\ Michel Marcus, May 14 2018
Showing 1-4 of 4 results.