OFFSET
1,1
COMMENTS
This sequence is infinite and its relative density in the sequence of primes is equal to 1 - Product_{p prime} (1-1/(p*(p-1))) = 1 - A005596 = 0.626044... (Mirsky, 1949). - Amiram Eldar, Feb 14 2021
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Leon Mirsky, The number of representations of an integer as the sum of a prime and a k-free integer, The American Mathematical Monthly, Vol. 56, No. 1 (1949), pp. 17-19.
FORMULA
A160696(a(n)) > 1. - Reinhard Zumkeller, May 24 2009
EXAMPLE
31 is a term because 32 is divisible by a square, 16.
101 is not a term because 102 = 2*3*17 is squarefree.
MAPLE
with(numtheory): a := proc (n) if isprime(n) = true and issqrfree(n+1) = false then n else end if end proc: seq(a(n), n = 1 .. 500); # Emeric Deutsch, Jun 21 2009
MATHEMATICA
Select[Prime[Range[200]], !SquareFreeQ[#+1]&] (* Harvey P. Dale, Mar 27 2011 *)
Select[Prime[Range[200]], MoebiusMu[# + 1] == 0 &] (* Alonso del Arte, Oct 18 2011 *)
PROG
(Haskell)
a049098 n = a049098_list !! (n-1)
a049098_list = filter ((== 0) . a008966 . (+ 1)) a000040_list
-- Reinhard Zumkeller, Oct 18 2011
(PARI) forprime(p=2, 1e4, if(!issquarefree(p+1), print1(p", "))) \\ Charles R Greathouse IV, Oct 18 2011
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved