OFFSET

1,3

EXAMPLE

1

1 2

1 2 6

1 2 3 6

1 2 3 5 18

...

PROG

(PARI) fac = 1; for (n = 1, 40, fac *= n; for (i = 1, n, print1(i); print1(" ")); i = n + 1; while (!isprime(fac*i + 1), i++); print1(i); print1(" "); fails = 1; j = i; while (fails, j++; fails = !isprime(j*fac + 1); k = 1; while (!fails && k <= n, if (isprime(j*i*fac/k + 1), k++, fails = 1))); print(j));

CROSSREFS

KEYWORD

AUTHOR

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 07 2003

EXTENSIONS

More terms from David Wasserman, Nov 29 2004

STATUS

approved