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.

Showing 1-5 of 5 results.

A007442 Inverse binomial transform of primes.

Original entry on oeis.org

2, 1, 1, -1, 3, -9, 23, -53, 115, -237, 457, -801, 1213, -1389, 445, 3667, -15081, 41335, -95059, 195769, -370803, 652463, -1063359, 1570205, -1961755, 1560269, 1401991, -11023119, 36000427, -93408425, 214275735, -450374071, 879254493, -1599245737, 2695465017
Offset: 1

Views

Author

Keywords

Comments

a(n) is the (n-1)-st difference of the first n primes. Although the magnitude of the terms appears to grow exponentially, a plot shows that the sequence a(n)/2^n has quite a bit of structure. See A082594 for an interesting application. - T. D. Noe, May 09 2003
Graph this divided by A122803 using plot2! - Franklin T. Adams-Watters
From Robert G. Wilson v, Jan 28 2020: (Start)
a(n) is odd for all n>1.
As opposed to A331573, there are terms where abs(a(n)) >= abs(a(n+1)). (End)

Examples

			a(4) = 7 - 3*5 + 3*3 - 2 = -1.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Diff[lst_List] := Table[lst[[i + 1]] - lst[[i]], {i, Length[lst] - 1}]; n=1000; dt = Prime[Range[n]]; a = Range[n]; a[[1]] = 2; Do[dt = Diff[dt]; a[[i]] = dt[[1]], {i, 2, n}]; a
    u = Table[Prime[Range[k]], {k, 1, 100}];Flatten[Table[Differences[u[[k]], k - 1], {k, 1, 100}]] (* Clark Kimberling, May 15 2015 *)
    t = Array[Prime, 30]; f[x_] := Rest[x] - Most[x];
    Flatten[Last /@ (NestList[f, t[[1 ;; #]], (# - 1)] & /@ Range[1, 29])] (* Horst H. Manninger, Mar 22 2021 *)
  • PARI
    vector(50, n, sum(k=0, n-1,(-1)^(n-k-1)*binomial(n-1, k)*prime(k+1))) \\ Altug Alkan, Oct 17 2015

Formula

a(n) = Sum_{k=0..n-1} (-1)^(n-k-1) binomial(n-1, k) prime(k+1).
a(n) = A095195(n,n-1). - Alois P. Heinz, Sep 25 2013
G.f.: Sum_{k>=1} prime(k)*x^k/(1 + x)^k. - Ilya Gutkovskiy, Apr 23 2019

Extensions

Incorrect conjecture concerning the sign of even terms removed by Glen Whitney, Nov 10 2024

A140119 Extrapolation for (n + 1)-st prime made by fitting least-degree polynomial to first n primes.

Original entry on oeis.org

2, 4, 8, 8, 22, -6, 72, -92, 266, -426, 838, -1172, 1432, -398, -3614, 15140, -41274, 95126, -195698, 370876, -652384, 1063442, -1570116, 1961852, -1560168, -1401888, 11023226, -36000318, 93408538, -214275608, 450374202, -879254356, 1599245876, -2695464868, 4138070460, -5539280974
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), May 08 2008

Keywords

Comments

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).
Can anything be said about the pattern of positive and negative values?
Row sums of triangle A095195. - Reinhard Zumkeller, Oct 10 2013

Examples

			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.
		

Crossrefs

Programs

  • Haskell
    a140119 = sum . a095195_row  -- Reinhard Zumkeller, Oct 10 2013
    
  • PARI
    a(n) = sum(i=1, n, prime(i)*(-1)^(n-i)*binomial(n, i-1)); \\ Michel Marcus, Jun 28 2020

Formula

a(n) = Sum_{i=1..n} prime(i) * (-1)^(n-i) * C(n,i-1).

A082674 Constant term when a polynomial of degree n is fitted to the lower members of the first n+1 twin prime pairs.

Original entry on oeis.org

1, 5, 9, 19, 41, 87, 187, 425, 1041, 2689, 7031, 18015, 44503, 105503, 240267, 527035, 1116023, 2283321, 4509661, 8574251, 15613035, 26989459, 43596473, 63714861, 77517775, 54160583, -87072621, -539390369, -1742001769, -4661299497
Offset: 1

Views

Author

Cino Hilliard, May 19 2003

Keywords

Examples

			A 5th-degree polynomial through the 6 points (1, 3), (2, 5), (3, 11), (4, 17), (5, 29), (6, 41) has constant term 41.
		

Crossrefs

Programs

  • Maple
    A088460 := proc(n) local i,p ; i := 1 ; p := 0 ; while true do while ithprime(i+1)-ithprime(i) <> 2 do i := i+1 ; od ; p := p+1 ; if p = n then RETURN( ithprime(i) ) ; fi ; i := i+1 ; od ; end: A082674 := proc(n) local rhs,co, row,col; rhs := linalg[vector](n+1) ; co := linalg[matrix](n+1,n+1) ; for row from 1 to n+1 do rhs[row] := A088460(row) ; for col from 1 to n+1 do co[row,col] := row^(col-1) ; od ; od ; linalg[linsolve](co,rhs)[1] ; end: for n from 1 to 30 do printf("%d,",A082674(n)) ; od ; # R. J. Mathar, Oct 31 2006

Formula

a(n) = A082675(n) - 2.

Extensions

Corrected and extended by R. J. Mathar, Oct 31 2006

A082675 Constant term when a polynomial of degree <= n is fitted to the first n+1 upper members of the twin prime pairs.

Original entry on oeis.org

3, 7, 11, 21, 43, 89, 189, 427, 1043, 2691, 7033, 18017, 44505, 105505, 240269, 527037, 1116025, 2283323, 4509663, 8574253, 15613037, 26989461, 43596475, 63714863, 77517777, 54160585, -87072619, -539390367, -1742001767, -4661299495
Offset: 1

Views

Author

Cino Hilliard, May 19 2003

Keywords

Examples

			A 5th degree polynomial through the 6 points (1, 5), (2, 7), (3, 13), (4, 19), (5, 31), (6, 43) has constant term 43.
		

Crossrefs

Equals lower-member sequence (A082674) + 2.
Cf. A082594.

Programs

  • Maple
    A006512 := proc(n) local i,p ; i := 1 ; p := 0 ; while true do while ithprime(i+1)-ithprime(i) <> 2 do i := i+1 ; od ; p := p+1 ; if p = n then RETURN( ithprime(i+1) ) ; fi ; i := i+1 ; od ; end: A082675 := proc(n) local rhs,co, row,col; rhs := linalg[vector](n+1) ; co := linalg[matrix](n+1,n+1) ; for row from 1 to n+1 do rhs[row] := A006512(row) ; for col from 1 to n+1 do co[row,col] := row^(col-1) ; od ; od ; linalg[linsolve](co,rhs)[1] ; end: for n from 1 to 30 do printf("%d,",A082675(n)) ; od ; # R. J. Mathar, Oct 31 2006

Extensions

Corrected and extended by R. J. Mathar, Oct 31 2006
Definition edited by Robert Israel, Jun 14 2024

A293210 a(n) = [x^n] (1/(1 - x)^n)*Sum_{k>=1} prime(k)*x^k.

Original entry on oeis.org

0, 2, 7, 26, 97, 366, 1388, 5288, 20225, 77618, 298766, 1153018, 4460072, 17287558, 67129566, 261095420, 1016994627, 3966529870, 15488964428, 60549061804, 236932924494, 927984726826, 3637661249946, 14270586372348, 56024073085546, 220089137078792, 865154426179408, 3402841810234762, 13391422390407194
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 - x)^n Sum[Prime[k] x^k, {k, 1, n}], {x, 0, n}], {n, 0, 28}]

Formula

a(n) = A254858(n,n).
Showing 1-5 of 5 results.