cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A284621 Positions of 0 in A284620.

This page as a plain text file.
%I A284621 #16 May 23 2025 03:53:38
%S A284621 1,5,11,15,21,27,31,37,41,47,53,57,63,69,73,79,83,89,95,99,105,109,
%T A284621 115,121,125,131,137,141,147,151,157,163,167,173,179,183,189,193,199,
%U A284621 205,209,215,219,225,231,235,241,247,251,257,261,267,273,277,283,287
%N A284621 Positions of 0 in A284620.
%C A284621 This sequence and A005843 and A130568 partition the positive integers into sequences with slopes t = 1+sqrt(5), u = 3+sqrt(5), v = 2, where 1/t + 1/u + 1/v = 1.  The positions of 1 in A284620 are given by A005843, and of 2, by A130568.
%C A284621 From _Michel Dekking_, Mar 17 2020: (Start)
%C A284621 This sequence is a generalized Beatty sequence.
%C A284621 It was shown in the Comments of A284620 that A284620 is the letter-to-letter image of the fixed point x = ABCDABCDCD... of the morphism
%C A284621       mu:   A->AB, B->CD, C->ABCD, D->CD,
%C A284621 with the letter-to-letter map lambda defined by
%C A284621       lambda:  A->0, B->1, C->2, D->1.
%C A284621 Note that A284620(n)=0  iff  x(n) = A, where x = ABCDABCDCD... is the fixed point of mu.  The return words of A in x are ABCD and ABCDCD.  Coding these two return words by their lengths, mu induces a morphism rho on the coded return words given by
%C A284621       rho(4) = 46, rho(4) = 466.
%C A284621 The difference sequence (a(n+1)-a(n)) equals the unique fixed point r = 4646646466... of rho.
%C A284621 The morphism g on the alphabet {a,b} given by
%C A284621        g(a) = ab, g(b) =abb
%C A284621 was introduced in A284620. We see that rho is just an alphabet change of the morphism g.
%C A284621 Let f given by f(b) = ba, f(a) = b be the Fibonacci morphism on the alphabet {b,a} with fixed point x_F = babbababba....
%C A284621 Let x_G = ababbababb... be the fixed point of g. It is well-known (see, e.g., Lemma 12 in "Morphic words..."), that x_G =  a x_F.
%C A284621 In general the partial sums of  x_F are equal to the generalized  Beatty sequence V  given by V(n) =  p*floor(n*phi) +q*n+r, where p = a-b  and  q = 2*b-a.  See Lemma 8 in the Allouche and Dekking paper. Here we obtain p = 2, q = 2. So a(n) = 2*floor((n-1)*phi) + 2*n - 1, for n>0.
%C A284621 (End)
%H A284621 Clark Kimberling, <a href="/A284621/b284621.txt">Table of n, a(n) for n = 1..10000</a>
%H A284621 J.-P. Allouche and F. M. Dekking, <a href="https://doi.org/10.2140/moscow.2019.8.325">Generalized Beatty sequences and complementary triples</a>, Moscow Journal of Combinatorics and Number Theory 8, 325-341 (2019).
%H A284621 M. Dekking, <a href="https://doi.org/10.1016/j.tcs.2019.12.036">Morphic words, Beatty sequences and integer images of the Fibonacci language</a>, Theoretical Computer Science  809,  407-417 (2020).
%F A284621 a(n+1) = 2*A001950(n) + 1, n>0. - _Michel Dekking_, Mar 17 2020
%e A284621 As a word, A284620 = 012101212101210121..., in which 0 is in positions 1,5,11,15,...
%t A284621 s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13]  (* A003849 *)
%t A284621 w = StringJoin[Map[ToString, s]]
%t A284621 w1 = StringReplace[w, {"00" -> "2"}]
%t A284621 st = ToCharacterCode[w1] - 48 (* A284620 *)
%t A284621 Flatten[Position[st, 0]]  (* A284621 *)
%t A284621 Flatten[Position[st, 1]]  (* A005843 *)
%t A284621 Flatten[Position[st, 2]]  (* A130568 *)
%o A284621 (Python)
%o A284621 from math import isqrt
%o A284621 def A284621(n): return (n-1+isqrt(5*(n-1)**2)&-2)+(n<<1)-1 # _Chai Wah Wu_, May 22 2025
%Y A284621 Cf. A005843, A130568, A284620, A001950.
%K A284621 nonn,easy
%O A284621 1,2
%A A284621 _Clark Kimberling_, May 02 2017