login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103957 A nonsense sequence. 0

%I #15 Dec 18 2022 07:03:46

%S 1,1,2,1,1,2,1,1,2,1,2,1,2,1,3,1,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,

%T 1,2,1,3,1,2,1,1,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,1,2,1,3,1,2,1,1,

%U 1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,1,2,1,3,1,2,1,1,2,1,2,1,3,1,2,1,3,1,2

%N A nonsense sequence.

%F Involves substitutions 1-> {1, 2}, 2->{1, 3}, 3->1.

%t Hofstadter[n_Integer? Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n - 1]] + Hofstadter[n - Hofstadter[n - 2]];

%t Hofstadter[0] = Hofstadter[1] = 1;

%t s[1] = {1, 2}; s[2] = {1, 3}; s[3] = {1};

%t t[a_] := Join[a, Flatten[s /@ a]];

%t p[0] = {1}; p[1] = t[{1}];

%t p[n_] := t[p[n - 1]];

%t Flatten[Table[p[If[n > 0, Hofstadter[n], n]], {n, 0, 7}]]

%Y Cf. A073058, A103684.

%K nonn,uned,less

%O 0,3

%A _Roger L. Bagula_, Mar 30 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)