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.

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.

This page as a plain text file.
%I A381596 #16 Mar 12 2025 08:38:32
%S A381596 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,
%T A381596 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,
%U A381596 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1
%N 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.
%e A381596 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.
%e A381596 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...
%p A381596 with(numtheory):
%p A381596 for n from 1 to 100 do :
%p A381596   P:=add((ithprime(i+1)-ithprime(i))*x^(i-1),i=1..n):
%p A381596    y:=fsolve(P,x,real):
%p A381596    z:=evalf({%}):k:=nops(z):
%p A381596    printf(`%d, `,k):
%p A381596 od:
%o A381596 (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
%Y A381596 Cf. A000040, A001223, A381604.
%K A381596 nonn
%O A381596 1,5
%A A381596 _Michel Lagneau_, Mar 01 2025