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.

A364800 The number of iterations that n requires to reach 1 under the map x -> A356874(x).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is well-defined since A356874(1) = 1, and A356874(n) < n for n >= 2.

Examples

			For n = 3 the trajectory is 3 -> 2 -> 1. The number of iterations is 2, thus a(3) = 2.
		

Crossrefs

Cf. A356874.
Similar sequences: A003434, A364801.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
    a[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; Array[a, 100]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
    a(n) = if(n == 1, 0, a(f(n)) + 1);

Formula

a(n) = a(A356874(n)) + 1, for n >= 2.

A364802 Smallest number that reaches 1 after n iterations of the map x -> A356874(x).

Original entry on oeis.org

1, 2, 3, 5, 11, 29, 117, 879, 15279, 963957, 392158939, 2059426052079
Offset: 0

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is the smallest number k such that A364800(k) = n.

Crossrefs

Similar sequences: A007755, A364803.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
    iternum[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; (* A364800 *)
    seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 1, kmax}]; s]
    seq[10^6]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
    iternum(n) = if(n == 1, 0, iternum(f(n)) + 1); \\ A364800
    lista(kmax) = {my(imax = -1, i1); for(k = 1, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}

Extensions

a(11) from Martin Ehrenstein, Aug 26 2023

A000121 Number of representations of n as a sum of Fibonacci numbers (1 is allowed twice as a part).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of partitions into distinct Fibonacci parts (1 counted as two distinct Fibonacci numbers).
Inverse Euler transform of sequence has generating function sum_{n>0} x^F(n)-x^{2F(n)} where F() is Fibonacci.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Least inverse is A083853.

Programs

  • Maple
    with(combinat): p := product((1+x^fibonacci(i)), i=1..25): s := series(p,x,1000): for k from 0 to 250 do printf(`%d,`,coeff(s,x,k)) od:
  • Mathematica
    imax = 20; p = Product[1+x^Fibonacci[i], {i, 1, imax}]; CoefficientList[p, x][[1 ;; Fibonacci[imax]+1]] (* Jean-François Alcover, Feb 04 2016, adapted from Maple *)
    nmax = 91; s=Total/@Subsets[Select[Table[Fibonacci[i], {i, nmax}], # <= nmax &]];
    Table[Count[s, n], {n, 0, nmax}] (* Robert Price, Aug 17 2020 *)
  • PARI
    a(n)=local(A,m,f); if(n<0,0,A=1+x*O(x^n); m=1; while((f=fibonacci(m))<=n,A*=1+x^f; m++); polcoeff(A,n))

Formula

a(0) = 1; for n >= 1, a(n) = A000119(n) + A000119(n-1). - Peter Munn, Jan 19 2018

Extensions

More terms from James Sellers, Jun 18 2000

A287870 The extended Wythoff array (the Wythoff array with two extra columns) read by antidiagonals downwards.

Original entry on oeis.org

0, 1, 1, 1, 3, 2, 2, 4, 4, 3, 3, 7, 6, 6, 4, 5, 11, 10, 9, 8, 5, 8, 18, 16, 15, 12, 9, 6, 13, 29, 26, 24, 20, 14, 11, 7, 21, 47, 42, 39, 32, 23, 17, 12, 8, 34, 76, 68, 63, 52, 37, 28, 19, 14, 9, 55, 123, 110, 102, 84, 60, 45, 31, 22, 16, 10, 89, 199, 178, 165, 136, 97, 73, 50, 36, 25, 17, 11
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2017

Keywords

Comments

From Peter Munn, Apr 28 2025: (Start)
Each row in the Wythoff array, A035513, and this extended array satisfies the Fibonacci recurrence; that is each term after the first 2 is the sum of the preceding 2 terms.
We use F_i to denote the i-th Fibonacci term, A000045(i). In particular, we refer below to F_0 = 0, F_1 = 1 and F_2 = 1 several times. Note that to fully understand the description of the relationship between neighboring columns it is important to distinguish F_1 and F_2, although they have the same integer value. Similarly, the identity of an array term should be understood here as including its position in the array, not only its integer value.
The terms of this extended Wythoff array map 1:1 onto the nonempty finite subsets of Fibonacci terms (from F_0 onwards) that do not include both F_i and F_{i+1} for any i. With this map each term is the sum of its subset image. See the table in the examples.
Full description of the mapping with its relationship to A035513:
The (unextended) Wythoff array A035513 includes every positive integer exactly once. So, using the Zeckendorf representation (see link below), the array terms map 1:1 to nonempty finite subsets of the Fibonacci terms from F_2 onwards -- more precisely, onto those that do not include both F_i and F_{i+1} for any i. (Again, each array term is the sum of the Fibonacci numbers from the relevant subset.)
As shown in the Kimberling 1995 link, when we proceed from one term to the next in a row, the indices of the Fibonacci terms in the corresponding subset are incremented. When we proceed leftwards, the indices are decremented, with the subsets for the leftmost column being those that include F_2.
And when we add 2 columns on the left of the Wythoff array, the mapping continues to decrement the indices, so the corresponding extra subsets have F_0 (new leftmost column) or F_1 as their first Fibonacci term.
Thus the terms of this extended Wythoff array map 1:1 onto the nonempty finite subsets of Fibonacci terms (from F_0 onwards) that do not include both F_i and F_{i+1} for any i. The leftmost column is the nonnegative integers: if we were to remove F_0 (value 0) from the subset for an integer in this column, the subset would form the Zeckendorf representation of the integer, as subsets do in the unextended array.
(End)

Examples

			The extended Wythoff array is the Wythoff array with two extra columns, giving the row number n and A000201(n), separated from the main array by a vertical bar:
   0   1 |  1   2   3    5    8   13   21   34    55    89   144 ...
   1   3 |  4   7  11   18   29   47   76  123   199   322   521 ...
   2   4 |  6  10  16   26   42   68  110  178   288   466   754 ...
   3   6 |  9  15  24   39   63  102  165  267   432   699  1131 ...
   4   8 | 12  20  32   52   84  136  220  356   576   932  1508 ...
   5   9 | 14  23  37   60   97  157  254  411   665  1076  1741 ...
   6  11 | 17  28  45   73  118  191  309  500   809  1309  2118 ...
   7  12 | 19  31  50   81  131  212  343  555   898  1453  2351 ...
   8  14 | 22  36  58   94  152  246  398  644  1042  1686  2728 ...
   9  16 | 25  41  66  107  173  280  453  733  1186  1919  3105 ...
  10  17 | 27  44  71  115  186  301  487  788  1275  2063  3338 ...
  11  19 | 30  49  79 ...
  12  21 | 33  54  87 ...
  13  22 | 35  57  92 ...
  14  24 | 38  62 ...
  15  25 | 40  65 ...
  16  27 | 43  70 ...
  17  29 | 46  75 ...
  18  30 | 48  78 ...
  19  32 | 51  83 ...
  20  33 | 53  86 ...
  21  35 | 56  91 ...
  22  37 | 59  96 ...
  23  38 | 61  99 ...
  24  40 | 64 ...
  25  42 | 67 ...
  26  43 | 69 ...
  27  45 | 72 ...
  28  46 | 74 ...
  29  48 | 77 ...
  30  50 | 80 ...
  31  51 | 82 ...
  32  53 | 85 ...
  33  55 | 88 ...
  34  56 | 90 ...
  35  58 | 93 ...
  36  59 | 95 ...
  37  61 | 98 ...
  38  63 | ...
  ...
From _Peter Munn_, Sep 12 2022: (Start)
In the table below, the array terms are shown in the small box at the bottom right of the cells. At the top of each cell is shown a pattern of Fibonacci terms, with "*" indicating a Fibonacci term that appears below it. Those Fibonacci terms sum to the array term. The pattern never includes "**", which would indicate 2 consecutive Fibonacci terms. Note that a Fibonacci term shown as "1" in the 2nd column is F_1, so it may accompany "2", which is F_3. In other columns a Fibonacci term shown as "1" is F_2 and may not accompany "2".
+----------+-----------+------------+------------+------------+
|      *   |      *    |       *    |       *    |       *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|       |0 |       | 1 |        | 1 |        | 2 |        | 3 |
|----------+-----------+------------+------------+------------|
|    * *   |    * *    |     * *    |     * *    |     * *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|    1  |1 |    2  | 3 |     3  | 4 |     5  | 7 |     8  |11 |
|----------+-----------+------------+------------+------------|
|   *  *   |   *  *    |    *  *    |    *  *    |    *  *    |
|   2  0 __|   3  1 ___|    5  1 ___|    8  2 ___|   13  3 ___|
|       |2 |       | 4 |        | 6 |        |10 |        |16 |
|----------+-----------+------------+------------+------------|
|  *   *   |  *   *    |   *   *    |   *   *    |   *   *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|  3    |3 |  5    | 6 |   8    | 9 |  13    |15 |  21    |24 |
|----------+-----------+------------+------------+------------|
|  * * *   |  * * *    |   * * *    |   * * *    |   * * *    |
|      0   |      1    |       1    |       2    |       3    |
|    1   __|    2   ___|     3   ___|     5   ___|     8   ___|
|  3    |4 |  5    | 8 |   8    |12 |  13    |20 |  21    |32 |
|----------+-----------+------------+------------+------------|
| *    *   | *    *    |  *    *    |  *    *    |  *    *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
| 5     |5 | 8     | 9 | 13     |14 | 21     |23 | 34     |37 |
|----------+-----------+------------+------------+------------|
| *  * *   | *  * *    |  *  * *    |  *  * *    |  *  * *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
| 5  1  |6 | 8  2  |11 | 13  3  |17 | 21  5  |28 | 34  8  |45 |
|----------+-----------+------------+------------+------------|
| * *  *   | * *  *    |  * *  *    |  * *  *    |  * *  *    |
|   2  0 __|   3  1 ___|    5  1 ___|    8  2 ___|   13  3 ___|
| 5     |7 | 8     |12 | 13     |19 | 21     |31 | 34     |50 |
+----------+-----------+------------+------------+------------+
If we replace the Fibonacci terms 0, 1, 1, 2, 3, 5, ... in the main part of the cells with the powers of 2 (1, 2, 4, ...) the sums in the small boxes become the terms of A356875. From this may be seen a relationship to A054582.
- - - - -
Each row of the extended Wythoff array satisfies the Fibonacci recurrence, and may be further extended to the left using this recurrence backwards:
... -1   1   0   1 |  1   2    3    5 ...
... -1   2   1   3 |  4   7   11   18 ...
...  0   2   2   4 |  6  10   16   26 ...
...  0   3   3   6 |  9  15   24   39 ...
...  0   4   4   8 | 12  20   32   52 ...
...  1   4   5   9 | 14  23   37   60 ...
...  1   5   6  11 | 17  28   45   73 ...
...  2   5   7  12 | 19  31   50   81 ...
...  2   6   8  14 | 22  36   58   94 ...
    ...
...  5  10  15  25 | 40  65  105  170 ...
    ...
Note that multiples (*2, *3 and *4) of the top (Fibonacci sequence) row appear a little below, but shifted 2 columns to the left. Larger multiples appear further down and shifted further to the left, starting with row 15, where the terms are 5 times those in the top row and shifted 4 columns leftwards.
(End)
		

Crossrefs

Subtables: A035513 (the Wythoff array), A287869.
Related as a subtable of A357316 as A054582 is to A130128 (as a square).
See A014417 for sequences related to Zeckendorf representation.
See the formula section for the relationships with A003622, A022341, A054582, A356874, A356875.

Formula

From Peter Munn, Apr 29 2025: (Start)
A(n,k) = A356874(floor(m/2)), where m = A356875(n-1, k-1) = A054582(k-1, (A022341(n-1)-1)/2).
A(n,k) = A357316(A003622(n), k-1).
(End)

A356875 Square array, n >= 0, k >= 0, read by descending antidiagonals. A(n,k) = A022341(n)*2^k.

Original entry on oeis.org

1, 2, 5, 4, 10, 9, 8, 20, 18, 17, 16, 40, 36, 34, 21, 32, 80, 72, 68, 42, 33, 64, 160, 144, 136, 84, 66, 37, 128, 320, 288, 272, 168, 132, 74, 41, 256, 640, 576, 544, 336, 264, 148, 82, 65, 512, 1280, 1152, 1088, 672, 528, 296, 164, 130, 69, 1024, 2560, 2304, 2176, 1344, 1056, 592, 328, 260, 138, 73
Offset: 0

Views

Author

Peter Munn, Sep 02 2022

Keywords

Comments

The nonzero Fibbinary numbers (A003714) arranged in rows where each successive term is twice the preceding term; a (transposed) Fibbinary equivalent of A054582.
Write the first term in each row as Sum_{i in S} 2^i, where S is a set of nonnegative integers, then n = Sum_{i in S} F_i, where F_i is the i-th Fibonacci number, A000045(i).
More generally, if the terms are represented in binary, and the binary weighting of the digits (2^0, 2^1, 2^2, ...) is replaced with Fibonacci weighting (F_0, F_1, F_2, ...), we get the extended Wythoff array (A287870). If the weighting of the Zeckendorf representation is used (F_2, F_3, F_4, ...), we get the (unextended) Wythoff array (A035513).

Examples

			Square array A(n,k) begins:
   1    2    4    8    16    32    64   128 ...
   5   10   20   40    80   160   320   640 ...
   9   18   36   72   144   288   576  1152 ...
  17   34   68  136   272   544  1088  2176 ...
  21   42   84  168   336   672  1344  2688 ...
  33   66  132  264   528  1056  2112  4224 ...
  37   74  148  296   592  1184  2368  4736 ...
  41   82  164  328   656  1312  2624  5248 ...
  65  130  260  520  1040  2080  4160  8320 ...
  69  138  276  552  1104  2208  4416  8832 ...
  ...
The defining characteristic of a Fibbinary number is that its binary representation does not have a 1 followed by another 1. Shown in binary the array begins:
      1      10      100      1000 ...
    101    1010    10100    101000 ...
   1001   10010   100100   1001000 ...
  10001  100010  1000100  10001000 ...
  10101  101010  1010100  10101000 ...
  ...
		

Crossrefs

See the comments for the relationship to: A000045, A003714, A035513, A054582, A287870.
See the formula section for the relationship to: A022290, A022341, A356874.

Formula

A(n,0) = A022341(n), otherwise A(n,k) = 2*A(n,k-1).
A287870(n+1,k+1) = A356874(floor(A(n,k)/2)).
A035513(n+1,k+1) = A022290(A(n,k)).

A357316 A distension of the Wythoff array by inclusion of intermediate rows. Square array A(n,k), n >= 0, k >= 0, read by descending antidiagonals. If S is the set such that Sum_{i in S} F_i is the Zeckendorf representation of n then A(n,k) = Sum_{i in S} F_{i+k-2}.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 1, 0, 3, 3, 3, 3, 2, 0, 5, 5, 5, 4, 3, 2, 0, 8, 8, 8, 7, 5, 4, 3, 0, 13, 13, 13, 11, 8, 6, 4, 3, 0, 21, 21, 21, 18, 13, 10, 7, 5, 3, 0, 34, 34, 34, 29, 21, 16, 11, 8, 6, 4, 0, 55, 55, 55, 47, 34, 26, 18, 13, 9, 6, 4
Offset: 0

Views

Author

Peter Munn, Sep 23 2022

Keywords

Comments

Note the Zeckendorf representation of 0 is taken to be the empty sum.
The Wythoff array A035513 is the subtable formed by rows 3, 11, 16, 24, 32, ... (A035337). If, instead, we use rows 2, 7, 10, 15, 20, ... (A035336) or 1, 4, 6, 9, 12, ... (A003622), we get the Wythoff array extended by 1 column (A287869) or 2 columns (A287870) respectively.
Similarly, using A035338 truncates by 1 column; and in general if S_k is column k of the Wythoff array then the rows here numbered by S_k form an array A_k that starts with column k-2 of the Wythoff array. (A_0 and A_1 are the 2 extended arrays mentioned above.) As every positive integer occurs exactly once in the Wythoff array, every row except row 0 of A(.,.) is a row of exactly one such A_k.
Columns 4 onwards match certain columns of the multiplication table for Knuth's Fibonacci (or circle) product (extended variant - see A135090 and formula below).
For k > 0, the first row to contain k is A348853(k).

Examples

			Example for n = 4, k = 3. The Zeckendorf representation of 4 is F_4 + F_2 = 3 + 1. So the values of i in the sums in the definition are 4 and 2; hence A(4,3) = Sum_{i = 2,4} F_{i+k-2} = F_{4+3-2} + F_{2+3-2} = F_5 + F_3 = 5 + 2 = 7.
Square array A(n,k) begins:
   n\k| 0   1    2    3    4    5    6
  ----+--------------------------------
   0  | 0   0    0    0    0    0    0  ...
   1* | 0   1    1    2    3    5    8  ...
   2  | 1   1    2    3    5    8   13  ...
   3  | 1   2    3    5    8   13   21  ...
   4* | 1   3    4    7   11   18   29  ...
   5  | 2   3    5    8   13   21   34  ...
   6* | 2   4    6   10   16   26   42  ...
   7  | 3   4    7   11   18   29   47  ...
   8  | 3   5    8   13   21   34   55  ...
   9* | 3   6    9   15   24   39   63  ...
  10  | 4   6   10   16   26   42   68  ...
  11  | 4   7   11   18   29   47   76  ...
  12* | 4   8   12   20   32   52   84  ...
  ...
The asterisked rows form the start of the extended Wythoff array (A287870).
		

Crossrefs

Columns, some differing initially: A005206 (1), A022342 (3), A026274 (4), A101345 (5), A101642 (6).
Rows: A000045 (1), A000204 (4).
Related to subtable A287870 as A130128 (as a square) is to A054582.
Other subtables: A035513, A287869.
See the comments for the relationship to A003622, A035336, A035337, A035338, A348853.
See the formula section for the relationship to A003714, A022342, A135090, A356874.

Programs

  • PARI
    A5206(m) = if(m>0,m-A5206(A5206(m-1)),0)
    A(n,k) = if(k==2,n, if(k==1,A5206(n), if(k==0,n-A5206(n), A(n,k-2)+A(n,k-1)))) \\ simple encoding of formulas, not efficient

Formula

For n >= 0, k >= 0 unless stated otherwise:
A(n,k) = A356874(floor(A003714(n)*2^(k-1))).
A(n,1) = A005206(n).
A(n,2) = n.
A(n,k+2) = A(n,k) + A(n,k+1).
A(A022342(n+1),k) = A(n,k+1).
For k >= 4, A(n,k) = A135090(n,A000045(k-2)).
Showing 1-6 of 6 results.