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

A085003 Partial sums of A085002.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 10, 10, 11, 12, 13, 13, 13, 13, 14, 15, 15, 15, 15, 16, 17, 18, 18, 18, 19, 20, 21, 21, 21, 22, 23, 24, 24, 24, 24, 25, 26, 26, 26, 26, 27, 28, 28, 28, 28, 29, 30, 31, 31, 31, 32, 33, 34, 34, 34, 34, 35, 36, 36, 36, 36, 37, 38
Offset: 1

Views

Author

Benoit Cloitre, Jun 17 2003

Keywords

Crossrefs

Partial sums of A085002. A left inverse of A283766.

Programs

Formula

a(n)=sum(k=1, n, A085002(k)).
a(A283766(n)) = n for all n >= 1. - Antti Karttunen, Mar 17 2017

A171587 Sequence of the diagonal variant of the Fibonacci word fractal. Sequence of the Fibonacci tile.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is the upper Wythoff sequence (A001950) read mod 2 (for proof see formula section). So a(n) = floor((n+1)*phi^2) mod 2 where phi = (1+sqrt(5))/2. - Michel Dekking, Feb 01 2021
Interpreted as 0=turn right and 1=turn left, this sequence builds the diagonal variant of the Fibonacci word fractal. Base for the construction of the Fibonacci tile (Tiles the plane by translation in 2 ways).
From Michel Dekking, May 03 2018: (Start)
This is a morphic sequence, i.e., the letter to letter projection of a fixed point of a morphism. To see this, one uses the formula which generates (a(n)) from the Dense Fibonacci word A143667. Note that in the Dense Fibonacci word, which is the fixed point of the morphism
0->10221, 1->1022, 2->1021,
the letter 0 exclusively occurs preceded directly by the letter 1. This enables one to create a new letter 3, encoding the word 10, and a morphism
1->322, 2->321, 3->3223221,
which has the property that the letter to letter projection
1->0, 2->1, 3->0
of its fixed point 3,2,2,3,2,2,1,3,2,1,... is equal to (a(n)).
(End)
Also Hofstadter G-sequence (A005206) mod 2. Another morphism can be written in octonary notation as: 0->4, 1->7, 2->5, 3->6, 4->60, 5->53, 6->71, 7->42, where the high bit gives A005614 and the low bit (i.e. "mod 2") gives this A171587 for n>0. The "Missing Words Proof Certificate" found under Links uses this representation to compute missing words of length L = 3, 4, 6, 9, 14, 22. Is there another missing word of length L = 35 as A001611 suggests? - Bradley Klee, Dec 24 2024

Examples

			q[2] = q[1]q[0] = 0,        q[3] = q[2]bar{q[1]} = 01,
q[4] = q[3]bar{q[2]} = 011, q[5] = q[4]q[3] = 01101.
		

Crossrefs

Cf. A001950 (upper Wythoff sequence), A085002 (lower Wythoff sequence mod 2).

Programs

  • Go
    func b(n int) []int {
        a := make([]int, n+1);
        for i:=1; i < n+1; i++ {
            a[i] = i-a[a[i-1]];
        };
        for i:=0; i < n+1; i++ {
            a[i] %= 2;
        };
        return a
    } // Bradley Klee, Dec 25 2024
  • Mathematica
    (* This program supports the conjecture that A171587=(A001950 mod 2). *)
    t = Nest[Flatten[# /. {1 -> {1, 0, 2, 2}, 0 -> {1, 0, 2, 2, 1}, 2 -> {1, 0, 2, 1}}] &, {1}, 5]
    w = DeleteCases[t, 0] /. {1 -> 0, 2 -> 1}
    u = Table[n + Floor[n*GoldenRatio], {n, 1, 500}]; v = Mod[u, 2]
    Table[w[[n]] - v[[n]], {n, 1, 500}] (* supports conjecture for n=1,2,...,500 *)
    (* t=A143667, w=A171587, u=A001950, conjecture: v=w *)

Formula

This sequence is defined by Blondin-Massé et al. as a limit of recursively defined words q[n]. Here q[0] is the empty word, and q[1]=0.
The recursion is given by
q[n]=q[n-1]q[n-2] if n=2 mod 3, and
q[n]=q[n-1]bar{q[n-2]} if n=0 or 1 mod 3,
where bar exchanges 0 and 1.
Also application of the mapping 1->0, 2->1, 0->empty word to the Dense Fibonacci word A143667.
Conjecture: A171587=(A001950 mod 2), as suggested for n=1,2,...,500 by Mathematica program below. - Clark Kimberling, May 31 2011
From Michel Dekking, May 03 2018: (Start)
Proof of Kimberling's 2011 conjecture, i.e., this sequence is the parity sequence of the Upper Wythoff sequence A001950.
The first difference sequence 3, 2, 3, 3, 2, 3, 2, 3, ... of the Upper Wythoff sequence is equal to the unique fixed point of the morphism
beta: 2 -> 3, 3 -> 32 (cf. A282162).
We define the first difference operator D on finite words w by
D(w(1)...w(m)) = (w(2)-w(1))...(w(m)-w(m-1)).
Note that the length of D(w) is one less than the length of w, and note
LEMMA 1: D(vw) = D(v)|w(1)-v(l)|D(w), if v = v(1)...v(l), and w = w(1)...w(m). Here |w(1)-v(l)| is modulo 2.
We also need (easily proved by induction)
LEMMA 2: The last letter of the word q[n] equals 0 if and only if n = 0,1,2 modulo 6.
Almost trivial is
LEMMA 3: The last letter e(n) of beta^n(2) equals 2 if and only if n = 0 modulo 2.
The following proposition implies the conjecture.
PROPOSITION: The difference sequence of q[n] satisfies D(q[n]) = beta^{n-1}(2) e(n-1)^{-1} modulo 2 for n>3.
Note that, by definition, beta^n(2) e(n)^{-1} is just the word beta^n(2), with the last letter removed.
PROOF: By induction. Combine Lemma 1, 2 and 3 in the recursion for the q[n], for n = 0,...,5 modulo 6, using the following table:
n modulo 6 | 0 | 1 | 2 | 3 | 4 | 5 |
last letter of q[n-1] | 1 | 0 | 0 | 0 | 1 | 1 |
first letter of q[n-2]* | 1 | 1 | 0 | 1 | 1 | 0 |
Here q[n-2]* denotes either q[n-2] (if n == 2 (mod 3)), or bar{q[n-2]} (if n == 0,1 (mod 3)).
For example, where all equalities are modulo 2,
D(q[8]) = D(q[7]) 0 D(q[6]) = beta^6(2) f(6) 0 beta^5(2) f(5) = beta^6(2) beta^5(2) f(5) = beta^5(32) f(5) = beta^7(2) f(7),
where f(n):=(e(n) mod 2)^{-1}.
(End)

Extensions

Formula corrected and extended by Michel Dekking, May 03 2018

A191329 (Lower Wythoff sequence mod 2)+(Upper Wythoff sequence mod 2).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Let r=(golden ratio)=(1+sqrt(5))/2 and let [ ]=floor. Let u(n)=[nr] and v(n)=n+[nr], so that u=A000201, v=A001950, the Wythoff sequences, and A191329=(u mod 2)+(v mod 2)=(number of odd numbers in {[nr],[ns]}).
The sequence A191329 can also be obtained by placing 1 before each term of 2*A078588.

Examples

			u = (1,3,4,6,8,9,...)... = (1,1,0,0,0,1,...) in mod 2
v = (2,5,7,10,13,15,...) = (0,1,1,0,1,1,...) in mod 2,
so that......... A191329 = (1,2,1,0,1,2,...).
		

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; s = r/(r - 1); h = 500;
    u = Table[Floor[n*r], {n, 1, h}]  (* A000201 *)
    v = Table[Floor[n*s], {n, 1, h}]  (* A001950 *)
    w = Mod[u, 2] + Mod[v, 2]  (* A191329 *)
    b = Flatten[Position[w, 0]]  (* A191330=2*A005653 *)
    c = Flatten[Position[w, 1]]  (* A005408, the odds *)
    d = Flatten[Position[w, 2]]  (* A191331=2*A005652 *)
    e = b/2; (* A005653 *)
    f = d/2; (* A005652 *)
    x = (1/3)^b; z = (1/3)^d;
    k[n_] := x[[n]]; x1 = Sum[k[n], {n, 1, 100}];
    N[x1, 100]
    RealDigits[x1, 10, 100]  (* A191332 *)
    k[n_] := z[[n]]; z1 = Sum[k[n], {n, 1, 100}];
    N[z1, 100]
    RealDigits[z1, 10, 100]  (* A191333 *)
    N[x1 + z1, 100] (* Checks that x1+z1=1/8 *)
    x = (1/3)^e; z = (1/3)^f;
    k[n_] := x[[n]]; x2 = Sum[k[n], {n, 1, 100}];
    N[x2, 100]
    RealDigits[x2, 10, 100]  (* A191334 *)
    k[n_] := z[[n]]; z2 = Sum[k[n], {n, 1, 100}];
    N[z2, 100]
    RealDigits[z2, 10, 100]  (* A191335 *)
    N[x2 + z2, 100] (* checks that x2+z2=1/2 *)
  • PARI
    A191329(n) = { my(y=n+sqrtint(n^2*5)); (((y+n+n)\2)%2) + ((y%4)>1); }; \\ (after programs in A001950 and A085002) - Antti Karttunen, May 19 2021
    
  • Python
    from math import isqrt
    def A191329(n): return m if (m:=((n+isqrt(5*n**2))&2)+(n&1))<3 else 1 # Chai Wah Wu, Aug 10 2022

Formula

a(n) = (A000201(n) mod 2) + (A001950(n) mod 2).
a(n) = A085002(n) + A171587(n). - Michel Dekking, Jan 28 2021

A105774 A "fractal" transform of the Fibonacci numbers: a(1)=1; then if F(n) < k <= F(n+1), a(k) = F(n+1) - a(k - F(n)) where F(n) = A000045(n).

Original entry on oeis.org

1, 1, 2, 4, 4, 7, 7, 6, 12, 12, 11, 9, 9, 20, 20, 19, 17, 17, 14, 14, 15, 33, 33, 32, 30, 30, 27, 27, 28, 22, 22, 23, 25, 25, 54, 54, 53, 51, 51, 48, 48, 49, 43, 43, 44, 46, 46, 35, 35, 36, 38, 38, 41, 41, 40, 88, 88, 87, 85, 85, 82, 82, 83, 77, 77, 78, 80, 80, 69, 69, 70, 72, 72
Offset: 1

Views

Author

Benoit Cloitre, May 04 2005

Keywords

Comments

Let tau = (1+sqrt(5))/2; then the missing numbers 3,5,8,10,13,16,18,21,... are given by round(tau^2*k) for k > 0 (A004937).
Indices n such that a(n) = a(n+1) are given by floor(tau^2*k) - 1 for k > 0 (A003622).
Numbers n such that a(n) differs from a(n+1) are given by floor(tau*k+1/tau) for k > 0 (A022342).
Indices n giving isolated terms (a(n) differs from a(n-1) and a(n+1)) are given by floor(tau*floor(tau^2*k)) for k > 0 (A003623).
Remove 0's from the first differences of sorted values; then you get a version of the infinite Fibonacci word (A001468). I.e., sorted values are 1,1,2,4,4,6,7,7,9,9,11,12,12,..., first differences are 0,1,2,0,2,1,0,2,0,2,1,0,2,0,1,...; removing 0's gives 1,2,2,1,2,2,1,2,1,2,2,1,2,1,2,2,1,2,... #{ k : a(k)=k}=infty.

Examples

			For 1 = F(2) < k <= F(3) = 2 the rule gives a(2) = 2 - a(1) = 1 ... if 5 = F(5) < k <= F(6) = 8 the rule forces a(6) = 8 - a(6-5) = 8 - a(1) = 7; a(7) = 8 - a(2) = 7; a(8) = 8 - a(3) = 6.
		

Crossrefs

Formula

a(A000045(n)) = A006498(n-1) for n >= 1. - Typo corrected by Antti Karttunen, Mar 17 2017
limsup a(n)/n = tau and liminf a(n)/n = (tau+2)/5 where tau = (1+sqrt(5))/2. - Corrected by Jeffrey Shallit, Dec 17 2023
a(n) mod 2 = A085002(n) - Benoit Cloitre, May 10 2005
a(1) = 1; for n > 1, a(n) = A000045(2+A072649(n-1)) - a(n-A000045(1 + A072649(n-1))). - Antti Karttunen, Mar 17 2017

A085005 A Von Koch curve related to the Golden ratio.

Original entry on oeis.org

1, 3, 4, 4, 3, 3, 4, 4, 3, 1, 0, 0, 1, 1, 0, 0, 1, 3, 4, 4, 5, 7, 10, 12, 13, 13, 14, 16, 17, 17, 16, 16, 17, 19, 20, 20, 21, 23, 26, 28, 29, 31, 34, 38, 41, 43, 44, 46, 49, 51, 52, 52, 53, 55, 56, 56, 55, 55, 56, 58, 59, 59, 60, 62, 65, 67, 68, 68, 69, 71, 72, 72, 71, 71, 72, 72, 71
Offset: 1

Views

Author

Benoit Cloitre, Jun 17 2003

Keywords

Crossrefs

Programs

  • PARI
    a(n)=(-1)*sum(i=1,n,sum(j=1,i,(-1)^floor(j*(1+sqrt(5))/2)))

Formula

a(n)=(-1)*sum(i=1, n, sum(j=1, i, (-1)^floor(j*(1+sqrt(5))/2)))
a(n) = 2*sum(k = 1, n, sum(i = 1, k, b(i)))-n*(n+1)/2, where b(k) = floor(phi*k)-2*floor(phi*k/2)

A283766 Numbers k such that L(k) is odd, where L = A000201 = lower Wythoff sequence.

Original entry on oeis.org

1, 2, 6, 7, 11, 12, 13, 16, 17, 18, 21, 22, 23, 27, 28, 32, 33, 34, 37, 38, 39, 42, 43, 44, 48, 49, 53, 54, 58, 59, 60, 63, 64, 65, 69, 70, 74, 75, 79, 80, 81, 84, 85, 86, 90, 91, 95, 96, 100, 101, 102, 105, 106, 107, 110, 111, 112, 116, 117, 121, 122, 123
Offset: 1

Views

Author

Clark Kimberling, Mar 17 2017

Keywords

Comments

Complement of A283765.

Crossrefs

Cf. A085002 (characteristic function), A085003 (a left inverse).

Programs

  • Mathematica
    r = GoldenRatio; z = 250; t = Table[Floor[n*r], {n, 1, z}]; u = Mod[t, 2];
    Flatten[Position[u, 0]]  (* A283765 *)
    Flatten[Position[u, 1]]  (* A283766 *)

Formula

a(n+1) - a(n) is in {1,3,4} for every n.
A085003(a(n)) = n for all n >= 1. - Antti Karttunen, Mar 17 2017
Showing 1-6 of 6 results.