The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A008351 a(n) is the concatenation of a(n-1) and a(n-2) with a(1)=1, a(2)=2. 3
 1, 2, 21, 212, 21221, 21221212, 2122121221221, 212212122122121221212, 2122121221221212212122122121221221, 2122121221221212212122122121221221212212122122121221212 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS A "non-commutative Fibonacci" sequence. Often written as: a, b, ba, bab, babba, babbabab, babbababbabba, babbababbabbababbabab, ... Converges in the appropriate topology. - Dylan Thurston, Jan 28 2005 Do a web search on babbababbabbababbabab to get further links. a(n) has Fibonacci(n) digits d_i where 1 <= i <= n and n > 2. If i is in A001950 then d_i = 1, otherwise it is 2 [Stolarsky]. - David A. Corneth, May 14 2017 REFERENCES D. E. Knuth, "The Art of Programming", Volume 1, "Fundamental Algorithms", third edition, problem 36 on page 86. LINKS K. B. Stolarsky, Beatty sequences, continued fractions, and certain shift operators, Canadian Math. Bull. 19 (1976) pp. 473-482. Wikipedia, Lindenmayer system FORMULA a(n) = a(n-1)*10^floor(log_10(a(n-2))+1) + a(n-2), with a(1)=1, a(2)=2. - Paolo P. Lava, Mar 05 2010 MATHEMATICA a[1] = 1; a[2] = 2; a[n_] := 10^Floor[ Log[10, a[n - 2]] +1]*a[n - 1] + a[n - 2] (* Robert G. Wilson v, Jan 26 2006 *) PROG (PARI) a(n) = if (n<=2, n, eval(concat(Str(a(n-1)), Str(a(n-2))))); \\ Michel Marcus, May 14 2017 (PARI) a(n) = {if(n<=2, return(n)); my(v=vector(fibonacci(n), i, 2), phi2 = (3+sqrt(5))/2, b = vector(fibonacci(n-2), i, (i*(sqrt(5)+3)/2))\1); for(i=1, fibonacci(n-2), v[(i*(3+sqrt(5))/2)\1] = 1); sum(i=1, #v, 10^(#v-i) * v[i])} a(n) = my(v=vector(n)); if(n <= 2, return(n)); v[1] = 1; v[2] = 2; for(i=3, n, v[i]=eval(concat(Str(v[i-1]), Str(v[i-2])))); v[#v] \\ David A. Corneth, May 14 2017 CROSSREFS See A008352 for another version. Cf. A014675: 1->2, 2->21. Cf. A001950. Sequence in context: A304272 A037575 A305659 * A037743 A037638 A131698 Adjacent sequences:  A008348 A008349 A008350 * A008352 A008353 A008354 KEYWORD nonn,base AUTHOR EXTENSIONS Title clarified by Chai Wah Wu, Mar 17 2021 STATUS approved

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

Last modified July 31 02:33 EDT 2021. Contains 346367 sequences. (Running on oeis4.)