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-14 of 14 results.

A240476 Primes that are not midway between the closest flanking squarefree numbers.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 193, 211, 223, 227, 229, 239, 241, 257, 263, 277, 281, 283, 311, 313, 317, 331, 347, 349, 353
Offset: 1

Views

Author

Chris Boyd, Apr 06 2014

Keywords

Comments

Primes for which the corresponding A240473(m) is not equal to A240474(m).
Primes not equal to the average of the closest flanking squarefree numbers.
Primes not equal to the average of three consecutive squarefree numbers.
Complement of A240475 relative to A000040.

Examples

			29 is a term because it is not midway between the closest flanking squarefree numbers 26 and 30.
On the other hand, 19 is not a term because it is midway between the closest flanking squarefree numbers 17 and 21.
		

Crossrefs

Programs

  • PARI
    forprime(p=1,353,forstep(j=p-1,1,-1,if(issquarefree(j),L=j;break));for(j=p+1,2*p,if(issquarefree(j),G=j;break));if(G-p!=p-L,print1(p", ")))

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
    

A378619 Distance between n and the greatest squarefree number <= n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 2, 3, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 12 2024

Keywords

Crossrefs

Positions of 0 are A005117.
Positions of first appearances are A020755 - 1.
Positions of 1 are A053806.
Subtracting each term from n gives A070321.
The opposite version is A081221.
Restriction to the primes is A240473, opposite A240474.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Mathematica
    Table[n-NestWhile[#-1&,n,!SquareFreeQ[#]&],{n,100}]
  • PARI
    A378619(n) = forstep(k=n,1,-1,if(issquarefree(k), return(n-k))); \\ Antti Karttunen, Jan 29 2025
  • Python
    from itertools import count
    from sympy import factorint
    def A378619(n): return n-next(m for m in count(n,-1) if max(factorint(m).values(),default=0)<=1) # Chai Wah Wu, Dec 14 2024
    

Formula

a(n) = n - A070321(n).

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 29 2025
Previous Showing 11-14 of 14 results.