A178773 Least palindrome which is the product of n consecutive primes.
1, 2, 6, 1001, 5005, 323323
Offset: 0
Programs
-
Mathematica
fQ[k_, n_] := Block[{j = Fold[ Times, 1, Prime[Range[k, k + n]]]}, j == FromDigits@ Reverse@ IntegerDigits@ j]; lst = {}; Do[k = 1; While[ ! fQ[k, n], k++ ]; Print[{n + 1, Fold[Times, 1, Prime[Range[k, k + n]]]}], {n, -1, 4}]
Formula
a(3) = 1001 = 7*11*13,
a(4) = 5005 = 5*7*11*13,
a(5) = 323323 = 7*11*13*17*19.
Comments