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!)
A001468 There are a(n) 2's between successive 1's.
(Formerly M0099 N0036)
31

%I M0099 N0036 #102 Aug 26 2022 10:26:17

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

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

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

%N There are a(n) 2's between successive 1's.

%C The Fibonacci word on the alphabet {2,1}, with an extra 1 in front. - _Michel Dekking_, Nov 26 2018

%C Start with 1, apply 1->12, 2->122, take limit. - _Philippe Deléham_, Sep 23 2005

%C Also number of occurrences of n in Hofstadter G-sequence (A005206) and in A019446. - _Reinhard Zumkeller_, Feb 02 2012, Aug 07 2011

%C A block-fractal sequence: every block occurs infinitely many times. Also a reverse block-fractal sequence. See A280511. - _Clark Kimberling_, Jan 06 2017

%D D. Gault and M. Clint, "Curiouser and curiouser" said Alice. Further reflections on an interesting recursive function, Internat. J. Computer Math., 26 (1988), 35-43. See Table 2.

%D D. R. Hofstadter, personal communication, Jul 15 1977.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Reinhard Zumkeller, <a href="/A001468/b001468.txt">Table of n, a(n) for n = 0..1000</a>

%H M. Bunder and K. Tognetti, <a href="http://dx.doi.org/10.1016/S0012-365X(01)00147-9">On the self matching properties of [j tau]</a>, Discrete Math., 241 (2001), 139-151.

%H D. Gault and M. Clint, <a href="http://dx.doi.org/10.1080/00207168808803682">"Curiouser and curiouser" said Alice. Further reflections on an interesting recursive function</a>, Internat. J. Computer Math., 26 (1988), 35-43.

%H D. Gault and M. Clint, <a href="/A005206/a005206.pdf">"Curiouser and curiouser said Alice. Further reflections on an interesting recursive function</a>, Intern. J. Computer. Math., 26 (1988), 35-43. (Annotated scanned copy)

%H D. R. Hofstadter, <a href="/A006336/a006336_1.pdf">Eta-Lore</a> [Cached copy, with permission]

%H D. R. Hofstadter, <a href="/A006336/a006336_2.pdf">Pi-Mu Sequences</a> [Cached copy, with permission]

%H D. R. Hofstadter and N. J. A. Sloane, <a href="/A006336/a006336.pdf">Correspondence, 1977 and 1991</a> [See DRH latter, p. 2, Eq. (2), the sequence marked A006336, which is now A001468].

%H J. V. Pennington and T. F. Mulcrone, <a href="http://www.jstor.org/stable/2310563">Problem E1226</a>, Amer. Math. Monthly, 64 (1957), 197-198.

%H Leon Recht, Martin Rosenbaum and E. P. Starke, <a href="http://www.jstor.org/stable/2304481">Problem 4247</a>, Amer. Math. Monthly, 55 (1948), 588-592.

%H N. J. A. Sloane, <a href="/A001149/a001149.pdf">Handwritten notes on Self-Generating Sequences, 1970</a> (note that A1148 has now become A005282)

%H N. J. A. Sloane, <a href="/A115004/a115004.txt">Families of Essentially Identical Sequences</a>, Mar 24 2021 (Includes this sequence)

%F a(n) = [(n+1) tau] - [n tau], tau = (1 + sqrt 5)/2 = A001622, [] = floor function.

%F a(n) = A000201(n+1) - A000201(n) = A022342(n+1) - A022342(n), n >= 1; i.e., the first term discarded, this yields the first differences of A000201 and A022342. - _M. F. Hasler_, Oct 13 2017

%p Digits := 100: t := evalf( (1+sqrt(5))/2); A001468 := n-> floor((n+1)*t)-floor(n*t);

%t Table[Floor[GoldenRatio*(n + 1)] - Floor[GoldenRatio*n], {n, 0, 80}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006 *)

%t Nest[ Flatten[# /. {1 -> {1, 2}, 2 -> {1, 2, 2}}] &, {1}, 6] (* _Robert G. Wilson v_, May 20 2014 and corrected Apr 24 2017 following Clark Kimberling's email of Mar 22 2017 *)

%t SubstitutionSystem[{1->{1,2},2->{1,2,2}},{1},{6}][[1]] (* _Harvey P. Dale_, Jan 31 2022 *)

%o (Haskell)

%o import Data.List (group)

%o a001468 n = a001468_list !! n

%o a001468_list = map length $ group a005206_list

%o -- _Reinhard Zumkeller_, Aug 07 2011

%o (PARI) a=[1];for(i=1,30,a=concat([a,vector(a[i],j,2),1]));a \\ Or compute as A001468(n)=A201(n+1)-A201(n) with A201(n)=(n+sqrtint(5*n^2))\2, working for n>=0 although A000201 is defined for n>=1. - _M. F. Hasler_, Oct 13 2017

%o (Python)

%o def A001468(length):

%o a = [1]

%o for i in range(length):

%o for _ in range(a[i]):

%o a.append(2)

%o a.append(1)

%o if len(a)>=length:

%o break

%o return a[:length] # _Nicholas Stefan Georgescu_, Jun 02 2022

%o (Python)

%o from math import isqrt

%o def A001468(n): return (n+1+isqrt(m:=5*(n+1)**2)>>1)-(n+isqrt(m-10*n-5)>>1) # _Chai Wah Wu_, Aug 25 2022

%Y Same as A014675 if initial 1 is deleted. Cf. A003849, A000201, A280511.

%Y The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - _N. J. A. Sloane_, Mar 11 2021

%K nonn,easy,nice

%O 0,2

%A _N. J. A. Sloane_

%E Rechecked by _N. J. A. Sloane_, Nov 07 2001

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 16 18:02 EDT 2024. Contains 371750 sequences. (Running on oeis4.)