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.
%I A061233 #27 Feb 16 2025 08:32:44 %S A061233 1,7,112,115,157,372,432,1340,7034,8396,9200,18846,29558,34050,89754, %T A061233 101768,1361737,48461857,81164005,145676139,163820009,182446527, %U A061233 5021656281,8401618827,22255558907,28334352230,127113921970,310272097461,782301280193,5560255100022,9925600136870,85169484256928,2542699818508737,3145584963639199,397021758001902006,467746771316089905 %N A061233 Pierce expansion for 4 - Pi. %C A061233 Also, alternating Engel expansion for Pi. %C A061233 Pi = 4 - 1/1 + 1/(1*7) - 1/(1*7*112) + 1/(1*7*112*115) - ... %C A061233 Pierce expansions are always strictly increasing. %H A061233 G. C. Greubel and T. D. Noe, <a href="/A061233/b061233.txt">Table of n, a(n) for n = 0..1000</a> (terms 0 to 400 computed by T. D. Noe; terms 401 to 1000 computed by G. C. Greubel, Dec 31 2016) %H A061233 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PierceExpansion.html">Pierce Expansion</a> %H A061233 <a href="/index/El#Engel">Index entries for sequences related to Engel expansions</a> %p A061233 Digits := 1000: x0 := 4-Pi-4^(-1000): x1 := 4-Pi+4^(-1000): ss := []: # when expansions of x0 and x1 differ, halt %p A061233 k0 := floor(1/x0): k1 := floor(1/x1): while k0=k1 do ss := [op(ss),k0]: x0 := 1-k0*x0: x1 := 1-k1*x1: k0 := floor(1/x0): k1 := floor(1/x1): od: %t A061233 PierceExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@ %t A061233 NestList[{Floor[1/Expand[1 - #[[1]] #[[2]]]], Expand[1 - #[[1]] #[[2]]]} &, {Floor[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; PierceExp[N[4 - Pi, 7!], 25] (* _G. C. Greubel_, Dec 31 2016 *) %o A061233 (PARI) A061233(N=199)={localprec(N); my(c=4-Pi, d=c+c/10^N, a=[1\c]); while(a[#a]==1\d&&c=1-c*a[#a], d=1-d*a[#a]; a=concat(a, 1\c)); a[^-1]} \\ optional arg fixes precision, roughly equal to total number of digits in the result. - _M. F. Hasler_, Nov 24 2020 %Y A061233 A014014 and A015884 are inferior versions of this sequence. %Y A061233 Cf. A154956 (analog for 2/Pi). %K A061233 nonn,easy,nice %O A061233 0,2 %A A061233 _Frank Ellermann_, May 15 2001 %E A061233 More terms from Eric Rains (rains(AT)caltech.edu), May 31 2001