A145781 Least m >= 0 which when added to primorial(n) yields a square.
2, 3, 6, 15, 91, 246, 715, 3535, 21099, 95995, 175470, 4468006, 31516774, 192339970, 212951314, 5138843466, 76699112491, 103728576730, 3051100701874, 14417674958635, 245230361204214, 2296196521511806, 10940476546738414
Offset: 1
Keywords
Examples
a(1)= 4 - 2 = 2, a(2)= 9 - 2*3 = 3, a(3)= 36 - 2*3*5 = 6, a(4)= 225 - 2*3*5*7 = 15, and a(5)= 2401 - 2*3*5*7*11 = 91.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..630
- C. Aebi and G. Cairns, Partitions of primes, Parabola 45, Issue 1 (2009); see the table on p. 5. - _Jonathan Sondow_, Jun 21 2012
Programs
-
Mathematica
(IntegerPart[Sqrt[#]]+1)^2-#&/@Rest[FoldList[Times,1,Prime[Range[30]]]] (* Harvey P. Dale, Jan 14 2011 *)
-
PARI
j=[];for (n=1,30,j=concat(j,(ceil(sqrt(prod(i=1,n,prime(i))))^2 -prod(i=1,n,prime(i)))));j
Formula
Extensions
Definition shortened and clarified by Jonathan Sondow, Sep 02 2012