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.

A257115 Smallest k such that none of k + 1, k + 3,... k + 2n - 1 are squarefree and all of k + 2, k + 4,... k + 2n are squarefree.

Original entry on oeis.org

1, 3, 15, 15, 49, 483, 5049, 6347, 144945
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Apr 25 2015

Keywords

Comments

For any x, one of x+2, x+4, ..., x+18 is divisible by 9 and thus not squarefree, so a(n) does not exist for n >= 9. - Robert Israel, Apr 27 2015

Examples

			a(0) = 1 because 1 + 0 = 1 is squarefree.
a(1) = 3 because 3 + 1 = 4 is not squarefree and 3 + 2 = 5 is squarefree.
		

Crossrefs

Programs

  • PARI
    a(n)=k=1;while(k,c=0;for(i=1,n,if(!issquarefree(k+2*i-1)&&issquarefree(k+2*i),c++);if(issquarefree(k+2*i-1)||!issquarefree(k+2*i),c=0;break));if(c==n,return(k));k++)
    vector(9,n,n--;a(n)) \\ Derek Orr, Apr 27 2015

Extensions

Corrected and extended by Derek Orr, Apr 27 2015

A257545 a(0) = 2, a(n) = smallest prime p such that none of p - 1, p - 2,... p - n are squarefree.

Original entry on oeis.org

2, 5, 29, 101, 5051, 5051, 73453, 671353, 130179187, 211014929, 262315477, 3639720053
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Apr 29 2015

Keywords

Examples

			a(3) = 101 because 101 is prime and none of 101 - 1 = 100, 101 - 2 = 99, and 101 - 3 = 98 are squarefree.
		

Crossrefs

Cf. A257108.

Programs

  • Maple
    p:= 2:
    A[0]:= 2:
    m:= 0:
    while p < 10^6 do
    p:= nextprime(p);
    for k from 1 while not numtheory:-issqrfree(p-k) do od:
    if k > m+1 then
       for j from m+1 to k-1 do A[j]:= p od:
       m:= k-1;
    fi
    od:
    seq(A[i],i=0..m); # Robert Israel, Apr 29 2015
  • PARI
    a(n)=forprime(p=2,,for(k=1,n,if(issquarefree(p-k), next(2))); return(p)) \\ Charles R Greathouse IV, Apr 29 2015

Formula

a(n) << A002110(n)^10 by the CRT and Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Apr 29 2015

Extensions

a(9)-a(11) from Charles R Greathouse IV, Apr 29 2015

A319050 Primes p such that neither p + 1 nor p + 2 is squarefree.

Original entry on oeis.org

7, 23, 43, 47, 79, 97, 151, 167, 223, 241, 331, 349, 359, 367, 439, 523, 547, 619, 691, 727, 773, 823, 839, 907, 1051, 1087, 1123, 1223, 1231, 1249, 1303, 1367, 1423, 1447, 1483, 1523, 1571, 1627, 1663, 1699, 1723, 1811, 1823, 1847, 1861, 1879, 1951, 1987, 2131, 2203, 2207
Offset: 1

Views

Author

Seiichi Manyama, Sep 08 2018

Keywords

Examples

			8 = 2^3 and 9 = 3^2. So 7 is a term.
24 = 2^3*3 and 25 = 5^2. So 23 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[400]],NoneTrue[#+{1,2},SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 05 2019 *)
  • PARI
    isok(p) = isprime(p) && !issquarefree(p+1) && !issquarefree(p+2); \\ Michel Marcus, Sep 09 2018

A319051 Primes p such that none of p + 1, p + 2 and p + 3 are squarefree.

Original entry on oeis.org

47, 97, 241, 349, 547, 773, 1249, 1447, 1663, 1847, 1861, 2347, 2887, 3049, 3547, 3607, 3623, 3697, 4111, 4373, 4597, 5237, 5273, 5749, 6173, 6857, 7549, 8467, 8647, 8719, 9161, 9349, 9547, 9749, 11149, 11321, 11447, 12049, 12473, 12689, 12823, 12941, 13147, 13291
Offset: 1

Views

Author

Seiichi Manyama, Sep 08 2018

Keywords

Examples

			48 = 2^4*3, 49 = 7^2 and 50 = 2*5^2. So 47 is a term.
98 = 2*7^2, 99 = 3^2*11 and 100 = 2^2*5^2. So 97 is a term.
		

Crossrefs

Programs

  • PARI
    forprime(p=2, 1e5, if(!issquarefree(p+1) && !issquarefree(p+2) && !issquarefree(p+3), print1(p", ")))

A257116 Smallest prime p such that none of p + 1, p + 3,... p + 2n - 1 are squarefree and all of p + 2, p + 4,... p + 2n are squarefree.

Original entry on oeis.org

3, 17, 487, 947, 947, 38639, 38639
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 25 2015

Keywords

Comments

a(8) and higher do not exist because at least one of p+2, p+4, ..., p+16 is divisible by 9 unless p is divisible by 9, in which case it is not prime. - Charles R Greathouse IV, Apr 27 2015

Examples

			a(1) = 3 because 3 + 1 = 4 is not squarefree, 3 + 2 = 5 is squarefree, 3 is prime.
		

Crossrefs

Programs

  • Maple
    p:= 0:
    for i from 1 to 5000 do
      p:= nextprime(p);
      for n from 1 while numtheory:-issqrfree(p+2*n)
           and not numtheory:-issqrfree(p+2*n-1) do
            if not assigned(A[n]) then A[n]:= p
              fi
        od:
    od:
    seq(A[i],i=1..7); # Robert Israel, Apr 27 2015
  • Mathematica
    a[n_] := For[k=1, True, k++, p = Prime[k]; r = p + Range[1, 2*n-1, 2]; If[(And @@ ((!SquareFreeQ[#])& /@ r)) && And @@ (SquareFreeQ /@ (r+1)), Return[p]]]; Table[ a[n], {n, 1, 7}] (* Jean-François Alcover, Apr 28 2015 *)
  • PARI
    has(p,n)=for(i=1,2*n,if(issquarefree(p+i)==i%2, return(0))); 1
    a(n)=forprime(p=2,, if(has(p,n), return(p))) \\ Charles R Greathouse IV, Apr 27 2015

Extensions

a(3) corrected, a(6)-a(7) added by Charles R Greathouse IV, Apr 27 2015
Showing 1-5 of 5 results.