OFFSET
0,4
COMMENTS
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-4): A003269) in the Zeckendorffian expansion (obtained by repeatedly subtracting the largest Lamé number you can until nothing remains) by Lm(i-1) (A1=1). For example: 58 = 50 + 7 + 1, so a(58)= 36 + 5 + 1 = 42. - Diego Torres (torresvillarroel(AT)hotmail.com), Nov 24 2002
REFERENCES
D. Hofstadter, "Goedel, Escher, Bach", p. 137.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Larry Ericksen and Peter G. Anderson, Patterns in differences between rows in k-Zeckendorf arrays, The Fibonacci Quarterly, Vol. 50, No. 1 (February 2012), pp. 11-18.
Nick Hobson, Python program for this sequence
FORMULA
Conjecture: a(n) = floor(c*n) + 0 or 1, where c is the positive real root of x^4+x-1 = 0, c=0.724491959000515611588372282... - Benoit Cloitre, Nov 05 2002
Note: in the previous conjecture, the 0 or 1 difference could actually be between -1 and 2, see for instance a(120)=88 for a difference of 2 and a(243)=175 for a difference of -1. - Pierre Letouzey, Jul 11 2018
MAPLE
H:=proc(n) option remember; if n=1 then 1 else n-H(H(H(H(n-1)))); fi; end proc;
MATHEMATICA
a[0]:= 0; a[n_]:= a[n]= a[n] = n - a[a[a[a[n-1]]]]; Table[a[n], {n, 0, 73}] (* Alonso del Arte, Aug 17 2011 *)
PROG
(Haskell)
a005375 n = a005375_list !! n
a005375_list = 0 : 1 : zipWith (-)
[2..] (map a005375 (map a005375 (map a005375 (tail a005375_list))))
-- Reinhard Zumkeller, Aug 17 2011
(SageMath)
@CachedFunction # a = A005375
def a(n): return 0 if (n==0) else n - a(a(a(a(n-1))))
[a(n) for n in range(101)] # G. C. Greubel, Nov 14 2022
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Jul 12 2000
STATUS
approved