login
A123112
Smallest number k such that k^n is equal to the sum of n consecutive primes, or 1 if it does not exist.
2
2, 6, 11, 12, 3, 18, 81, 90, 81, 942, 1773, 2532, 77, 1866, 637, 126, 1725, 56, 2695, 128, 3647, 6960, 1295, 7180, 10809, 430, 10233, 2944, 3269, 160, 10919, 9068, 40925, 22066, 10763, 558, 1403, 4344, 2943, 8894, 9813, 9308, 4691, 20516, 13801, 8056, 36425
OFFSET
1,1
COMMENTS
Corresponding numbers m such that a(n)^n = Sum[Prime[i],{i,m,m+n-1}] are {1,7,85,689,13,...} (A162160).
MAPLE
isnp := proc(x, n) local xbar, p, psum, i ; xbar := floor(x/n) ; p := array(1..n) ; p[1] := nextprime(xbar) ; for i from 2 to n do p[i] := nextprime(p[i-1]) ; od ; psum := add(p[i], i=1..n) ; while psum >= x do if psum = x then RETURN(true) ; elif p[1] = 2 then RETURN(false) ; else psum := psum-p[n] ; for i from n to 2 by -1 do p[i] := p[i-1] ; od ; p[1] := prevprime(p[1]) ; psum := psum+p[1] ; fi ; od ; RETURN(false) ; end; A123112 := proc(n) local k ; k := 1 ; while true do if isnp(k^n, n) then RETURN(k) ; else k := k+1 ; fi ; od ; end; for n from 1 to 30 do print(A123112(n)) ; od ; # R. J. Mathar, Jan 13 2007
PROG
(PARI) print1(2); for(n=2, 10, k=n%2; until(s==t, k+=2; t=k^n; s=0; q=t\n; p=q+1; for(i=0, n-1, if(s*n<i*t, q=nextprime(q+1); s+=q, p=precprime(p-1); s+=p))); print1(", "k)) \\ Jens Kruse Andersen, Jul 23 2014
CROSSREFS
Cf. A162160.
Sequence in context: A033710 A243157 A274689 * A092189 A228061 A357776
KEYWORD
hard,nonn
AUTHOR
Alexander Adamchuk, Sep 28 2006
EXTENSIONS
More terms from R. J. Mathar, Jan 13 2007
a(17)-a(26) from Max Alekseyev
a(27)-a(43) from Donovan Johnson, Nov 17 2008
a(44)-a(47) from Jens Kruse Andersen, Jul 23 2014
STATUS
approved