

A182376


Smallest k>0 such that nk, n+k, 3nk and 3n+k are all primes, or 0 if no such k exisis.


0



0, 0, 0, 1, 2, 1, 0, 5, 4, 7, 0, 5, 0, 0, 2, 0, 0, 13, 0, 0, 10, 0, 0, 0, 22, 0, 20, 25, 0, 7, 0, 0, 10, 0, 32, 5, 0, 35, 20, 0, 0, 25, 0, 0, 22, 0, 0, 5, 0, 47, 46, 0, 0, 35, 0, 0, 40, 0, 0, 1, 0, 0, 10, 0, 0, 35, 0, 0, 0, 0, 0, 25, 0, 0, 14, 0, 0, 5, 0, 77
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


LINKS

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


EXAMPLE

a(4)=1 because 41=3, 4+1=5, 3*41=11 and 3*4+1=13 are all primes,
a(5)=2 because 52=3, 5+2=7, 3*52=13 and 3*5+2=17 are all primes.


MATHEMATICA

Table[k = 0; While[k < n && ! (PrimeQ[n  k] && PrimeQ[n + k] && PrimeQ[3 n  k] && PrimeQ[3 n + k]), k++]; If[k == n, 0, k], {n, 100}] (* T. D. Noe, Apr 26 2012 *)


CROSSREFS

Sequence in context: A261301 A171960 A330396 * A030206 A212768 A133336
Adjacent sequences: A182373 A182374 A182375 * A182377 A182378 A182379


KEYWORD

nonn


AUTHOR

Gerasimov Sergey, Apr 26 2012


STATUS

approved



