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

A022775 Place where n-th 1 occurs in A007336.

Original entry on oeis.org

1, 3, 6, 11, 17, 25, 34, 44, 56, 69, 84, 100, 117, 136, 156, 178, 201, 226, 252, 279, 308, 338, 370, 403, 437, 473, 510, 549, 589, 631, 674, 718, 764, 811, 860, 910, 961, 1014, 1068, 1124, 1181, 1239, 1299, 1360, 1423, 1487, 1553, 1620, 1688
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007336.

Programs

  • PARI
    a(n)=1+sum(k=1,n-1,ceil(sqrt(2)*k)) \\ Benoit Cloitre, Jan 24 2009

Formula

a(n) = 1 + Sum_{k=1..n-1} ceiling(sqrt(2)*k). - Benoit Cloitre, Jan 24 2009

A022776 Place where n-th 1 occurs in A023115.

Original entry on oeis.org

1, 2, 4, 7, 10, 14, 19, 24, 30, 37, 45, 53, 62, 72, 82, 93, 105, 118, 131, 145, 160, 175, 191, 208, 225, 243, 262, 282, 302, 323, 345, 367, 390, 414, 439, 464, 490, 517, 544, 572, 601, 630, 660, 691, 723, 755, 788, 822, 856, 891, 927, 964, 1001
Offset: 1

Views

Author

Keywords

Comments

Positions of the integers when the numbers a + b*sqrt(2) are arranged in increasing order. - Clark Kimberling, Mar 16 2015
It seems the name of this sequence could also be "Indices where records occur in A007336". - Ivan N. Ianakiev, Sep 09 2019

Examples

			The ordering of numbers a+b*r, where r = sqrt(2) as in Comments, begins with 0, 1, r, 2, 1+r, 2r, 3, 2+r, 1+2r, 4, ... in which the positions of integers are 1, 2, 4, 7, 10.
		

Crossrefs

Programs

  • Mathematica
    t = Table[n + 1 + Sum[Floor[(n - k)/Sqrt[2]], {k, 0, n}], {n, 0, 200}] (* A022776 *)
    Differences[t] (* A049474 *) (* Clark Kimberling, Mar 14 2015 *)
  • PARI
    a(n)=1+sum(k=1,n-1,ceil(k/sqrt(2))) \\ Benoit Cloitre, Jan 24 2009

Formula

a(n) = 1 + Sum_{k=1..n-1} ceiling(r*k) where r=1/sqrt(2). - Benoit Cloitre, Jan 24 2009

A283939 Interspersion of the signature sequence of sqrt(2).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 19 2017

Keywords

Comments

Row n is the ordered sequence of numbers k such that A007336(k)=n. As a sequence, A283939 is a permutation of the positive integers. As an array, A283939 is the joint-rank array (defined at A182801) of the numbers {i+j*r}, for i>=1, j>=1, where r = sqrt(2). This is a transposable interspersion; i.e., every row intersperses all other rows, and every column intersperses all other columns.

Examples

			Northwest corner:
  1   3   6   11   17   25   34   44   56
  2   5   9   15   22   31   41   52   65
  4   8   13  20   28   38   49   61   75
  7   12  18  26   35   46   58   71   86
  10  16  23  32   42   54   67   81   97
  14  21  29  39   50   63   77   91   109
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; 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}] (* A022776, col 1 of A283939 *)
    v = Table[s[n], {n, 0, z}] (* A022775, row 1 of A283939*)
    w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
    Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283939, array *)
    p = Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283939, sequence *)
  • PARI
    r = sqrt(2);
    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(10) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    sqrt2 = 2 ** 0.5
    def s(n): return 1 if n<1 else s(n - 1) + 1 + int(n*sqrt2)
    def p(n): return n + 1 + sum([int((n - k)/sqrt2) 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
Showing 1-3 of 3 results.