login
A144418
Nonnegative nonprime values (with repeats) of prime(n) - 2*n.
0
0, 1, 1, 9, 9, 15, 15, 21, 25, 25, 35, 49, 49, 51, 51, 65, 87, 93, 105, 105, 117, 129, 129, 135, 135, 143, 147, 155, 155, 159, 161, 161, 169, 183, 183, 185, 201, 209, 209, 215, 221, 225, 231, 235, 243, 249, 265, 265, 275, 285, 295, 301, 303, 309, 315, 325, 325
OFFSET
1,4
EXAMPLE
a(1) = p(1) - 2*1 = 2 - 2 = 0,
a(2) = p(5) - 2*5 = 11 - 10 = 1,
a(3) = p(6) - 2*6 = 13 - 12 = 1,
a(4) = p(10) - 2*10 = 29 - 20 = 9,
a(5) = p(11) - 2*11 = 31 - 22 = 9,
a(6) = p(13) - 2*13 = 41 - 26 = 15,
a(7) = p(14) - 2*14 = 43 - 28 = 15, etc.
MAPLE
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
MATHEMATICA
Join[{0}, Select[Table[Prime[n] - 2 n, {n, 5, 100}], ! PrimeQ[#]&]] (* Vincenzo Librandi, Oct 05 2015 *)
PROG
(Magma) [0] cat [a: n in [5..100] |not IsPrime(a) where a is ((NthPrime(n)-2*n))]; // Vincenzo Librandi, Oct 05 2015
(PARI) for(n=1, 1000, if( (k = prime(n)-2*n) > -1 && isprime(k) == 0 , print1(k", "))); \\ Altug Alkan, Oct 06 2015
CROSSREFS
Sequence in context: A124475 A179057 A350919 * A003885 A344335 A168390
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Corrected (89 removed) by R. J. Mathar, May 01 2010
STATUS
approved