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.

A213174 a(n) is the smallest number that is the sum of both 2n-1 and 2n+1 consecutive primes.

Original entry on oeis.org

23, 83, 119, 401, 1025, 3321, 863, 5683, 1523, 3397, 3979, 8983, 7901, 21775, 11131, 9073, 14699, 16277, 30895, 9167, 15947, 40091, 105131, 54923, 14413, 15605, 122135, 29775, 173649, 80841, 99149, 56495, 189807, 46421, 290203, 158741, 56099, 276535, 189869
Offset: 1

Views

Author

Zak Seidov, Mar 07 2013

Keywords

Examples

			23 = 5 + 7 + 11, 83 = 23 + 29 + 31 = 11 + 13  + 17 + 19 + 23,
119  =  17 + 19 + 23 + 29 + 31 = 7 + 11 + 13 + 17 + 19 + 23 + 29.
		

Programs

  • Mathematica
    pr = Prime[Range[1, 100]]; Table[{n, Intersection[(Plus @@@ Partition[pr, 2 n - 1, 1]),Plus @@@ Partition[pr, 2 n + 1, 1]][[1]]}, {n, 40}] (* or *)
    S = Accumulate@ Prime@ Range@ 64000; Table[A = <||>; v = 0; Do[ A[S[[k + 2 n + 1]] - S[[k]]] = 0; t = S[[k + 2 n - 1]] - S[[k]]; If[KeyExistsQ[A, t], v = t; Break[]], {k, 64000 -2*n-1}]; If[v == 0, Break[], v], {n, 1000}] (* Giovanni Resta, Jun 08 2017 *)