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.

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.

A049231 Primes p such that p - 2 is squarefree.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 31, 37, 41, 43, 53, 59, 61, 67, 71, 73, 79, 89, 97, 103, 107, 109, 113, 131, 139, 151, 157, 163, 167, 179, 181, 193, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 269, 271, 283, 293, 307, 311, 313, 331, 337, 347, 349, 359, 367, 373
Offset: 1

Views

Author

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100]],SquareFreeQ[#-2]&] (* Harvey P. Dale, Mar 03 2018 *)
  • PARI
    isok(p) = isprime(p) && issquarefree(p-2); \\ Michel Marcus, Dec 31 2013

Formula

Primes p such that abs(mu(p-2)) = 1.

Extensions

Definition corrected by Michel Marcus, Dec 31 2013

A049232 Primes p such that p+2 is divisible by a square.

Original entry on oeis.org

2, 7, 23, 43, 47, 61, 73, 79, 97, 151, 167, 173, 223, 241, 277, 313, 331, 349, 359, 367, 373, 421, 439, 457, 523, 547, 601, 619, 673, 691, 709, 727, 733, 773, 823, 839, 853, 907, 929, 997, 1033, 1051, 1069, 1087, 1123, 1181, 1213, 1223, 1231, 1249, 1303
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

Examples

			47 is a term since 47+2 = 49 = 7^2 is a square.
523 is a term since 523+2 = 525 = 5^2*21 is divisible by a square.
		

Crossrefs

A091880 gives prime indices.

Programs

  • Mathematica
    Select[Prime[Range[100]], ! SquareFreeQ[ # + 2] &] (* Zak Seidov, Oct 28 2008 *)
  • PARI
    powerfreep3(n,p,k) = { c=0; pc=0; forprime(x=2,n, pc++; if(ispowerfree(x+k,p)==0, c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }
    ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) }

Formula

Primes p such that mu(p+2) = 0.

Extensions

Corrected by Cino Hilliard and Ray Chandler, Dec 08 2003
Edited by N. J. A. Sloane, Oct 27 2008 at the suggestion of R. J. Mathar

A268612 Primes p such that p + 2 k, for k = 1..7 are squarefree.

Original entry on oeis.org

29, 83, 101, 191, 227, 389, 443, 479, 587, 641, 659, 677, 983, 1091, 1109, 1289, 1307, 1451, 1487, 2027, 2081, 2153, 2243, 2333, 2351, 2441, 2459, 2477, 2549, 2657, 2729, 2837, 2909, 2927, 2999, 3089, 3251, 3359, 3449, 3557, 3593, 4007
Offset: 1

Views

Author

Zak Seidov, Feb 08 2016

Keywords

Comments

Eight consecutive odd numbers starting with p are squarefree.
This is the longest set as p+16 in all cases is divisible by 9.
All terms are congruent to 11 mod 18.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(4500) | forall{k: k in [1..7] | IsSquarefree(p+2*k)}]; // Vincenzo Librandi, Feb 09 2016
  • Mathematica
    Select[Prime[Range[600]],AllTrue[#+2*Range[7],SquareFreeQ]&] (* Harvey P. Dale, Oct 19 2022 *)

A268614 Primes p such that p + 1 and p + 2 are squarefree.

Original entry on oeis.org

5, 13, 29, 37, 41, 101, 109, 113, 137, 157, 181, 193, 229, 257, 281, 317, 353, 389, 397, 401, 409, 433, 461, 509, 541, 569, 613, 617, 641, 653, 661, 677, 757, 761, 769, 797, 821, 829, 857, 877, 937, 941, 977, 1009, 1021, 1093, 1109, 1117, 1129, 1153, 1193
Offset: 1

Views

Author

Zak Seidov, Feb 08 2016

Keywords

Comments

All terms are == 1 mod 4, hence in all cases p+3 is divisible by 4 (and is not squarefree).

Crossrefs

Intersection of A049097 and A049233.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsSquarefree(p+1) and IsSquarefree(p+2)]; // Vincenzo Librandi, Feb 09 2016
    
  • Mathematica
    Select[Prime[Range[1000]], SquareFreeQ[# + 1] && SquareFreeQ[# + 2] &]
  • PARI
    isok(p) = isprime(p) && issquarefree(p+1) && issquarefree(p+2); \\ Michel Marcus, Apr 01 2021
Showing 1-5 of 5 results.