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.

A194031 Inverse permutation of A194030; contains every positive integer exactly once.

Original entry on oeis.org

1, 2, 4, 3, 7, 5, 6, 11, 8, 9, 10, 15, 16, 12, 13, 14, 20, 21, 28, 36, 22, 17, 18, 19, 26, 27, 35, 44, 45, 55, 66, 78, 91, 29, 23, 24, 25, 33, 34, 43, 53, 54, 65, 77, 90, 37, 30, 31, 32, 41, 42, 52, 63, 64, 76
Offset: 1

Views

Author

Clark Kimberling, Aug 12 2011

Keywords

Comments

See A194029.

Crossrefs

Cf. A194029, A194030 (inverse).

Programs

A194029 Natural fractal sequence of the Fibonacci sequence (1, 2, 3, 5, 8, ...).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Aug 12 2011

Keywords

Comments

Suppose that c(1), c(2), c(3), ... is an increasing sequence of positive integers with c(1) = 1, and that the sequence c(k+1) - c(k) is strictly increasing. The natural fractal sequence f of c is defined by:
If c(k) <= n < c(k+1), then f(n) = 1 + n - c(k).
This defines the present sequence a(n) = f(n) for c = A000045.
The natural interspersion of c is here introduced as the array given by T(n,k) =(position of k-th n in f). Note that c = (row 1 of T).
As a different example from the one considered here (c = A000045), let c = A000217 = (1, 3, 6, 10, 15, ...), the triangular numbers, so that f = (1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, ...) = A002260, and a northwest corner of T = A194029 is:
1 3 6 10 15 ...
2 4 7 11 16 ...
5 8 12 17 23 ...
9 13 18 24 31 ...
...
Since every number in the set N of positive integers occurs exactly once in this (and every) interspersion, a listing of the terms of T by antidiagonals comprises a permutation, p, of N; letting q denote the inverse of p, we thus have for each c a fractal sequence, an interspersion T, and two permutations of N:
c f T / p q
It appears that this is also a triangle read by rows in which row n lists the first A000045(n) positive integers, n >= 1 (see example). - Omar E. Pol, May 28 2012
This is true, because the sequence c = A000045 has the property that c(k+1) - c(k) = c(k-1), so the number of integers {1, 2, 3, ...} to be filled in from index n = c(k) to n = c(k+1)-1 is equal to c(k-1); see also the first EXAMPLE. - M. F. Hasler, Apr 23 2022

Examples

			The sequence (1, 2, 3, 5, 8, 13, ...) is used to place '1's in positions numbered 1, 2, 3, 5, 8, 13, ...  Then gaps are filled in with consecutive counting numbers:
  1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 5, 1, ...
From _Omar E. Pol_, May 28 2012: (Start)
Written as an irregular triangle the sequence begins:
  1;
  1;
  1, 2;
  1, 2, 3;
  1, 2, 3, 4, 5;
  1, 2, 3, 4, 5, 6, 7, 8;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21; ...
The row lengths are A000045(n).
(End)
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A000045 (Fibonacci numbers).
Cf. A066628, A194030, A194031 (natural interspersion of A000045 and inverse permutation).
Cf. A130853.

Programs

  • Maple
    T:= n-> $1..(<<0|1>, <1|1>>^n)[1, 2]:
    seq(T(n), n=1..10);  # Alois P. Heinz, Dec 11 2024
  • Mathematica
    z = 40;
    c[k_] := Fibonacci[k + 1];
    c = Table[c[k], {k, 1, z}]  (* A000045 *)
    f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
    f = Table[f[n], {n, 1, 800}]  (* A194029 *)
    r[n_] := Flatten[Position[f, n]]
    t[n_, k_] := r[n][[k]]
    TableForm[Table[t[n, k], {n, 1, 8}, {k, 1, 7}]]
    p = Flatten[Table[t[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A194030 *)
    q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A194031 *)
    Flatten[Range[Fibonacci[Range[66]]]] (* Birkas Gyorgy, Jun 30 2012 *)

Formula

a(n) = A066628(n)+1. - Alan Michael Gómez Calderón, Oct 30 2023

Extensions

Edited by M. F. Hasler, Apr 23 2022

A345252 2-1-Fibonacci cohort array, a rectangular array T(n,k) read by downward antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 11, 10, 8, 12, 19, 18, 16, 9, 20, 32, 31, 29, 17, 13, 33, 53, 52, 50, 30, 26, 14, 54, 87, 86, 84, 51, 47, 27, 15, 88, 142, 141, 139, 85, 81, 48, 28, 21, 143, 231, 230, 228, 140, 136, 82, 49, 42, 22, 232, 375, 374, 372, 229, 225, 137, 83, 76
Offset: 1

Views

Author

J. Parker Shectman, Jun 12 2021

Keywords

Comments

As a sequence, {a(n)} permutes the positive integers. As an array, {T(n,k)} is an interspersion-dispersion or I-D array (refer to Kimberling, 1st linked reference).
The top row of {T(n,k)} is A000071 or one less than the Fibonacci numbers = 1, 2, 4, 7, 12, ....
The top row of {T(n,k)} alternates lower and upper Wythoff numbers, A000201 and A001950, respectively, while all subsequent rows consist entirely of lower Wythoff numbers or entirely of upper Wythoff numbers (cf. generating tree A345253).
The left column (k = 1) of {T(n,k)} is n + F(Finv(n) + 1), for rows indexed n = 0, 1, 2, ..., where F(n) = A000045(n) are the Fibonacci numbers and Finv(n) = A130233(n) is the 'lower' Fibonacci inverse.
For rows indexed n = 0, 1, 2, ..., and columns indexed k = 1, 2, 3, ..., T(n,k) is given by T(n,k) = L^(k - 1) R(n), the image of n under a composition of branching functions L(n) = n + F(Finv(n)) and R(n) = n + F(Finv(n) + 1) (cf. generating tree A345253).
Write the positive integers in natural order (A000027) as a right-justified "tetrangle" or "irregular triangle" tableau with F(t) (Fibonacci number) entries on each row t, for t = 1, 2, 3, .... Then, columns of the tableau equal rows of {T(n,k)} (2nd linked reference):
1,
2,
3, 4,
5, 6, 7,
8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20,
...
(Duality with array A194030): With the right-justified tableau substituted by a left-justified tableau, the above procedure yields the array A194030, making {T(n,k)} and A194030 "cohort-dual" arrays, where "cohort" t is the F(t)-sized block (F(t + 1), ..., F(t + 2) - 1) of successive positive integers on row t of both tableaux (2nd link under references, which calls A194030 the "1-2-Fibonacci cohort array", by analogy).
Analogous to A345254, its left-justified tableau of the positive integers in cohorts with lengths powers of two replaced by the above right-justified tableau with the Fibonacci numbers as lengths of the cohorts.
(Duality with array A083047): Consider the labeled binary trees A345253(n) = A232560(A059893(n)) and A232560(n) = A345253(A059893(n)). Rows of array {T(n,k)} are the labels along maximal straight paths that always branch left in A345253, while rows of array A083047 are the labels along maximal straight paths that always branch left in A232560.
Column k of {T(n,k)} comprises the (sorted) labels in the k-th right clade of binary tree A232560, while column k of A083047 comprises the (sorted) labels in the k-th right clades of binary tree A345253. This makes the arrays {T(n,k)} and A083047 "blade-duals", blade being a contraction of branch-clade (cf. A345253 and 2nd linked reference).
(Mirror duality): A "mirror dual" I-D array or "inverse I-D array" (see Kimberling in 1st linked reference) is obtained by mirroring the tree A345253 cited above, i.e., taking maximal straight paths that always branch right in A345253. With three types of duality then, {T(n,k)} forms an octet of I-D arrays together with its cohort dual A194030 and mirror duals of these two, its blade dual A083047 and cohort dual A035513 of the latter, and their respective mirror duals, A132817 and A191436.
(Para-sequences): Sequences of row and column indices (see Conway-Sloane correspondence under A019586, citing Kimberling). For rows indexed n = 0, 1, 2, ..., the row index n of positive integer T(n,k) follows a right-justified tableau with F(t) entries on each row t, for t = 1, 2, 3, ..., in which an entry on row t equals the entry immediately above it on row t-1, if such exists, or otherwise equals the minimum positive integer excluded from the tableau so far:
0,
0,
1, 0,
2, 1, 0,
3, 4, 2, 1, 0,
5, 6, 7, 3, 4, 2, 1, 0,
...
For columns indexed k = 1, 2, 3, ..., the column index k of positive integer T(n,k) follows a right-justified tableau with F(t) entries on each row t, for t = 1, 2, 3, ..., in which an entry x+1 on row t equals one plus the entry x immediately above it on row t-1, if such exists, or otherwise equals one:
1,
2,
1, 3,
1, 2, 4,
1, 1, 2, 3, 5,
1, 1, 1, 2, 2, 3, 4, 6,
...

Examples

			Northwest corner of {T(n,k)}:
       k=1 k=2 k=3 k=4 k=5  k=6 ...
  n=0:   1,  2,  4,  7, 12,  20, ...
  n=1:   3,  6, 11, 19, 32,  53, ...
  n=2:   5, 10, 18, 31, 52,  86, ...
  n=3:   8, 16, 29, 50, 84, 139, ...
  n=4:   9, 17, 30, 51, 85, 140, ...
  ...
Northwest corner of {T(n,k)} in maximal Fibonacci expansion (see link):
       k=1             k=2                  k=3                       ...
  n=0: F(1),           F(1)+F(2),           F(1)+F(2)+F(3),           ...
  n=1: F(1)+F(3),      F(1)+F(3)+F(4),      F(1)+F(3)+F(4)+F(5),      ...
  n=2: F(1)+F(2)+F(4), F(1)+F(2)+F(4)+F(5), F(1)+F(2)+F(4)+F(5)+F(6), ...
  ...
Northwest corner of {T(n,k)} as "Fibonacci gaps," or differences between successive indices in maximal Fibonacci expansion above, (see link):
       k=1   k=2    k=3     k=4      k=5       k=6  ...
  n=0:   *,    1,    11,    111,    1111,    11111, ...
  n=1:   2,   21,   211,   2111,   21111,   211111, ...
  n=2:  12,  121,  1211,  12111,  121111,  1211111, ...
  n=3:  22,  221,  2211,  22111,  221111,  2211111, ...
  n=4: 122, 1221, 12211, 122111, 1221111, 12211111, ...
  ...
		

Crossrefs

Programs

  • Mathematica
    (* Define A000045 *)
    F[n_] := Fibonacci[n]
    (* Defined A130233 *)
    Finv[n_] := Floor[Log[GoldenRatio, Sqrt[5]n + 1]]
    (* Simplified Formula *)
    MatrixForm[Table[n + F[Finv[n] + k + 2] - F[Finv[n] + 2], {n, 0, 4}, {k, 1, 6}]]
    (* Branching Formula *)
    MatrixForm[Table[NestList[Function[# + F[Finv[#]]], n + F[Finv[n] + 1], 5], {n, 0, 4}]]

Formula

T(n,k) = n + F(Finv(n) + k + 2) - F(Finv(n) + 2), for rows indexed n = 0, 1, 2, ... and columns indexed k = 1, 2, 3, ..., where F(n) = A000045(n) and Finv(n) = A130233.
T(n,k) = L^(k - 1) R(n), where L(n) = n + F(Finv(n)) and R(n) = n + F(Finv(n) + 1).

A383977 Sequence of successive merge positions when Fibonacci-sorting an infinite list.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 5, 9, 10, 12, 11, 8, 14, 15, 17, 16, 19, 20, 18, 13, 22, 23, 25, 24, 27, 28, 26, 30, 31, 33, 32, 29, 21, 35, 36, 38, 37, 40, 41, 39, 43, 44, 46, 45, 42, 48, 49, 51, 50, 53, 54, 52, 47, 34, 56, 57, 59, 58, 61, 62, 60, 64, 65, 67, 66, 63, 69, 70, 72, 71, 74, 75
Offset: 1

Views

Author

Lucilla Blessing, May 16 2025

Keywords

Comments

Arises naturally from the Fibonacci sort algorithm (see links).
The restriction of this sequence to the first F(k) - 1 entries, where k >= 2 and F is the Fibonacci sequence (A000045), is a permutation.
The entire sequence is a permutation of the positive integers (every positive integer occurs exactly once).
Differs from A194030 starting at n=10 with a(10) = 12 whereas A194030(10) = 11. Despite their similar starts, the two sequences are unrelated.

Examples

			The first 7 merges when sorting a list of >= 8 values with Fibonacci sort are as follows:
  (8|7)6 5 4 3 2 1 ...
  (7 8|6)5 4 3 2 1 ...
   6 7 8(5|4)3 2 1 ...
  (6 7 8|4 5)3 2 1 ...
   4 5 6 7 8(3|2)1 ...
   4 5 6 7 8(2 3|1)...
  (4 5 6 7 8|1 2 3)...
   1 2 3 4 5 6 7 8 ...
The offsets of the "splitting positions" (marked by | characters) in the array are: 1, 2, 4, 3, 6, 7, 5...
These are a(1) through a(7).
		

Crossrefs

Cf. A000045.

Programs

  • Haskell
    -- "a" is a list of all sequence values
    -- e.g. "take 7 a" evaluates to [1, 2, 4, 3, 6, 7, 5]
    import Data.List
    fibs :: [Int]
    fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
    fib :: Int -> Int
    fib n = fibs !! n
    a :: [Int]
    a = concat $ map (\i -> let
      f = fib (i + 1)
      fPrev = fib i
      in (map (+ f) (take (fPrev - 1) a)) ++ [f]) [1..]
  • Python
    def fib(n):
      return n if n < 2 else fib(n - 1) + fib(n - 2)
    def a_first(n):
      # returns an array of the first n terms
      if n == 0: return []
      f = []
      i = 1
      while True:
        for j in range(fib(i) - 1):
          f.append(f[j] + fib(i + 1))
          if len(f) == n: return f
        f.append(fib(i + 1))
        if len(f) == n: return f
        i += 1
    

Formula

a(F(n+1) - 1) = F(n).
a(F(n) + k - 1) = F(n) + a(k), for 0 < k < F(n-1).

A345347 Find the largest k with F(k) <= n, where F(k) is the k-th Fibonacci number. a(n) = F(k+2) + n.

Original entry on oeis.org

1, 4, 7, 11, 12, 18, 19, 20, 29, 30, 31, 32, 33, 47, 48, 49, 50, 51, 52, 53, 54, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 199, 200, 201, 202, 203, 204
Offset: 0

Views

Author

Peter Munn, Jun 14 2021

Keywords

Comments

The terms consist of 1 together with numbers that appear in row m of the Wythoff array (A035513) if m is in the sequence.
a(0) = 1, otherwise a(n) is the number whose Zeckendorf representation is "10" followed by the Zeckendorf representation of n.
If we define an extended Zeckendorf representation to be the Zeckendorf representation with "01" appended, then the numbers in the sequence are exactly those whose extended representation starts 101... . This extended representation is a valid Fibonacci base representation if we specify the rightmost digit to have weight F(0) = 0.
Equivalently, for positive integer m, find the largest k with F(k) <= m, where F(k) is the k-th Fibonacci number. m is in the sequence if and only if m >= F(k) + F(k-2).
Numbers given to rabbits on Rabbit 1's branch of the generation tree described in the A035513 examples.
Equivalently, take the positive integers in turn, placing runs of them alternatively into 2 sets, with run lengths from A053602/A051792 (self-interleaved Fibonacci sequence) as follows:
set A: 1 0 1 1 2 3 5 ...
set B: 1 1 2 3 5 8 ...
The sequence lists the numbers in set A.

Examples

			The initial Fibonacci numbers are F(0)..F(5) = 0, 1, 1, 2, 3, 5.
For n = 0, the largest k with F(k) <= 0 is k = 0, so F(k+2) = F(2) = 1, so a(0) = 1 + 0 = 1.
For n = 1, the largest k with F(k) <= 1 is k = 2, so F(k+2) = F(4) = 3, so a(1) = 3 + 1 = 4.
For n = 4, the largest k with F(k) <= 4 is k = 4, so F(k+2) = F(6) = 8, so a(4) = 8 + 4 = 12.
In the paragraph that follows we use the Wythoff array-based definition from the start of the comments.
Every positive integer appears once (only) in the Wythoff array. 0 is not positive, so does not appear in the array, so is not in the sequence. 1 is in the sequence by definition. 2 appears in Wythoff row 0, and 0 is not in the sequence, so 2 is not in the sequence. 4 appears in Wythoff row 1, and 1 is in the sequence, so 4 is in the sequence.
		

Crossrefs

Appears to be column 1 of A194030.

Programs

  • Mathematica
    kmax=12;Flatten[Table[Range[Fibonacci[k]+Fibonacci[k-2],Fibonacci[k+1]-1],{k,2,kmax}]] (* Paolo Xausa, Jan 02 2022 *)
    A108852[n_]:=1+Floor[Log[GoldenRatio,1+n*Sqrt[5]]];
    nterms=100;Table[n+Fibonacci[1+A108852[n]],{n,0,nterms-1}](* Paolo Xausa, Jan 02 2022 *)
  • PARI
    a(n) = my(k=0); while(fibonacci(k)<=n, k=k+1); n+fibonacci(k+1)

Formula

a(n) = A000045(A108852(n)+1) + n.
Union_{k >= 2} {m : F(k)+F(k-2) <= m < F(k+1)}, where F(k) = A000045(k).
Showing 1-5 of 5 results.