A213174 a(n) is the smallest number that is the sum of both 2n-1 and 2n+1 consecutive primes.
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
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.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 2449 terms from Robert G. Wilson v)
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 *)