A030658 1 iff n-th digit of Pi is >= (n+1)st digit.
1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
- Index entries for sequences related to the number Pi
Programs
-
Haskell
a030658 = fromEnum . (<= 0) . a095916 -- Reinhard Zumkeller, Mar 12 2015
-
Mathematica
If[First[#]>=Last[#],1,0]&/@Partition[RealDigits[Pi,10,130][[1]],2,1] (* Harvey P. Dale, Jul 25 2011 *)
-
Python
import sympy as sp length = 100 [int(x>=y) for l in [str(sp.N(sp.pi/10,length))[2:]] for x,y in zip(l[:-1],l[1:])] # Nicholas Stefan Georgescu, Feb 27 2023
Extensions
More terms from David Radcliffe
Comments