login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A138345
a(n) = -1 if (n+1)-st decimal digit of 1/Pi is smaller than n-th digit of 1/Pi, 0 if they are equal, 1 if larger.
4
-1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 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, 0, 1, 1, 1, 0, -1, 0, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1
OFFSET
1,1
MATHEMATICA
b = RealDigits[N[1/Pi, 1000]]; b = First[b]; a = {}; Do[k = b[[n + 1]] - b[[n]]; If[k < 0, AppendTo[a, -1], If[k == 0, AppendTo[a, 0], AppendTo[a, 1]]], {n, 1, 999}]; a (*Artur Jasinski*)
Which[#[[2]]<#[[1]], -1, #[[2]]==#[[1]], 0, True, 1]&/@ Partition[ RealDigits[ 1/Pi, 10, 110][[1]], 2, 1] (* Harvey P. Dale, Aug 09 2013 *)
CROSSREFS
Sequence in context: A157972 A124897 A071035 * A014590 A015171 A014562
KEYWORD
sign,base
AUTHOR
Artur Jasinski, Mar 16 2008
STATUS
approved