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.

Showing 1-4 of 4 results.

A284621 Positions of 0 in A284620.

Original entry on oeis.org

1, 5, 11, 15, 21, 27, 31, 37, 41, 47, 53, 57, 63, 69, 73, 79, 83, 89, 95, 99, 105, 109, 115, 121, 125, 131, 137, 141, 147, 151, 157, 163, 167, 173, 179, 183, 189, 193, 199, 205, 209, 215, 219, 225, 231, 235, 241, 247, 251, 257, 261, 267, 273, 277, 283, 287
Offset: 1

Views

Author

Clark Kimberling, May 02 2017

Keywords

Comments

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.
From Michel Dekking, Mar 17 2020: (Start)
This sequence is a generalized Beatty sequence.
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
mu: A->AB, B->CD, C->ABCD, D->CD,
with the letter-to-letter map lambda defined by
lambda: A->0, B->1, C->2, D->1.
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
rho(4) = 46, rho(4) = 466.
The difference sequence (a(n+1)-a(n)) equals the unique fixed point r = 4646646466... of rho.
The morphism g on the alphabet {a,b} given by
g(a) = ab, g(b) =abb
was introduced in A284620. We see that rho is just an alphabet change of the morphism g.
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....
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.
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.
(End)

Examples

			As a word, A284620 = 012101212101210121..., in which 0 is in positions 1,5,11,15,...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13]  (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"00" -> "2"}]
    st = ToCharacterCode[w1] - 48 (* A284620 *)
    Flatten[Position[st, 0]]  (* A284621 *)
    Flatten[Position[st, 1]]  (* A005843 *)
    Flatten[Position[st, 2]]  (* A130568 *)
  • Python
    from math import isqrt
    def A284621(n): return (n-1+isqrt(5*(n-1)**2)&-2)+(n<<1)-1 # Chai Wah Wu, May 22 2025

Formula

a(n+1) = 2*A001950(n) + 1, n>0. - Michel Dekking, Mar 17 2020

A285677 {0010->2}-transform of the infinite Fibonacci word A003849.

Original entry on oeis.org

0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2
Offset: 1

Views

Author

Clark Kimberling, May 11 2017

Keywords

Comments

As a word, A003849 = 01001010010010100..., and replacing each 0010 by 2 gives 0121201012120101201012120101212010...
Warning: "replacing each 0010 by 2" means "replacing each 0010 by 2 from left to right, consecutively". The result is that the word a(8)...a(14)=0010010 in A003849 is replaced by 201, not by 22. - Michel Dekking, Aug 27 2018

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13] ; (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0010" -> "2"}]
    st = ToCharacterCode[w1] - 48; (* A285677 *)
    Flatten[Position[st, 0]];  (* A285678 *)
    Flatten[Position[st, 1]];  (* A182761 - conjectured *)
    Flatten[Position[st, 2]];  (* A285679 *)

A285679 Positions of 2 in A285677.

Original entry on oeis.org

3, 5, 10, 12, 17, 22, 24, 29, 31, 36, 41, 43, 48, 53, 55, 60, 62, 67, 72, 74, 79, 81, 86, 91, 93, 98, 103, 105, 110, 112, 117, 122, 124, 129, 134, 136, 141, 143, 148, 153, 155, 160, 162, 167, 172, 174, 179, 184, 186, 191, 193, 198, 203, 205, 210, 212, 217
Offset: 1

Views

Author

Clark Kimberling, May 11 2017

Keywords

Comments

A 3-way partition of the positive integers, by positions of 0, 1, 2 in A285677:
A285678: positions of 0; slope t = (4+sqrt(5))/2;
A182761: positions of 1; slope u = (7-sqrt(5))/2;
A285679: positions of 2; slope v = (1+3*sqrt(5))/2;
where 1/t + 1/u + 1/v = 1.
Conjecture: a(n) - a(n-1) is in {2,5} for n>=2.
See A285683 for a proof of this conjecture. - Michel Dekking, Oct 09 2018
a(n) = A285683(n-1) for n>1, see A285683 for a proof. - Michel Dekking, Oct 09 2018

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13] ; (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0010" -> "2"}]
    st = ToCharacterCode[w1] - 48; (* A285677 *)
    Flatten[Position[st, 0]];  (* A285678 *)
    Flatten[Position[st, 1]];  (* A182761 *)
    Flatten[Position[st, 2]];  (* A285679 *)

Formula

a(n) = 3*floor((n-1)*phi) - n + 4

A285678 Positions of 0 in A285677.

Original entry on oeis.org

1, 6, 8, 13, 15, 18, 20, 25, 27, 32, 34, 37, 39, 44, 46, 49, 51, 56, 58, 63, 65, 68, 70, 75, 77, 82, 84, 87, 89, 94, 96, 99, 101, 106, 108, 113, 115, 118, 120, 125, 127, 130, 132, 137, 139, 144, 146, 149, 151, 156, 158, 163, 165, 168, 170, 175, 177, 180, 182
Offset: 1

Views

Author

Clark Kimberling, May 11 2017

Keywords

Comments

A 3-way partition of the positive integers, by positions of 0, 1, 2 in A285677:
A285678: positions of 0; slope t = (4+sqrt(5))/2;
A182761: positions of 1; slope u = (7-sqrt(5))/2;
A285679: positions of 2; slope v = (1+3*sqrt(5))/2;
where 1/t + 1/u + 1/v = 1. Conjecture: a(n) - a(n-1) is in {2,3,4,5} for n>=2.

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13] ; (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0010" -> "2"}]
    st = ToCharacterCode[w1] - 48; (* A285677 *)
    Flatten[Position[st, 0]];  (* A285678 *)
    Flatten[Position[st, 1]];  (* A182761 *)
    Flatten[Position[st, 2]];  (* A285679 *)
Showing 1-4 of 4 results.