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.
%I A140119 #16 Jun 29 2025 22:20:22 %S A140119 2,4,8,8,22,-6,72,-92,266,-426,838,-1172,1432,-398,-3614,15140,-41274, %T A140119 95126,-195698,370876,-652384,1063442,-1570116,1961852,-1560168, %U A140119 -1401888,11023226,-36000318,93408538,-214275608,450374202,-879254356,1599245876,-2695464868,4138070460,-5539280974 %N A140119 Extrapolation for (n + 1)-st prime made by fitting least-degree polynomial to first n primes. %C A140119 Construct the least-degree polynomial p(x) which fits the first n primes (p has degree n-1 or less). Then predict the next prime by evaluating p(n+1). %C A140119 Can anything be said about the pattern of positive and negative values? %C A140119 Row sums of triangle A095195. - _Reinhard Zumkeller_, Oct 10 2013 %H A140119 Jonathan Wellons, <a href="/A140119/b140119.txt">Table of n, a(n) for n = 1..1500</a> %F A140119 a(n) = Sum_{i=1..n} prime(i) * (-1)^(n-i) * C(n,i-1). %e A140119 The lowest-order polynomial having points (1,2), (2,3), (3,5) and (4,7) is f(x) = 1/6 (-x^3 +9x^2 -14x +18). When evaluated at x = 5, f(5) = 8. %o A140119 (Haskell) %o A140119 a140119 = sum . a095195_row -- _Reinhard Zumkeller_, Oct 10 2013 %o A140119 (PARI) a(n) = sum(i=1, n, prime(i)*(-1)^(n-i)*binomial(n, i-1)); \\ _Michel Marcus_, Jun 28 2020 %Y A140119 Cf. A082594, A140118. %K A140119 sign %O A140119 1,1 %A A140119 Jonathan Wellons (wellons(AT)gmail.com), May 08 2008