login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = smallest multiple of n such that a(1)*a(2)*...*a(n) + 1 is a prime.
1

%I #5 Aug 25 2014 12:20:52

%S 1,2,3,12,25,12,7,56,36,60,11,24,104,112,225,112,102,108,38,40,231,

%T 968,23,216,600,104,486,364,174,600,310,288,132,102,140,252,740,760,

%U 312,40,656,588,4429,1452,3690,552,94,96,2744,1000,1530,1664,2279,1512,5005

%N a(n) = smallest multiple of n such that a(1)*a(2)*...*a(n) + 1 is a prime.

%C The partial product is a multiple of n!.

%e a(5) = 25 as 1*2*3*12*25 + 1= 1801 is a prime but 1*2*3*12*k + 1 is not a prime for k = 5,10,15 and 20.

%t a[1] = 1; a[n_] := a[n] = Block[{k = 1, pp = Product[a[i], {i, 1, n - 1}]}, While[ !PrimeQ[ pp*k*n + 1], k++ ]; k*n]; Table[ a[n], {n, 1, 54}]

%Y Cf. A084729.

%K nonn

%O 1,2

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003

%E Edited and extended by _Robert G. Wilson v_, Jun 15 2003