A217785 Smallest integer s>n such that 1+2*s+3*s^2+...+n*s^{n-1} is prime.
3, 12, 12, 9, 21, 12, 26, 23, 30, 24, 138, 33, 80, 32, 54, 192, 48, 40, 4500, 48, 50, 192, 30, 88, 32, 114, 178, 48, 45, 42, 356, 41, 53, 138, 174, 66, 44, 990, 120, 819, 2898, 112, 1052, 122, 164, 132, 108, 77, 540, 198, 106, 135, 237, 98, 234, 162, 83, 720, 3870, 135, 188, 1014, 94, 489, 180, 110, 204, 180, 107, 468, 1542, 508, 218, 608, 88, 102, 228, 140, 3890, 93, 361, 1848, 462, 99, 125, 390, 92, 237, 933, 172, 606, 303, 208, 924, 114, 266, 156, 410, 1330
Offset: 2
Keywords
Examples
a(20)=4500<12*20^2=4800 since 4500 is the least integer s>20 with 1+2*s+3*s^2+...+20*s^{19} prime.
Links
- Zhi-Wei Sun and Charles R Greathouse IV, Table of n, a(n) for n = 2..1000 (first 450 terms from Sun)
Crossrefs
Cf. A000040.
Programs
-
Mathematica
A[n_,x_]:=A[n,x]=Sum[(k+1)*x^k,{k,0,n-1}] Do[Do[If[PrimeQ[A[n,s]]==True,Print[n," ",s];Goto[aa]],{s,n+1,12*n^2-1}]; Print[n," ",counterexample];Label[aa];Continue,{n,2,100}]
-
PARI
f(n,s)=my(t);forstep(k=n,1,-1,t=s*t+k);t a(n)=my(s=n);while(!ispseudoprime(f(n,s++)),);s \\ Charles R Greathouse IV, Mar 25 2013
Comments