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.

A073247 Squarefree numbers k such that k-1 and k+1 are not squarefree.

Original entry on oeis.org

17, 19, 26, 51, 53, 55, 89, 91, 97, 127, 149, 151, 161, 163, 170, 197, 199, 233, 235, 241, 249, 251, 269, 271, 293, 295, 305, 307, 337, 339, 341, 349, 362, 377, 379, 413, 415, 449, 451, 485, 487, 489, 491, 521, 523, 530, 551, 557, 559, 577, 579, 593, 595
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Comments

Probably 11*n < a(n) < 12*n for n > 189. - Charles R Greathouse IV, Nov 05 2017
The asymptotic density of this sequence is 1/zeta(2) - 2 * Product_{p prime} (1 - 2/p^2) + Product_{p prime} (1 - 3/p^2) = A059956 - 2*A065474 + A206256 = 0.088145884881346585838... . - Amiram Eldar, Aug 30 2024

Crossrefs

Cf. A268331, A268332, A268333, A268334 (squarefree numbers isolated by more than 2, 3, etc.).

Programs

  • Maple
    sf:= select(numtheory:-issqrfree,[$1..1000]):
    map(t -> `if`(sf[t-1]=sf[t]-1 or sf[t+1]=sf[t]+1,NULL,sf[t]), [$2..nops(sf)-1]); # Robert Israel, Feb 01 2016
  • Mathematica
    Reap[For[n = 0, n <= 1000, n++, If[SquareFreeQ[n] && !SquareFreeQ[n-1] && !SquareFreeQ[n+1], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    is(n)=!issquarefree(n-1) && issquarefree(n) && !issquarefree(n+1) \\ Charles R Greathouse IV, Nov 05 2017
    
  • PARI
    list(lim)=my(v=List(),l1,l2); forfactored(k=9,lim\1+1, if(!issquarefree(k) && !issquarefree(l2) && issquarefree(l1), listput(v,l1[1])); l2=l1; l1=k); Vec(v) \\ Charles R Greathouse IV, Nov 27 2024