

A005206


Hofstadter Gsequence: a(0) = 0; a(n) = n  a(a(n1)) for n > 0.
(Formerly M0436)


79



0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 46, 47
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

Rule for finding nth term: a(n) = An, where An denotes the Fibonacci antecedent to (or right shift of) n, which is found by replacing each F(i) in the Zeckendorf expansion (obtained by repeatedly subtracting the largest Fibonacci number you can until nothing remains) by F(i1) (A1=1). For example: 58 = 55 + 3, so a(58) = 34 + 2 = 36.  Diego Torres (torresvillarroel(AT)hotmail.com), Nov 24 2002
From Albert Neumueller (albert.neu(AT)gmail.com), Sep 28 2006: (Start)
A recursively built tree structure can be obtained from the sequence (see Hofstadter, p. 137):
14 15 16 17 18 19 20 21
\ / / \ / \ / /
9 10 11 12 13
\ / / \ /
6 7 8
\ / /
\ / /
\ / /
4 5
\ /
\ /
\ /
\ /
\ /
3
/
2
\ /
1
To construct the tree: node n is connected with the node a(n) below
n
/
a(n)
For example, since a(7) = 4:
7
/
4
If the nodes of the tree are read from bottom to top, left to right, one obtains the positive integers: 1, 2, 3, 4, 5, 6, ... The tree has a recursive structure, since the construct
/
x
\ /
x
can be repeatedly added on top of its own ends, to construct the tree from its root: e.g.,
/
x
/ \ /
x x
\ / /
x x
\ /
\ /
x
When moving from a node to a lower connected node, one is moving to the parent. Parent node of n: floor((n+1)/tau). Left child of n: floor(tau*n). Right child of n: floor(tau*(n+1))1 where tau=(1+sqrt(5))/2. (See the Sillke link.)
(End)
Properties coming from the 1st problem proposed during the 45th Czech and Slovak Mathematical Olympiad in 1996 (see IMO Compendium link):
> a(n) >= a(n1) for any positive integer n,
> a(n)  a(n1) belongs to {0,1},
> No integer n exists such that a(n1) = a(n) = a(n+1). (End)
For n >= 1, find n in the Wythoff array (A035513). a(n) is the number that precedes n in its row, using the preceding column of the extended Wythoff array (A287870) if n is at the start of the (unextended) row.  Peter Munn, Sep 17 2022


REFERENCES

Martin Griffiths, A formula for an infinite family of Fibonacciword sequences, Fib. Q., 56 (2018), 7580.
D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 137.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

L. Carlitz, Fibonacci Representations, Fibonacci Quarterly, volume 6, number 4, October 1968, pages 193220. a(n) = e(n) at equation 1.10 or 2.11 and see equation 3.8 recurrence.
D. R. Hofstadter, EtaLore [Cached copy, with permission]
The IMO Compendium, Problem 1, 45th Czech and Slovak Mathematical Olympiad 1996.


FORMULA

a(n) = floor((n+1)*tau)  n  1 = A000201(n+1)n1, where tau = (1+sqrt(5))/2; or a(n) = floor(sigma*(n+1)) where sigma = (sqrt(5)1)/2.
a(0)=0, a(1)=1, a(n) = n  a(floor(n/tau)).  Benoit Cloitre, Nov 27 2002
a(0) = 0, a(n+1) = a(n) + d(n) and d(0) = 1, d(n+1)=1d(n)*d(a(n)).  Pierre Letouzey, Sep 09 2015
A generalization of Diego Torres's 2002 comment as a formula: if n = Sum_{i in S} A000045(i+1), where S is a set of positive integers, then a(n) = Sum_{i in S} A000045(i).  Peter Munn, Sep 28 2022


MAPLE

H:=proc(n) option remember; if n=0 then 0 elif n=1 then 1 else nH(H(n1)); fi; end proc: seq(H(n), n=0..76);


MATHEMATICA

a[0] = 0; a[n_] := a[n] = n  a[a[n  1]]; Array[a, 77, 0]
(* Second program: *)
Fold[Append[#1, #2  #1[[#1[[#2]] + 1 ]] ] &, {0}, Range@ 76] (* Michael De Vlieger, Nov 13 2017 *)


PROG

(Haskell)
a005206 n = a005206_list !! n
a005206_list = 0 : zipWith () [1..] (map a005206 a005206_list)
(Haskell)
a005206 = sum . zipWith (*) a000045_list . a213676_row . a000201 . (+ 1)
(PARI) first(n)=my(v=vector(n)); v[1]=1; for(k=2, n, v[k]=kv[v[k1]]); concat(0, v) \\ Charles R Greathouse IV, Sep 02 2015
(Magma) [Floor((n+1)*(1+Sqrt(5))/2)n1: n in [0..80]]; // Vincenzo Librandi, Nov 19 2016
(Python)
from math import isqrt


CROSSREFS

a(n):=Sum{k=1..n} h(k), n >= 1, with h(k):= A005614(k1) and a(0):=0.


KEYWORD

nonn,easy,nice


AUTHOR



EXTENSIONS



STATUS

approved



