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.

Previous Showing 31-40 of 53 results. Next

A182028 Take first n bits of the infinite Fibonacci word A003849, regard them as a binary number, then convert it to base 10.

Original entry on oeis.org

0, 1, 2, 4, 9, 18, 37, 74, 148, 297, 594, 1188, 2377, 4754, 9509, 19018, 38036, 76073, 152146, 304293, 608586, 1217172, 2434345, 4868690, 9737380, 19474761, 38949522, 77899045, 155798090, 311596180, 623192361, 1246384722, 2492769444, 4985538889, 9971077778
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 07 2012

Keywords

Comments

a(n) mod 2 = A003849(n);
a(n) = A000225(n+1) - A044432(n).

Examples

			0 ->                            0 -> a(0) = 0,
0,1 ->                         01 -> a(1) = 1,
0,1,0 ->                      010 -> a(2) = 2,
0,1,0,0 ->                   0100 -> a(3) = 4,
0,1,0,0,1 ->                01001 -> a(4) = 9,
0,1,0,0,1,0 ->             010010 -> a(5) = 18,
0,1,0,0,1,0,1 ->          0100101 -> a(6) = 37
0,1,0,0,1,0,1,0 ->       01001010 -> a(7) = 74
0,1,0,0,1,0,1,0,0 ->    010010100 -> a(8) = 148,
0,1,0,0,1,0,1,0,0,1 -> 0100101001 -> a(9) = 297.
		

Crossrefs

Programs

  • Haskell
    a182028 n = a182028_list !! n
    a182028_list = scanl1 (\v b -> 2 * v + b) a003849_list
  • Mathematica
    nesting = 7; A003849 = Flatten[Nest[{#, #[[1]]}&, {0, 1}, nesting]]; a[n_] := FromDigits[Take[A003849, n+1], 2]; Table[a[n], {n, 0, Length[A003849] - 1}] (* Jean-François Alcover, Feb 13 2016 *)

Formula

a(n) = 2*a(n-1) + A003849(n) for n > 0, a(0) = 0.

A103269 Apply the tribonacci morphism 1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1} n times to 1, and concatenate the resulting string.

Original entry on oeis.org

1, 12, 1213, 1213121, 1213121121312, 121312112131212131211213, 12131211213121213121121312131211213121213121, 121312112131212131211213121312112131212131211213121121312121312112131213121121312
Offset: 0

Views

Author

Keywords

Comments

The number of letters in the n-th iteration is tribonacci(n+3) (that is, A000073(n+3)).

Crossrefs

A092782 is limit of these strings.

Programs

  • Mathematica
    FromDigits /@ NestList[ Flatten[ # /. {1 -> {1, 2}, 2 -> {1, 3}, 3 -> 1}] &, {1}, 7]
    (* Second program: *)
    FromDigits /@ SubstitutionSystem[{1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1}}, {1}, 7] (* Jean-François Alcover, Nov 12 2018 *)

Extensions

Definition edited by N. J. A. Sloane, Aug 06 2018

A106750 Define the "Fibonacci" morphism f: 1->12, 2->1 and let a(0) = 2; then a(n+1) = f(a(n)).

Original entry on oeis.org

2, 1, 12, 121, 12112, 12112121, 1211212112112, 121121211211212112121, 1211212112112121121211211212112112, 1211212112112121121211211212112112121121211211212112121
Offset: 0

Views

Author

N. J. A. Sloane, May 16 2005. Initial term 2 added by N. J. A. Sloane, Jul 05 2012

Keywords

Comments

a(n) converges to the Fibonacci word A003842.
a(n) has length Fibonacci(n+1) (cf. A000045).

References

  • Berstel, Jean. "Fibonacci words—a survey." In The book of L, pp. 13-27. Springer Berlin Heidelberg, 1986.
  • E. Bombieri and J. Taylor, Which distribution of matter diffracts? An initial investigation, in International Workshop on Aperiodic Crystals (Les Houches, 1986), J. de Physique, Colloq. C3, 47 (1986), C3-19 to C3-28.

Crossrefs

Programs

  • Mathematica
    FromDigits /@ NestList[ Flatten[ # /. {1 -> {1, 2}, 2 -> 1}] &, {2}, 8] (* Robert G. Wilson v, May 17 2005 *)

Extensions

More terms from Robert G. Wilson v, May 17 2005

A112658 Dean's Word: Omega 2,1: the trajectory of 0 -> 01, 1 -> 21, 2 -> 03, 3 -> 23.

Original entry on oeis.org

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

Views

Author

Jeremy Gardiner, Dec 27 2005

Keywords

Comments

Even-indexed terms of this sequence are the sequence A099545. - Alexandre Wajnberg, Jan 02 2006
Fractal sequence: odd terms are 0, 2, 0, 2,...; the subsets formed with the terms of index (2^i)n, with i>0, are identical: a(2n)=a(4n)=a(8n)=a(16n)=... - Alexandre Wajnberg, Jan 02 2006

Examples

			The first few iterations of the morphism, starting with 0:
Start: 0
Rules:
  0 --> 01
  1 --> 21
  2 --> 03
  3 --> 23
-------------
0:   (#=1)
  0
1:   (#=2)
  01
2:   (#=4)
  0121
3:   (#=8)
  01210321
4:   (#=16)
  0121032101230321
5:   (#=32)
  01210321012303210121032301230321
6:   (#=64)
  0121032101230321012103230123032101210321012303230121032301230321
/* _Joerg Arndt_, Jul 18 2012 */
		

Crossrefs

Essentially the same: A343180, also A122002 (map 0123 -> 1537), A125047 (map 0123 -> 2134).
Cf. A003324.

Programs

  • Mathematica
    Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {2, 1}, 2 -> {0, 3}, 3 -> {2, 3}}] &, {0}, 7] (* Robert G. Wilson v, Dec 27 2005 *)
  • PARI
    a(n) = 2*bittest(n,valuation(n,2)+1) + !(n%2); \\ Kevin Ryde, Sep 09 2020

Formula

It should be easy to prove that a(4n) = 0, a(4n+2) = 2, a(8n+1) = 1, a(8n+5) = 3, a(4n+3) = a(2n+1). This would imply that a(2n) = 2(n mod 2), a(2n+1) = 1 + 2*A014707(n), with A014707(n) the classical paperfolding curve. - Ralf Stephan, Dec 28 2005

A214318 Replace the word A214317(n) with its position in A007931.

Original entry on oeis.org

1, 4, 9, 19, 40, 81, 164, 329, 659, 1320, 2641, 5283, 10568, 21137, 42276, 84553, 169107, 338216, 676433, 1352868, 2705737, 5411475, 10822952, 21645905, 43291811, 86583624, 173167249, 346334500, 692669001, 1385338003, 2770676008, 5541352017, 11082704035
Offset: 1

Views

Author

N. J. A. Sloane, Jul 12 2012

Keywords

Examples

			A214317(5) = 12112 is the 40th term of A007931, so a(5)=40.
		

Crossrefs

Programs

  • Maple
    S:= proc(n) option remember;
          `if`(n<2, [2-n], [S(n-1)[], S(n-2)[]])
        end:
    a:= proc(n) option remember; local k;
          for k while nops(S(k))Alois P. Heinz, Jul 19 2012
  • Mathematica
    nesting = 6; A003849 = Flatten[Nest[{#, #[[1]]}&, {0, 1}, nesting]]; A182028[n_] := FromDigits[Take[A003849, n+1], 2]; a[n_] := A182028[n-1] + 2^n - 1; Table[a[n], {n, 1, Length[A003849]}] (* Jean-François Alcover, Feb 13 2016 *)

Formula

a(n) = A182028(n-1)+2^n-1.
a(n) = 2*a(n-1) + A003842(n-1) for n>1, a(1) = 1. - Alois P. Heinz, Jul 19 2012

Extensions

More terms from Alois P. Heinz, Jul 19 2012

A361756 Irregular triangle T(n, k), n >= 0, k = 1..A361757(n), read by rows; the n-th row lists the numbers k such that the Fibonacci numbers that appear in the dual Zeckendorf representation of k also appear in that of n.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 4, 0, 2, 5, 0, 1, 2, 3, 4, 5, 6, 0, 2, 7, 0, 1, 2, 3, 7, 8, 0, 1, 4, 9, 0, 2, 5, 7, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 4, 12, 0, 2, 5, 13, 0, 1, 2, 3, 4, 5, 6, 12, 13, 14, 0, 2, 7, 15, 0, 1, 2, 3, 7, 8, 15, 16
Offset: 0

Views

Author

Rémy Sigrist, Mar 23 2023

Keywords

Comments

In other words, the n-th row lists the numbers k such that A003754(1+n) AND A003754(1+k) = A003754(1+k) (where AND denotes the bitwise AND operator).
The dual Zeckendorf representation is also known as the lazy Fibonacci representation (see A356771 for further details).

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  -------------------------------------
   0  0
   1  0, 1
   2  0, 2
   3  0, 1, 2, 3
   4  0, 1, 4
   5  0, 2, 5
   6  0, 1, 2, 3, 4, 5, 6
   7  0, 2, 7
   8  0, 1, 2, 3, 7, 8
   9  0, 1, 4, 9
  10  0, 2, 5, 7, 10
  11  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
  12  0, 1, 4, 12
		

Crossrefs

See A361755 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

T(n, 1) = 0.
T(n, 2) = A003842(n - 1) for any n > 0.
T(n, A361757(n)) = n.

A380560 Rectangular array R, read by descending antidiagonals: (row 1) = (R(1,k)) = (A006337(k)), k >= 1; (row n+1) = inverse runlength sequence of row n; and R(n,1) = 1 for n >=1, See Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 27 2025

Keywords

Comments

For present purposes, all sequences to be considered consist entirely of 1s and 2s. If u and v are such sequences (infinite or finite), we call v an inverse runlength sequence of u if u is the runlength sequence of v. Each u has two inverse runlength sequences, one with first term 1 and the other with first term 2. Consequently, an inverse runlength array (in which each row after the first is an inverse runlength sequence of the preceding row) is determined by its first column. In this array, the first column consists solely of 1s. No two rows are identical.
Row 1: A006337; limiting row: A000002 (Kolakoski sequence).
Guide to related sequences (arrays):
A378282, limiting sequences of periodic inverse runlength arrays
A380560, (row 1)=A006337, periodic (column 1)=(1,...)
A380561, (row 1)=A006337, periodic (column 1)=(1,1,2,...)
A380562, (row 1)=A006337, periodic (column 1)=(1,2,2,...)
A380563, (row 1)=1+A010060, periodic (column 1)=(1,...)
A378303, (ro1 1)=A006337, periodic (column 1)=(2,2,1,...)
A378396, self-inverse runlength array, u = v = 1+A010060
A378397, self-inverse runlength array, u = v = A003842
A378398, self-inverse runlength array, u = v = A014675
A378399, self-inverse runlength array, u = v = A006337

Examples

			Corner:
  1 2 1 2 1 1 2 1 2 1 1 2 1 2 1 2 1 1 2 1
  1 2 2 1 2 2 1 2 1 1 2 1 1 2 1 2 2 1 2 2
  1 2 2 1 1 2 1 1 2 2 1 2 2 1 2 1 1 2 1 2
  1 2 2 1 1 2 1 2 2 1 2 1 1 2 2 1 2 2 1 1
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 1 2
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1
		

Crossrefs

Cf. A000002, A000012 (column 1), A006337.

Programs

  • Mathematica
    invR[seq_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,
        Partition[Riffle[seq, {1, 2}, {2, -1, 2}], 2]]];
    s = Differences[Table[Floor[n*Sqrt[2]], {n, 1, 21}]]; (* A006337 *)
    t = NestList[invR, s, 12];
    u[n_] := Take[t[[n]], 20];
    Table[u[n], {n, 1, 12}]  (* array *)
    v[n_, k_] := t[[n]][[k]];
    Table[v[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* sequence *)
    (* Peter J. C. Moses, Nov 13 2024 *)

A110006 a(n) = n-F(F(n)) where F(x)=A120613(x)=floor(phi*floor(x/phi)) and phi=(1+sqrt(5))/2.

Original entry on oeis.org

1, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 3, 2, 3, 3, 4
Offset: 1

Views

Author

Benoit Cloitre, Sep 02 2005

Keywords

Comments

To built the sequence start from the infinite Fibonacci word : b(n)=floor(n/phi)-floor((n-1)/phi) for n>=1 giving 0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,..... Then replace each 0 by the block {2,3,3} and each 1 by the block {2,3,3,4,3}. Append an initial 1.

References

  • Benoit Cloitre, On properties of irrational numbers related to the floor function, in preparation, 2005.

Crossrefs

Cf. A005614 (infinite Fibonacci binary word), A120613.
Cf. sequences for a(n) = n-F^k(n): A003842 (k=1), A110007 (k=3), A110010 (k=4), A110011 (k=5).

Programs

  • PARI
    a(n)=n-floor((1+sqrt(5))/2*floor((-1+sqrt(5))/2*floor((1+sqrt(5))/2*floor((-1+sqrt(5))/2*n))))

A110007 a(n) = n-F(F(F(n))) where F(x)=A120613(x)=floor(phi*floor(x/phi)) and phi=(1+sqrt(5))/2.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 4, 5, 4, 4, 5, 4, 5
Offset: 1

Views

Author

Benoit Cloitre, Sep 02 2005

Keywords

Comments

To build the sequence start from the infinite Fibonacci word: b(k)=floor(k/phi)-floor((k-1)/phi) for k>=1 giving 0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,..... Then replace each 0 by the block {4,5,4} and each 1 by the block {5,5,4,5,4}. Append the initial string {1,2,3,4}.

References

  • Benoit Cloitre, On properties of irrational numbers related to the floor function, in preparation, 2005.

Crossrefs

Cf. A005614 (infinite Fibonacci binary word), A120613.
Cf. sequences for a(n) = n-F^k(n): A003842 (k=1), A110006 (k=2), A110010 (k=4), A110011 (k=5).

Programs

  • Mathematica
    Join[{1,2,3,4},Flatten[Table[Floor[k/GoldenRatio]-Floor[(k-1)/ GoldenRatio],{k,30}]/.{0->{4,5,4},1->{5,5,4,5,4}}]] (* Harvey P. Dale, Dec 12 2017 *)
  • PARI
    F(x)=floor((1+sqrt(5))/2*floor((-1+sqrt(5))/2*x))
    a(n)=n-F(F(F(n)))

A110010 a(n) = n-F(F(F(F(n)))) where F(x)=A120613(x)=floor(phi*floor(x/phi)) and phi=(1+sqrt(5))/2.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7, 6, 6, 7, 6, 7, 6, 6, 7, 6, 5, 6, 6, 7
Offset: 1

Views

Author

Benoit Cloitre, Sep 02 2005

Keywords

Comments

To built the sequence start from the infinite Fibonacci word b(k)=floor(k/phi)-floor((k-1)/phi) for k>=1 giving 0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,..... Then replace each 0 by the block {5,6,6} and each 1 by the block {7, 6, 6, 7, 6}. Append the initial string {1,2,3,4}.

References

  • Benoit Cloitre, On properties of irrational numbers related to the floor function, in preparation, 2005.

Crossrefs

Cf. A005614 (infinite Fibonacci binary word), A120613.
Cf. sequences for a(n) = n-F^k(n): A003842 (k=1), A110006 (k=2), A110007 (k=3), A110011 (k=5).

Programs

  • PARI
    F(x)=floor((1+sqrt(5))/2*floor((-1+sqrt(5))/2*x)); a(n)=n-F(F(F(F(n))))
Previous Showing 31-40 of 53 results. Next