OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A049092(n) - 1. - Amiram Eldar, Feb 10 2021
EXAMPLE
4 is in the sequence because it is not squarefree and 5 is prime. - Emeric Deutsch, Oct 12 2008
MAPLE
with(numtheory): a:=proc(n) if issqrfree(n)=false and isprime(n+1)=true then n else end if end proc: seq(a(n), n=1..600); # Emeric Deutsch, Oct 12 2008
with(numtheory): a:=proc(k) if issqrfree(ithprime(k)-1)=false then ithprime(k)-1 else end if end proc: seq(a(k), k=1..110); # Emeric Deutsch, Oct 12 2008
MATHEMATICA
Select[Prime[Range[120]]-1, !SquareFreeQ[ # ]&] (* T. D. Noe, Oct 06 2008 *)
PROG
(Magma) [n: n in [1..5*10^2]| not IsSquarefree(n) and IsPrime(n+1)]; // Vincenzo Librandi, Dec 24 2015
(PARI) is(n)=isprime(n+1) && !issquarefree(n) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Oct 04 2008
EXTENSIONS
STATUS
approved