OFFSET
1,1
COMMENTS
Includes all k == 17 or 19 (mod 36), also 2*p^2-1 and 2*p^2+1 for odd primes p. - Robert Israel, Jan 17 2017
This sequence has density around 0.106.... - Charles R Greathouse IV, Jan 23 2017
More accurately, the asymptotic density of this sequence is 1 - 2/zeta(2) + Product_{p prime} (1 - 2/p^2) = 1 - 2 * A059956 + A065474 = 0.1067798952... - Amiram Eldar, Feb 25 2021
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
17 is in this sequence because 17 - 1 = 16 = 2^4 and 17 + 1 = 18 = 2*3^2 are not squarefree.
MAPLE
select(t -> not numtheory:-issqrfree(t-1) and not numtheory:-issqrfree(t+1), [$1..1000]); # Robert Israel, Jan 17 2017
MATHEMATICA
Select[Range[600], !SquareFreeQ[# - 1] && !SquareFreeQ[# + 1] &] (* Vincenzo Librandi, Jan 17 2017 *)
PROG
(Magma) [n: n in [2..600] | not IsSquarefree(n-1) and not IsSquarefree(n+1)];
(PARI) is(n)=!issquarefree(n-1) && !issquarefree(n+1) \\ Charles R Greathouse IV, Jan 23 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jan 16 2017
STATUS
approved