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-6 of 6 results.

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

A175800 Number of real zeros of the polynomial whose coefficients are the decimal digits of Fibonacci(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 0, 0, 2, 0, 1, 1, 1, 1, 0, 2, 2, 0, 0, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 1, 1, 1, 1, 2, 4, 2, 0, 0, 1, 1, 3, 1, 1, 2, 2, 0, 0, 2, 1, 1, 3, 1, 1, 4, 2, 2, 2, 1, 1, 3, 1, 1, 0, 2, 0, 2, 2, 3, 1, 1, 1, 1, 2, 2, 0, 2, 2, 1, 1, 1, 1, 2, 2, 4, 0, 0, 1, 1, 1
Offset: 1

Views

Author

Michel Lagneau, Dec 04 2010

Keywords

Comments

a(n) is the number of real zeros of the polynomial Sum_{k=0..p} d(k)*x^k
where d(k) are the decimal digits of Fibonacci(n) = Sum_{i>=0} 10^i*d(i).

Examples

			a(41) = 4 because Fibonacci(41) = 165580141 and the polynomial 1 + 4*x + x^2 + 8*x^4 + 5*x^5 + 5*x^6 + 6*x^7 + x^8 has 4 real roots, x0 = -5.160582776..., x2 = -1.173079878..., x3 = -0.7235395314..., and x4 = -0.2802116772...
		

Crossrefs

Programs

  • Maple
    A175800 := proc(n)
            d := convert(combinat[fibonacci](n),base,10) ;
            P := add( op(i,d)*x^(i-1),i=1..nops(d)) ;
            [fsolve(P,x,real)] ;
            nops(%) ;
    end proc:
    seq(A175800(n),n=1..45) ; # R. J. Mathar, Dec 06 2010

A175801 Number of real zeros of the polynomial whose coefficients are the decimal digits of prime(n).

Original entry on oeis.org

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, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Michel Lagneau, Dec 04 2010

Keywords

Comments

a(n) is the number of real zeros of the polynomial Sum_{k>=0} d(k) x^k
where d(k) are the digits of the decimal expansion of prime(n) = Sum_{k>=0} 10^k*d(k).

Examples

			a(167) = 2 because prime(167) = 991 => P(167,x) = 1 + 9*x + 9*x^2 has 2 real-valued roots, -0.8726779962... and -0.1273220038...
		

Crossrefs

Cf. A173667.

Programs

  • Maple
    A175801 := proc(n) d := convert(ithprime(n),base,10) ; P := add( op(i,d)*x^(i-1),i=1..nops(d)) ; [fsolve(P,x,real)] ; nops(%) ; end proc:
    seq(A175801(n),n=1..45) ; # R. J. Mathar, Dec 06 2010

A175834 Number of real zeros of the polynomial whose coefficients are the decimal expansion of the golden ratio truncated to n places (A011551).

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2
Offset: 0

Views

Author

Michel Lagneau, Dec 05 2010

Keywords

Comments

a(n) = number of real zeros of the polynomial P(n,x) = sum_{k=0..n} p(k) x^k where p(k) are the digits of the decimal expansion of floor(GoldenRatio *10^n) and GoldenRatio = 1.6180339 ....

Examples

			a(4) = 2 because 16180 => P(4,x) = 8x+x^2+6x^3+x^4 has 2 real roots :
x0= - 6.053134348… and x1 = 0.
		

Crossrefs

Programs

  • Maple
    with(numtheory):Digits:=50: T:=array(1..45):for zz from 0 to 43 do:n:=floor(((1+sqrt(5))/2)*10^zz):   for i from 1 to 43 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 + T[9]*z^8 + T[10]*z^9+
      T[11]*z^10+ T[12]*z^11 + T[13]*z^12 + T[14]*z^13 + T[15]*z^14+ T[16]*z^15+ T[17]*z^16 + T[18]*z^17 + T[19]*z^18 + T[20]*z^19 + T[21]*z^20 + T[22]*z^21+ T[23]*z^22+ T[24]*z^23 + T[25]*z^24 + T[26]*z^25+ T[27]*z^26+ T[28]*z^27+ T[29]*z^28 + T[30]*z^29 + T[31]*z^30+ T[32]*z^31 + T[33]*z^32 + T[34]*z^33+ T[35]*z^34+ T[36]*z^35 + T[37]*z^36 + T[38]*z^37+ T[39]*z^38 + T[40]*z^39+ T[41]*z^40+ T[42]*z^41 + T[43]*z^42, z, real):x1:=[x]: x2:=nops(x1): printf ( "%d %d %d\n",zz,n,x2):od:

A175835 Number of real roots of the polynomial Sum_{k=0..n-1} A001620(1+k-n)*x^k, whose coefficients are the decimal digits of the Euler-Mascheroni constant.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 3, 0, 3, 0, 3, 4, 1, 4, 1, 0, 1
Offset: 1

Views

Author

Michel Lagneau, Dec 05 2010

Keywords

Comments

a(n) = number of real zeros of the polynomial P(n,x) = Sum_{k=0..n-1} g(k) x^k, where g(k) are the digits of the decimal expansion of floor(gamma*10^n), g(k)=A001620(k-n).

Examples

			a(4)=1 because 5772 = A139260(4) => P(4,x) = 2 + 7x + 7x^2 +  5x^3 has 1 real root near -0.4.
		

Crossrefs

Programs

  • Maple
    A139260 := proc(n) floor(gamma*10^n) ;end proc:
    A175835 := proc(n) local edgs ; edgs := convert(A139260(n),base,10) ; add(op(i,edgs)*x^(i-1),i=1..nops(edgs)) ; [fsolve(%,x,real)] ; nops(%) ; end proc:
    seq(A175835(n),n=1..20) ; # R. J. Mathar, Dec 11 2010

A175830 Number of real-valued zeros of the polynomial whose coefficients are the leading n+1 decimal digits of Euler's constant, A011543(n).

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Dec 05 2010

Keywords

Comments

a(n) is the number of real-valued zeros of the polynomial P(n,x) = sum_{k=0..n} e(k) x^k where e = 2.7182818... and A011543(n) = sum_{k>=0} e(k)*10^k.

Examples

			a(0) = 0 because 2 => P(0,x)=2 is a constant and has no real root.
a(2) = 2  because 271 => P(2,x) = 1+7x + 2x^2 has 2 real roots.
a(13) = 3 because 27182818284590  => P(13,x) = 9x +5x^2 +4x^3 +8x^4 +2x^5 +8x^6 +x^7 +8x^8 +2x^9 +8x^10 +x^11 +7x^12 +2x^13 has 3 real roots, -3.664218401…, -0.7829315178… and 0.
		

Crossrefs

Programs

  • Maple
    with(numtheory):Digits:=50: T:=array(1..45):for zz from 0 to 43 do:n:=floor(exp(1)*10^zz):
      for i from 1 to 43 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 + T[9]*z^8 + T[10]*z^9+
      T[11]*z^10+ T[12]*z^11 + T[13]*z^12 + T[14]*z^13 + T[15]*z^14+ T[16]*z^15+ T[17]*z^16 + T[18]*z^17 + T[19]*z^18 + T[20]*z^19 + T[21]*z^20 + T[22]*z^21+ T[23]*z^22+ T[24]*z^23 + T[25]*z^24 + T[26]*z^25+ T[27]*z^26+ T[28]*z^27+ T[29]*z^28 + T[30]*z^29 + T[31]*z^30+ T[32]*z^31 + T[33]*z^32 + T[34]*z^33+ T[35]*z^34+ T[36]*z^35 + T[37]*z^36 + T[38]*z^37+ T[39]*z^38 + T[40]*z^39+ T[41]*z^40+ T[42]*z^41 + T[43]*z^42,  z, real):x1:=[x]: x2:=nops(x1): printf ( "%d %d %d\n",zz,n,x2):od: ~
Showing 1-6 of 6 results.