login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A145199 Nonsquarefree numbers n such that n+1 is prime. 0
4, 12, 16, 18, 28, 36, 40, 52, 60, 72, 88, 96, 100, 108, 112, 126, 136, 148, 150, 156, 162, 172, 180, 192, 196, 198, 228, 232, 240, 250, 256, 268, 270, 276, 280, 292, 306, 312, 316, 336, 348, 352, 372, 378, 388, 396, 400, 408, 420, 432, 448, 456, 460, 486, 490 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..55.

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

Cf. A006093, A013929, A077064.

Sequence in context: A255411 A067575 A193022 * A082420 A259118 A205683

Adjacent sequences:  A145196 A145197 A145198 * A145200 A145201 A145202

KEYWORD

easy,nonn

AUTHOR

Giovanni Teofilatto, Oct 04 2008

EXTENSIONS

Corrected and extended by T. D. Noe, Emeric Deutsch and R. J. Mathar, Oct 05 2008

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified July 20 14:46 EDT 2017. Contains 289625 sequences.