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-5 of 5 results.

A188376 Positions of 1 in A188374; complement of A188375.

Original entry on oeis.org

1, 4, 7, 8, 11, 14, 15, 18, 21, 24, 25, 28, 31, 32, 35, 38, 41, 42, 45, 48, 49, 52, 55, 56, 59, 62, 65, 66, 69, 72, 73, 76, 79, 82, 83, 86, 89, 90, 93, 96, 97, 100, 103, 106, 107, 110, 113, 114, 117, 120, 123, 124, 127, 130, 131, 134, 137, 140, 141, 144, 147, 148, 151, 154, 155, 158, 161, 164, 165, 168, 171, 172, 175, 178
Offset: 1

Views

Author

Clark Kimberling, Mar 29 2011

Keywords

Comments

See A187950.
From Michel Dekking, Feb 27 2018: (Start)
Let d = 3,3,1,3,3,1,3,3,3,1,3,3,1,3,3,3,1,3, ... be the sequence of first differences: d(n):=a(n+1)-a(n).
CLAIM: d equals the Pell word A171588 on the alphabet {3,1}, i.e., d is the unique fixed point of the morphism 3->331, 1->3.
Proof: recall that
A188374 = [nr+2r]-[nr]-[2r] = 1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,... where r=1/sqrt(2).
It was shown in the comments of A294180 that (a(n)) gives the positions of 1 in the 3-symbol Pell word b = A294180 , which is the unique fixed point of the morphism
beta: 1->123, 2->123, 3->1.
The letter 1 occurs in b if and only if it appears as the first letter of a beta(1), beta(2) or beta(3). The differences between the occurrences of 1's are therefore equal to 3, 3, or 1, and moreover, these differences occur exactly as the sequence of beta(1)'s, beta(2)'s and beta(3)'s. After projecting 1->3, 2->3, 3->1 this yields the morphism 3->331, 1->3.
COROLLARY: a(n) = 2[nr] +n.
Proof: We know that the Pell word A171588 = 0010010001001... has a Sturmian representation
A289001(n) = [(n+1)(1-r)]- [n(1-r)] = [nr]-[(n+1)r]-1.
Mapping 0 to 3, and 1 to 1, we find that d = 3313313331331 has a representation d(n) = 2[(n+1)r]-2[nr] +1. This leads to
a(n+1) = 1+d(1)+...+d(n) = n+1+2[(n+1)r].
CLAIM: (a(n)) equals the sequence ad' in the paper "Pellian representations", defined by ad'(n) = [2r[n(1+r)]], for n=1,2,...
Proof: The double floor in the definition of ad' can be reduced to a single floor by Theorem 7.10 of "Pellian representations":
ad'(n) = 2d'(n)-n, for n=1,2,...
Here d' is defined as d'(n) = [n(1+r)]. It follows that
ad'(n) = [n(1+r)]+[nr] = 2[nr]+n = a(n).
(End)

Crossrefs

Programs

Formula

a(n) = 2[nr]+n, where r = 1/sqrt(2). - Michel Dekking, Feb 27 2018

A286686 Positions of 0 in A286685; complement of A286687.

Original entry on oeis.org

1, 3, 6, 7, 9, 12, 13, 15, 17, 20, 21, 23, 26, 27, 29, 31, 34, 35, 37, 40, 41, 43, 46, 47, 49, 51, 54, 55, 57, 60, 61, 63, 65, 68, 69, 71, 74, 75, 77, 80, 81, 83, 85, 88, 89, 91, 94, 95, 97, 99, 102, 103, 105, 108, 109, 111, 113, 116, 117, 119, 122, 123, 125
Offset: 1

Views

Author

Clark Kimberling, May 13 2017

Keywords

Comments

a(n) - a(n-1) is in {1,2,3} for n>=2, and a(n)/n -> 2. These are also the positions of 1 in the {0->10, 1->01}-transform of the Pell word, A171588.
From Michel Dekking, Sep 19 2019: (Start)
Here is a precise description of the sequence of first differences.
Let tau be the map tau: 0->01, 1->10. By definition A286685 equals tau(b), where b is the Pell word. The words of length 2 occurring in b are 00, 01 and 10. These are mapped by tau to
tau(00) = 0101, tau(01) = 0110, tau(10) = 1001.
Each of these three four letter words contains exactly 2 0's, occurring among the first two letters and among the last two letters. It follows from this that the overlapping words of length 2 in the Pell word b induce distances between 0's in tau(b) of 2 for 00, of 3 for 01, and of 1 for 10. But then the difference sequence (a(n+1) - a(n)) = 2, 3, 1, 2, 3, 1, 2, ... is equal to the 1->3, 2->1, 3->2 permuted version of the 3-symbol Pell word A294180. (End)

Examples

			As a word, A286685 = 01011001011001010110010110..., in which 0 is in positions 1,3,6,7,9,12,...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 0, 1}, 1 -> {0}}] &, {0}, 6] (* A171588 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0" -> "01", "1"->"10"}]
    st = ToCharacterCode[w1] - 48 ; (* A286685 *)
    p0 = Flatten[Position[st, 0]];  (* A286686 *)
    p1 = Flatten[Position[st, 1]];  (* A286687 *)

A286687 Positions of 1 in A286685; complement of A286686.

Original entry on oeis.org

2, 4, 5, 8, 10, 11, 14, 16, 18, 19, 22, 24, 25, 28, 30, 32, 33, 36, 38, 39, 42, 44, 45, 48, 50, 52, 53, 56, 58, 59, 62, 64, 66, 67, 70, 72, 73, 76, 78, 79, 82, 84, 86, 87, 90, 92, 93, 96, 98, 100, 101, 104, 106, 107, 110, 112, 114, 115, 118, 120, 121, 124
Offset: 1

Views

Author

Clark Kimberling, May 13 2017

Keywords

Comments

a(n) - a(n-1) is in {1,2,3} for n >= 2, and a(n)/n -> 2.
These are also the positions of 0 in the {0->10, 1->01}-transform of the Pell word, A171588.
From Michel Dekking, Feb 21 2018: (Start)
Let tau be transform map tau: 0->01, 1->10. By definition A286685 equals tau(b), where b is the Pell word. The words of length 2 occurring in b are 00, 01 and 10. These are mapped by tau to tau(00) = 0101, tau(01) = 0110, tau(10) = 1001.
Each of these three four-letter words contains exactly 2 1's, occurring among the first two letters and among the last two letters. It follows from this that the overlapping words of length 2 in the Pell word b induce distances between 1's in tau(b) of 2 for 00, of 1 for 01, and of 3 for 10. But then the difference sequence (a(n+1) - a(n)) = 2, 1, 3, 2, 1, 3, 2, 2, 1, 3, 2, 1, 3, 2, 2, ... is equal to the 1->2, 2->1 permuted version of the 3-symbol Pell word A294180. (End)

Examples

			As a word, A286685 = 01011001011001010110010110..., in which 0 is in positions 1,3,6,7,9,12,...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 0, 1}, 1 -> {0}}] &, {0}, 6] (* A171588 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0" -> "01", "1"->"10"}]
    st = ToCharacterCode[w1] - 48 ; (* A286685 *)
    Flatten[Position[st, 0]];  (* A286686 *)
    Flatten[Position[st, 1]];  (* this sequence *)

A263844 Constant term in expansion of n in Fraenkel's exotic ternary representation.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 06 2015

Keywords

Comments

Let {p_i, i >= 0} = {1,3,7,17,41,99,...} denote the numerators of successive convergents to sqrt(2) (see A001333). Then any n >= 0 has a unique representation as n = Sum_{i >= 0} d_i*p_i, with 0 <= d_i <= 2, d_{i+1}=2 => d_i=0. Sequence gives a(n+1) = d_0.
From Michel Dekking, Feb 11 2018: (Start)
(a(n)) is the unique fixed point of the morphism alpha given by
alpha: 0 -> 012, 1 -> 012, 2 -> 0.
To see this, note first that the p_i satisfy p_{i+2}=2p_{i+1}+p_i for all i=1,2,... Then define a sequence of words by
w(0) = 0, w(1) = 012, w(i+2) = w(i+1)w(i+1)w(i).
The length of w(i) is equal to p_i. In the numeration system, the representation of n = p_i is d = 10..0, and the representation of n = 2p_i is d = 20..0. By unicity of the representation, the numbers n = p_i +m have the representation d = 1c, where c is the representation of m for m = 1,...,p_{i-1}. Similarly, because the digit 2 is required to be followed by the digit 0, the numbers n = 2p_i + m have the representation d =20c, where c is the representation of m for m = 1,...,p_{i-2}. It follows from this that the d_0 digits in the range 0 to p_{i+2} have to satisfy the equation w(i+2) = w(i+1)w(i+1)w(i). But alpha(0)=alpha(1)=w(1), and alpha(2)=w(0), which implies by induction that w(i) = alpha^i(0):
w(i+1) = w(i)w(i)w(i-1) = alpha^i(0) alpha^i(0) alpha^{i-1}(0) =
alpha^i(0) alpha^i(1)alpha^i(2) = alpha^i(012) = alpha^{i+1}(0).
(a(n)) is modulo a change of alphabet (0->1, 1->2, 2->3) equal to A294180, the standard form of (a(n)). This combined with the fact that the Pell word A171588 is a Sturmian word leads to the formula for (a(n)) below. (End)

Examples

			See the link to Table 2 of Fraenkel (2000).
		

Crossrefs

Programs

  • Magma
    [Floor((n+2)*(1-1/Sqrt(2)))+Floor((n+1)*(1-1/Sqrt(2)))- 2*Floor(n*(1-1/Sqrt(2))): n in [1..100]]; // Vincenzo Librandi, Feb 12 2018
  • Mathematica
    Table[Floor[(n + 2) (1 - 1/Sqrt[2])] + Floor[(n + 1) (1 - 1/Sqrt[2])] - 2 Floor[n (1 - 1/Sqrt[2])], {n, 100}] (* Vincenzo Librandi, Feb 12 2018 *)

Formula

a(n) = floor((n+2)r) + floor((n+1)r) - 2*floor(nr), where r = 1 - 1/sqrt(2). - Michel Dekking, Feb 11 2018

Extensions

More terms and new offset from Michel Dekking, Feb 11 2018

A307247 Second digit in the expansion of n in Fraenkel's exotic ternary representation.

Original entry on oeis.org

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

Views

Author

Michel Dekking, Apr 01 2019

Keywords

Comments

Let {p_i, i >= 0} = {1,3,7,17,41,99,...} denote the numerators of successive convergents to sqrt(2) (see A001333). Then any n >= 0 has a unique representation as n = Sum_{i >= 0} d_i*p_i, with 0 <= d_i <= 2, d_{i+1}=2 => d_i=0. Sequence gives a(n+1) = d_1.
Let x be the 3-symbol Pell word A294180 = 1, 2, 3, 1, 2, 3, 1, 1, 2, 3, 1, 2, ... Let delta be the morphism
1 -> 000, 2 -> 111, 3 -> 2.
Then delta(x) = (a(n)). This can be proved by induction, starting from the knowledge that the sequence of first digits d_0 = d_0(n) of n in the exotic ternary expansion shifted by 1 is equal to x (see A263844).
More generally, the sequence of k-th digits d_k shifted by 1 is equal to delta_k(x), where the morphism delta_k is given by
1 -> U_k, 2 -> V_k, 3 -> W_k.
Here U_k is a concatenation of p_{k+1} letters 0, V_k is a concatenation of p_{k+1} letters 1, and W_k is a concatenation of p_k letters 2.

Crossrefs

Showing 1-5 of 5 results.