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-1 of 1 results.

A381596 a(n) = number of real zeros (counted with multiplicity) of the polynomial P(n,z) = Sum_{i=1..n} A001223(i)*z^(i-1) where A001223(i) = differences between consecutive primes.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1
Offset: 1

Views

Author

Michel Lagneau, Mar 01 2025

Keywords

Examples

			a(4) = 1 because P(4,z) = Sum_{i=1..4} A001223(i)*z^(i-1) = 1 + 2*z + 2*z^2 + 4*z^3 = (2*z + 1)*(2*z^2 + 1) = 0 for z = -1/2.
a(5) = 2 because P(5,z) = Sum_{i=1..5} A001223(i)*z^(i-1) = 1 + 2*z + 2*z^2 + 4*z^3 + 2*z^4 = 0 for z = -1.6499348..., -0.5606729...
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 1 to 100 do :
      P:=add((ithprime(i+1)-ithprime(i))*x^(i-1),i=1..n):
       y:=fsolve(P,x,real):
       z:=evalf({%}):k:=nops(z):
       printf(`%d, `,k):
    od:
  • PARI
    a(n) = my(v=primes(n+1)); #polrootsreal(sum(i=1, n, (v[i+1]-v[i])*z^(i-1))); \\ Michel Marcus, Mar 01 2025
Showing 1-1 of 1 results.