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!)
A144418 Nonnegative nonprime values (with repeats) of prime(n) - 2*n. 0

%I #18 Sep 08 2022 08:45:38

%S 0,1,1,9,9,15,15,21,25,25,35,49,49,51,51,65,87,93,105,105,117,129,129,

%T 135,135,143,147,155,155,159,161,161,169,183,183,185,201,209,209,215,

%U 221,225,231,235,243,249,265,265,275,285,295,301,303,309,315,325,325

%N Nonnegative nonprime values (with repeats) of prime(n) - 2*n.

%e a(1) = p(1) - 2*1 = 2 - 2 = 0,

%e a(2) = p(5) - 2*5 = 11 - 10 = 1,

%e a(3) = p(6) - 2*6 = 13 - 12 = 1,

%e a(4) = p(10) - 2*10 = 29 - 20 = 9,

%e a(5) = p(11) - 2*11 = 31 - 22 = 9,

%e a(6) = p(13) - 2*13 = 41 - 26 = 15,

%e a(7) = p(14) - 2*14 = 43 - 28 = 15, etc.

%p for n from 1 to 300 do p := ithprime(n) ; c := p-2*n ; if c>= 0 and not isprime(c) then printf("%d,",c) ; end if; end do: # _R. J. Mathar_, May 01 2010

%t Join[{0}, Select[Table[Prime[n] - 2 n, {n, 5, 100}], ! PrimeQ[#]&]] (* _Vincenzo Librandi_, Oct 05 2015 *)

%o (Magma) [0] cat [a: n in [5..100] |not IsPrime(a) where a is ((NthPrime(n)-2*n))]; // _Vincenzo Librandi_, Oct 05 2015

%o (PARI) for(n=1, 1000, if( (k = prime(n)-2*n) > -1 && isprime(k) == 0 , print1(k", "))); \\ _Altug Alkan_, Oct 06 2015

%Y Cf. A000040, A141468.

%K nonn,easy

%O 1,4

%A _Juri-Stepan Gerasimov_, Oct 07 2008

%E Corrected (89 removed) by _R. J. Mathar_, May 01 2010

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 May 1 22:42 EDT 2024. Contains 372178 sequences. (Running on oeis4.)