login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A030658
1 iff n-th digit of Pi is >= (n+1)st digit.
3
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,1
COMMENTS
a(n) = if A095916(n) <= 0 then 1 else 0. - 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 *)
PROG
(Haskell)
a030658 = fromEnum . (<= 0) . a095916 -- Reinhard Zumkeller, Mar 12 2015
(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:])]
CROSSREFS
KEYWORD
nonn,base,easy,nice
EXTENSIONS
More terms from David Radcliffe
STATUS
approved