login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082594 Constant term when a polynomial of degree n-1 is fitted to the first n primes. 4
2, 1, 2, 3, 6, 15, 38, 91, 206, 443, 900, 1701, 2914, 4303, 4748, 1081, -14000, -55335, -150394, -346163, -716966, -1369429, -2432788, -4002993, -5964748, -7525017, -6123026, 4900093, 40900520, 134308945, 348584680, 798958751, 1678213244, 3277458981, 5972923998, 10110994307 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The polynomial is to pass through the points (k, prime(k)), k=1..n.

The constant term is always an integer because it is the same as f(0), which can be computed from the difference table of the sequence of primes. See Conway and Guy. In fact, the interpolating polynomial is integral for all integer arguments.

A plot of the first 1000 terms shows that the sequence grows exponentially and changes signs occasionally. The Mathematica lines show two ways of computing the sequence. The second, which uses the difference table, is much faster.

REFERENCES

J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 80

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

Author?, Sicurvqf

T. D. Noe, Plot of A082594

FORMULA

a(n) = sum{k=1, .., n} (-1)^(k+1) A007442(k)

EXAMPLE

For n=4, we fit a cubic through the 4 points (1,2),(2,3),(3,5),(4,7) to obtain a(4) = 3.

MATHEMATICA

Table[Coefficient[Expand[InterpolatingPolynomial[Prime[Range[n]], x]], x, 0], {n, 50}]

Diff[lst_List] := Table[lst[[i+1]]-lst[[i]], {i, Length[lst]-1}]; n=50; dt=Table[{}, {n}]; dt[[1]]=Prime[Range[n]]; Do[dt[[i]]=Diff[dt[[i-1]]], {i, 2, n}]; Table[s=dt[[i, 1]]; Do[s=dt[[i-j, 1]]-s, {j, i-1}]; s, {i, n}]

CROSSREFS

Cf. A007442.

Sequence in context: A001371 A001037 A122086 * A051850 A077013 A086880

Adjacent sequences:  A082591 A082592 A082593 * A082595 A082596 A082597

KEYWORD

sign

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), May 08 2003

EXTENSIONS

Edited by T. D. Noe, May 08 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 24 06:10 EDT 2013. Contains 225617 sequences.