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
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Oct 07 2008
EXTENSIONS
Corrected (89 removed) by R. J. Mathar, May 01 2010
STATUS
approved