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.

Previous Showing 21-23 of 23 results.

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

Original entry on oeis.org

3, 7, 9, 19, 3, 49, -39, 151, -189, 381, -371, 219, 991, -4059, 11473, -26193, 53791, -100639, 175107, -281581, 410979, -506757, 391647, 401587, -2962157, 9621235, -24977199, 57408111, -120867183, 236098467, -428880285, 719991383, -1096219131, 1442605443, -1401210665, 99178397, 4340546667
Offset: 1

Views

Author

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

Keywords

Comments

Construct the least-degree polynomial p(x) which fits the first n odd primes (p has degree n - 1 or less). Then predict the next prime by evaluating prime(n + 1).
Can anything be said about the pattern of positive and negative values?
How many of these terms are the correct (n + 1)th prime?
How many terms are prime?
The terms at indices 1, 2, 4, 5, 8, 13, 17, 20, 24, 32, 54, 75, 105, 283, 676, 769, 1205 and 1300 actually are prime (ignoring negative signs).

Examples

			The lowest-order polynomial having points (1,3), (2,5), (3,7) and (4,11) is f(x) = 1/3 (x^3 - 6x^2 + 17x - 3). When evaluated at x = 5, f(5) = 19.
		

Crossrefs

Cf. A140119.

Programs

  • PARI
    a(n) = sum(i=1, n, prime(i+1)*(-1)^(n-i)*binomial(n, i-1)); \\ Michel Marcus, Jul 07 2025

Formula

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

A226805 P_n(n+1) where P_n(x) is the polynomial of degree n-1 which satisfies P_n(i) = i^i for i = 1,...,n.

Original entry on oeis.org

1, 7, 70, 877, 13316, 237799, 4885980, 113566121, 2946476764, 84417530491, 2647176188372, 90183424037293, 3316840864313484, 130985236211745959, 5528094465439087876, 248308899812296990033, 11827417687501017074876, 595470029978391175571923
Offset: 1

Views

Author

Keywords

Examples

			P_3(x) = 18 - 27*x + 10*x^2; a(3) = P_3(3+1) = 70.
		

Crossrefs

Programs

  • Mathematica
    P[n_][x_] = Sum[a[i]*x^i, {i, 0, n - 1}];ecu[n_] := Table[P[n][i] == i^i, {i, 1, n}];PP[n_][x_] := P[n][x] /. Solve[ecu[n]][[1]];Table[PP[i][i + 1], {i, 1, 22}]
    a[n_] := InterpolatingPolynomial[Table[{i, i^i}, {i, n}], n+1]; Array[a, 20] (* Giovanni Resta, Jun 18 2013 *)
  • PARI
    a(n)=subst(polinterpolate(vector(n,i,i^i)),'x,n+1) \\ Charles R Greathouse IV, Nov 19 2013

A379542 Second term of the n-th differences of the prime numbers.

Original entry on oeis.org

3, 2, 0, 2, -6, 14, -30, 62, -122, 220, -344, 412, -176, -944, 4112, -11414, 26254, -53724, 100710, -175034, 281660, -410896, 506846, -391550, -401486, 2962260, -9621128, 24977308, -57407998, 120867310, -236098336, 428880422, -719991244, 1096219280
Offset: 0

Views

Author

Gus Wiseman, Jan 12 2025

Keywords

Comments

Also the inverse zero-based binomial transform of the odd prime numbers.

Crossrefs

For all primes (not just odd) we have A007442.
Including 1 in the primes gives A030016.
Column n=2 of A095195.
The version for partitions is A320590 (first column A281425), see A175804, A053445.
For nonprime instead of prime we have A377036, see A377034-A377037.
Arrays of differences: A095195, A376682, A377033, A377038, A377046, A377051.
A000040 lists the primes, differences A001223, A036263.
A002808 lists the composite numbers, differences A073783, A073445.
A008578 lists the noncomposite numbers, differences A075526.

Programs

  • Mathematica
    nn=40;Table[Differences[Prime[Range[nn+2]],n][[2]],{n,0,nn}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * prime(k+2)); \\ Michel Marcus, Jan 12 2025

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * prime(k+2).
Previous Showing 21-23 of 23 results.