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

A255977 The number of numbers j+k*r <= n, where r = golden ratio and j and k are nonnegative integers.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 17, 22, 27, 33, 40, 47, 55, 64, 73, 83, 93, 104, 116, 128, 141, 154, 168, 183, 198, 214, 231, 248, 266, 284, 303, 323, 343, 364, 386, 408, 431, 454, 478, 503, 528, 554, 580, 607, 635, 663, 692, 722, 752, 783, 814, 846, 879, 912, 946, 980
Offset: 1

Views

Author

Clark Kimberling, Mar 14 2015

Keywords

Comments

The difference sequence is A019446.
From Thomas Anton, Oct 22 2018: (Start)
It appears that this sequence (apart from the first term) can be obtained through the following sieving process. Start with the positive integers. Then, at each stage, circle the first remaining number that has not already been circled, and delete all terms in the subsequence of terms that were not circled in previous stages with circled indices that have not yet been deleted. E.g., the first few iterations are
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
We circle 1, and take the subsequence of previously uncircled numbers, which is the entire sequence, and delete all terms with circled indices that have not been deleted, in this case, just the 1st, 1.
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
We circle 2, and take the previously uncircled subsequence, which is again the entire sequence, and delete all terms with circled indices that have not been deleted, just the 2nd, 3.
(2), 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
We circle 4, and take the previously uncircled subsequence, which is all terms of the sequence except 2, and delete all terms in that subsequence with circled indices (as terms of the subsequence) that have not been deleted, the 2nd and 4th, respectively the 3rd and 5th terms of the entire sequence, 5 and 7.
(2), (4), 6, 8, 9, 10, 11, 12, 13, 14, ...
etc.
(End)

Crossrefs

Programs

  • Maple
    t:=(1+sqrt(5))/2: a:=n->n+1+add(floor((n-k)/t),k=0..n): seq(a(n),n=0..55); # Muniru A Asiru, Oct 24 2018
  • Mathematica
    Table[n + 1 + Sum[Floor[(n - k)/GoldenRatio], {k, 0, n}], {n, 0, 200}]

Formula

a(n) = n + 1 + Sum{floor[(n - k)/tau], k = 0..n}, where tau = (1 + sqrt(5))/2.
a(n) = A054347(n-1) - (n^2 - 3*n)/2. - Alan Michael Gómez Calderón, Nov 21 2024

A283941 Interspersion of the signature sequence of sqrt(5).

Original entry on oeis.org

1, 4, 2, 9, 6, 3, 16, 12, 8, 5, 25, 20, 15, 11, 7, 37, 30, 24, 19, 14, 10, 51, 43, 35, 29, 23, 18, 13, 67, 58, 49, 41, 34, 28, 22, 17, 85, 75, 65, 56, 47, 40, 33, 27, 21, 106, 94, 83, 73, 63, 54, 46, 39, 32, 26, 129, 116, 103, 92, 81, 71, 61, 53, 45, 38, 31
Offset: 1

Views

Author

Clark Kimberling, Mar 19 2017

Keywords

Comments

Row n is the ordered sequence of numbers k such that A023117(k)=n. As a sequence, A283941 is a permutation of the positive integers. This is a transposable interspersion; i.e., every row intersperses all other rows, and every column intersperses all other columns.

Examples

			Northwest corner:
  1   4   9   16  25  37  51  67
  2   6   12  20  30  43  58  76
  3   8   15  24  35  49  65  83
  5   11  19  29  41  56  73  92
  7   14  23  34  47  63  81  101
  10  18  28  40  54  71  90  111
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[5]; z = 100;
    s[0] = 1; s[n_] := s[n] = s[n - 1] + 1 + Floor[n*r];
    u = Table[n + 1 + Sum[Floor[(n - k)/r], {k, 0, n}], {n, 0, z}] (* A022780 , col 1 of A283941 *)
    v = Table[s[n], {n, 0, z}] (* A022779, row 1 of A283941*)
    w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
    Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283941, array *)
    Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283941, sequence *)
  • PARI
    r = sqrt(5);
    z = 100;
    s(n) = if(n<1, 1, s(n - 1) + 1 + floor(n*r));
    p(n) = n + 1 + sum(k=0, n, floor((n - k)/r));
    u = v = vector(z + 1);
    for(n=1, 101, (v[n] = s(n - 1)));
    for(n=1, 101, (u[n] = p(n - 1)));
    w(i, j) = u[i] + v[j] + (i - 1) * (j - 1) - 1;
    tabl(nn) = {for(n=1, nn, for(k=1, n, print1(w(k, n - k + 1), ", "); );
    print(); ); };
    tabl(20) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    from sympy import sqrt
    import math
    def s(n): return 1 if n<1 else s(n - 1) + 1 + int(math.floor(n*sqrt(5)))
    def p(n): return n + 1 + sum([int(math.floor((n - k)/sqrt(5))) for k in range(0, n+1)])
    v=[s(n) for n in range(0, 101)]
    u=[p(n) for n in range(0, 101)]
    def w(i,j): return u[i - 1] + v[j - 1] + (i - 1) * (j - 1) - 1
    for n in range(1, 11):
        print([w(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 21 2017

Extensions

Edited by Clark Kimberling, Feb 27 2018
Showing 1-2 of 2 results.