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 A005376 M0464 #61 Jul 02 2025 16:01:54 %S A005376 0,1,1,2,3,4,5,6,6,7,7,8,9,9,10,11,12,12,13,14,15,16,16,17,18,19,20, %T A005376 21,21,22,23,24,25,26,26,27,27,28,29,30,31,32,32,33,33,34,35,35,36,37, %U A005376 38,39,40,40,41,41,42,43,43,44,45,46,46,47,48,49,50,51,51,52,52,53,54,54 %N A005376 a(n) = n - a(a(a(a(a(n-1))))). %C A005376 Conjecture: a(n) is approximately c*n, where c is the real root of x^5+x-1 = 0, c=0.754877666246692760049508896... - _Benoit Cloitre_, Nov 05 2002 %C A005376 Rule for n-th term: a(n) = An, where An denotes the Lamé antecedent to (or right shift of) n, which is found by replacing each Lm(i) (Lm(n) = Lm(n-1) + Lm(n-5): A003520) in the Zeckendorffian expansion (obtained by repeatedly subtracting the largest Lamé number you can until nothing remains) with Lm(i-1) (A1=1). For example: 58 = 45 + 11 + 2, so a(58) = 34 + 8 + 1 = 43. - Diego Torres (torresvillarroel(AT)hotmail.com), Nov 24 2002 %C A005376 From _Pierre Letouzey_, Mar 06 2025: (Start) %C A005376 For all n >= 0, A005375(n) <= a(n) <= A100721(n) as proved in Letouzey-Li-Steiner link. Last equality A005375(n) = a(n) for n = 25; last equality a(n) = A100721(n) for n = 33. %C A005376 a(n) = c*n + O(ln(n)), with c conjectured by Benoit Cloitre above; see Letouzey link and Dilcher 1993. (End) %D A005376 Karl Dilcher, On a class of iterative recurrence relations, in G. E. Bergum, A. N. Philippou, and A. F. Horadam, editors, Applications of Fibonacci Numbers, vol. 5, p. 143-158, Springer, 1993. %D A005376 Douglas R. Hofstadter, "Goedel, Escher, Bach", p. 137. %D A005376 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A005376 G. C. Greubel, <a href="/A005376/b005376.txt">Table of n, a(n) for n = 0..10000</a> %H A005376 Larry Ericksen and Peter G. Anderson, <a href="http://www.cs.rit.edu/~pga/k-zeck.pdf">Patterns in differences between rows in k-Zeckendorf arrays</a>, The Fibonacci Quarterly, Vol. 50, No. 1 (February 2012), pp. 11-18. %H A005376 Nick Hobson, <a href="/A005376/a005376.py.txt">Python program for this sequence</a> %H A005376 Pierre Letouzey, <a href="https://arxiv.org/abs/2502.12615">Generalized Hofstadter functions G,H and beyond: numeration systems and discrepancy</a>, arXiv:2502.12615 [cs.DM], 2025. %H A005376 Pierre Letouzey, Shuo Li and Wolfgang Steiner, <a href="https://arxiv.org/abs/2410.00529">Pointwise order of generalized Hofstadter functions G,H and beyond</a>, arXiv:2410.00529 [cs.DM], 2024. %H A005376 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a> %H A005376 <a href="/index/Go#GEB">Index entries for sequences from "Goedel, Escher, Bach"</a> %F A005376 a(n + a(a(a(a(n))))) = n (proved in Letouzey-Li-Steiner link). - _Pierre Letouzey_, Mar 06 2025 %p A005376 H:=proc(n) option remember; if n=1 then 1 else n-H(H(H(H(H(n-1))))); fi; end proc; %t A005376 a[n_]:= a[n]= If[n<1, 0, n -a[a[a[a[a[n-1]]]]]]; %t A005376 Table[a[n], {n, 0, 100}] (* _G. C. Greubel_, Nov 16 2022 *) %o A005376 (SageMath) %o A005376 @CachedFunction # a = A005376 %o A005376 def a(n): return 0 if (n==0) else n - a(a(a(a(a(n-1))))) %o A005376 [a(n) for n in range(101)] # _G. C. Greubel_, Nov 16 2022 %Y A005376 Cf. A005206, A005374, A005375, A100721. %K A005376 nonn %O A005376 0,4 %A A005376 _N. J. A. Sloane_ %E A005376 More terms from _James Sellers_, Jul 12 2000