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”).

A004602
Expansion of Pi in base 3.
30
1, 0, 0, 1, 0, 2, 1, 1, 0, 1, 2, 2, 2, 2, 0, 1, 0, 2, 1, 1, 0, 0, 2, 1, 1, 1, 1, 1, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 0, 1, 2, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 2, 2, 0, 2, 2, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 1, 1, 2, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 0, 2, 2, 0, 1
OFFSET
2,6
LINKS
Steve Pagliarulo, Stu's pi page: base 3 (23 pages).
FORMULA
a(n) = floor(Pi*3^(n-3)) - 3*floor(Pi*3^(n-4)), n>1. - G. C. Greubel, Mar 09 2018
EXAMPLE
10.0102110122220102110021111102212222201...
MATHEMATICA
RealDigits[ N[ Pi, 105], 3] [[1]]
RealDigits[Pi, 3, 120][[1]] (* Harvey P. Dale, Jul 02 2021 *)
Table[ResourceFunction["NthDigit"][Pi, n, 3], {n, 1, 100}] (* Joan Ludevid, Jun 24 2022; easy to compute a(10000000)=1 with this function; requires Mathematica 12.0+ *)
CROSSREFS
Pi in base b: A004601 (b=2), this sequence (b=3), A004603 (b=4), A004604 (b=5), A004605 (b=6), A004606 (b=7), A006941 (b=8), A004608 (b=9), A000796 (b=10), A068436 (b=11), A068437 (b=12), A068438 (b=13), A068439 (b=14), A068440 (b=15), A062964 (b=16), A060707 (b=60), A331313 (Pi in balanced ternary).
Cf. A007514.
Sequence in context: A214341 A281871 A131334 * A247418 A229899 A153764
KEYWORD
nonn,base,cons,easy
STATUS
approved