A175799 Number of real zeros of the polynomial whose coefficients are the decimal expansion of Pi truncated to n places (A011545).
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
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.
Links
- Robert Israel, Table of n, a(n) for n = 0..545
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
Comments