login
A083773
The n-th row of the following triangle contains n distinct numbers such that the product of (n-1) of them + 1 is always a prime. The first (n-1) numbers are the smallest set whose product +1 is a prime and the n-th term is chosen to satisfy the requirement. a(1) = 1 by convention. Sequence contains the triangle by rows.
3
1, 1, 2, 1, 2, 6, 1, 2, 3, 6, 1, 2, 3, 5, 18, 1, 2, 3, 4, 8, 2275, 1, 2, 3, 4, 5, 10, 222, 1, 2, 3, 4, 5, 6, 9, 762986, 1, 2, 3, 4, 5, 6, 7, 9, 2203418, 1, 2, 3, 4, 5, 6, 7, 8, 15
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
Sequence in context: A159885 A178803 A292901 * A129116 A096179 A361834
KEYWORD
more,nonn,tabl
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