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.

A173667 Number of real zeros of the polynomial whose coefficients are the decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Nov 24 2010

Keywords

Comments

From the example a(121)=2, P(121,x)=(x+1)^2, it is seen that the roots are counted with multiplicity. For n=0, the polynomial would be P=0 with infinitely many real roots. - M. F. Hasler, Nov 24 2010
a(n) is the number of real zeros of the polynomial P(n,x) = Sum_{k=0..p} d(k)
x^k where d(k) are the digits of the decimal expansion of n = d(p) d(p-1)...d(0), n =0,1,2,...

Examples

			a(121) = 2 because 1+2x+x^2 = 0 has 2 real roots.
a(1597200)=6 because x^6 + 5x^5 + 9x^4+7x^3+2x^2 = x^2 (x+2)(x+1)^3 has 6 real roots.
		

Programs

  • Maple
    with(numtheory):T:=array(1..10000000): x2:=0: printf(`%d, `, x2):for n from
      1 to 300 do: for i from 1 to 8 do: T[i]:=0:od: l:=length(n) : n0:=n:for m from
      1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :u: T[m]:=u:od:x:=fsolve(T[1]+
      T[2]*z + T[3]*z^2+ T[4]*z^3+ T[5]*z^4 + T[6]*z^5 + T[7]*z^6 + T[8]*z^7, z, real):x1:=[x]: x2:=nops(x1): printf(`%d, `, x2):od:
  • PARI
    A173667(n)=sum(k=1,#n=factor(1.*Pol(eval(Vec(Str(n)))))~,(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, Nov 25 2010