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.

A175799 Number of real zeros of the polynomial whose coefficients are the decimal expansion of Pi truncated to n places (A011545).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 2, 1, 2, 2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0
Offset: 0

Views

Author

Michel Lagneau, Dec 04 2010

Keywords

Comments

a(n) = number of real zeros of the polynomial P(n,x) = sum_{k=0..n-1} d(k) x^k, where d(k) are the digits of the decimal expansion of floor(Pi*10^n), n=0,1,2,...
From Robert Israel, Dec 19 2018: (Start)
If d(n) = 0 then P(n,x)=P(n-1,x) so a(n)=a(n-1).
If d(n) <> 0 and P(n,x) has nonzero discriminant, then a(n) == n (mod 2).
Conjecture: P(n,x) has nonzero discriminant for all n >= 1.
Record values: a(0)=0, a(1)=1, a(6)=2, a(135)=3, a(374)=4. (End)

Examples

			a(0) = 0 because 3 => P(0,x)=3 is a constant and has 0 real root;
a(1) = 1 because 31 => P(1,x) = 1+3x has 1 real root;
a(6) = 2 because 3141592 => P(6,x) = 2 + 9x + 5x^2 + x^3 + 4x^4 + x^5 + 3x^6 has 2 real roots.
		

Crossrefs

Programs

  • Maple
    L:= convert(floor(10^100*Pi),base,10):
    f:= proc(n) local P, x,i;
      P:=add(L[-i]*x^(i-1),i=1..n+1);
      sturm(sturmseq(P,x),x,-infinity,infinity)
    end proc:
    map(f, [$0..100]); # Robert Israel, Dec 19 2018
  • PARI
    A175799(n)={ default(realprecision)>n || default(realprecision,n+1); sum(k=1, #n=factor(1.*Pol(eval(Vec(Str(Pi*10^n\1)))))~, (poldegree(n[1, k])==1)*n[2, k] )} /* factorization over the reals => linear factor for each root. poldegree()==1 could be replaced by poldisc()>=0 */ \\ M. F. Hasler, Dec 04 2010

Extensions

Corrected and extended by Robert Israel, Dec 19 2018