cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123112 Smallest number k such that k^n is equal to the sum of n consecutive primes, or 1 if it does not exist.

Original entry on oeis.org

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

Views

Author

Alexander Adamchuk, Sep 28 2006

Keywords

Comments

Corresponding numbers m such that a(n)^n = Sum[Prime[i],{i,m,m+n-1}] are {1,7,85,689,13,...} (A162160).

Crossrefs

Cf. A162160.

Programs

  • 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
  • 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*nJens Kruse Andersen, Jul 23 2014

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