login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228649 Numbers n such that n-1, n and n+1 are all squarefree. 6
2, 6, 14, 22, 30, 34, 38, 42, 58, 66, 70, 78, 86, 94, 102, 106, 110, 114, 130, 138, 142, 158, 166, 178, 182, 186, 194, 202, 210, 214, 218, 222, 230, 238, 254, 258, 266, 282, 286, 302, 310, 318, 322, 330, 346, 354, 358, 366, 382, 390, 394, 398, 402, 410, 418, 430, 434, 438, 446, 454, 462, 466, 470, 482, 498 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Equivalently, a positive integer n is comfortably squarefree if and only if n^3 - n is squarefree. The 'if' direction is obvious from the factorization n(n-1)(n+1), and the converse follows from the coprimality of n, n - 1 and n + 1.
The asymptotic density of comfortably squarefree numbers is the product over all primes of 1 - 3/p^2, which is A206256 = 0.125486980905....
See also comments in A007675.
LINKS
Dan Asimov, Interesting sequence on MathOverflow, Math-fun mailing list, Mar 28 2023.
A. P. Goucher, Comfortably squarefree numbers, Complex Projective 4-Space.
Fredrick M. Nelson, Does a(0)=6, a(n+1)=a(n)^3-a(n), define a square-free sequence?, MathOverflow, Mar 24 2023.
FORMULA
a(n) = A007675(n) + 1. - Giovanni Resta, Aug 29 2013
MAPLE
with(numtheory):
a := n -> `if`(issqrfree(n-1) and issqrfree(n) and issqrfree(n+1), n, NULL);
seq(a(n), n = 1..500); # Peter Luschny, Jan 18 2014
MATHEMATICA
Select[Range[500], (SquareFreeQ[# - 1] && SquareFreeQ[#] && SquareFreeQ[# + 1]) &] (* Adam P. Goucher *)
Select[Range[2, 500, 2], (MoebiusMu[# - 1] MoebiusMu[#] MoebiusMu[# + 1]) != 0 &] (* Alonso del Arte, Jan 16 2014 *)
Flatten[Position[Partition[Boole[SquareFreeQ/@Range[500]], 3, 1], {1, 1, 1}]]+1 (* Harvey P. Dale, Jan 14 2015 *)
SequencePosition[Table[If[SquareFreeQ[n], 1, 0], {n, 500}], {1, 1, 1}][[All, 1]]+1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 02 2018 *)
PROG
(PARI) is(n)=issquarefree(n-1)&&issquarefree(n)&&issquarefree(n+1) \\ Charles R Greathouse IV, Aug 29 2013
CROSSREFS
Sequence in context: A101572 A080766 A262506 * A268641 A162796 A172304
KEYWORD
easy,nonn
AUTHOR
Adam P. Goucher, Aug 29 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 19:26 EDT 2024. Contains 375113 sequences. (Running on oeis4.)