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.

A381604 Least number k such that A381596(k) = n.

Original entry on oeis.org

1, 2, 5, 10, 17, 116, 501, 512
Offset: 0

Views

Author

Michel Lagneau, Mar 01 2025

Keywords

Comments

Least number k such that the number of real zeros of the polynomial P(k,z) = Sum_{i=1..k} A001223(i)*z^(i-1) is equal to n, where A001223(i) = differences between consecutive primes.

Examples

			a(1) = 2 because P(2,z) = Sum_{i=1..2} A001223(i)*z^(i-1) = 1 + 2*z = 0 for z = -1/2.
a(2) = 5 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 0 to 20 do:
    ii:=0:
      for k from 1 to 10^3 while(ii=0) do :
        P:=add((ithprime(i+1)-ithprime(i))*x^(i-1),i=1..k):
        y:=fsolve(P,x,real):z:=evalf({%}):y:=nops(z):
         if y=n
         then
          ii:=1:printf (`%d %d \n`,n,k):
           else
         fi:
      od:
    od:
Showing 1-1 of 1 results.