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

A262057 Array based on the Stanley sequence S(0), A005836, by antidiagonals.

Original entry on oeis.org

0, 2, 1, 7, 5, 3, 21, 8, 6, 4, 23, 22, 16, 11, 9, 64, 26, 24, 17, 14, 10, 69, 65, 50, 25, 19, 15, 12, 71, 70, 67, 53, 48, 20, 18, 13, 193, 80, 78, 68, 59, 49, 34, 29, 27, 207, 194, 152, 79, 73, 62, 51, 35, 32, 28, 209, 208, 196, 161, 150, 74, 63, 52, 43, 33, 30
Offset: 1

Views

Author

Max Barrentine, Nov 29 2015

Keywords

Comments

This array is similar to a dispersion in that the first column is the minimal nonnegative sequence that contains no 3-term arithmetic progression, and each next column is the minimal sequence consisting of the numbers rejected from the previous column that contains no 3-term arithmetic progression.
A100480(n) describes which column n is sorted into.
The columns of the array form the greedy partition of the nonnegative integers into sequences that contain no 3-term arithmetic progression. - Robert Israel, Feb 03 2016

Examples

			From the top-left corner, this array starts:
   0   2   7  21  23  64
   1   5   8  22  26  65
   3   6  16  24  50  67
   4  11  17  25  53  68
   9  14  19  48  59  73
  10  15  20  49  62  74
		

Crossrefs

First column is A005836.
First row is A265316.

Programs

  • MATLAB
    function  A = A262057( M, N )
    % to get first M antidiagonals using x up to N
    B = cell(1,M);
    F = zeros(M,N+1);
    countdowns = [M:-1:1];
    for x=0:N
        if max(countdowns) == 0
            break
        end
        for i=1:M
            if F(i,x+1) == 0
                newforb = 2*x - B{i};
                newforb = newforb(newforb <= N & newforb >= 1);
                F(i,newforb+1) = 1;
                B{i}(end+1) = x;
                countdowns(i) = countdowns(i)-1;
                break
            end
        end
    end
    if max(countdowns) > 0
        [~,jmax] = max(countdowns);
        jmax = jmax(1);
        error ('Need larger N: B{%d} has only %d elements',jmax,numel(B{jmax}));
    end
    A = zeros(1,M*(M+1)/2);
    k = 0;
    for n=1:M
        for i=1:n
            k=k+1;
            A(k) = B{n+1-i}(i);
        end
    end
    end % Robert Israel, Feb 03 2016
  • Maple
    M:= 20: # to get the first M antidiagonals
    for i from 1 to M do B[i]:= {}: F[i]:= {}: od:
    countdowns:= Vector(M,j->M+1-j):
    for x from 0 while max(countdowns) > 0 do
      for i from 1 do
         if not member(x, F[i]) then
           F[i]:= F[i] union map(y -> 2*x-y, B[i]);
           B[i]:= B[i] union {x};
           countdowns[i]:= countdowns[i] - 1;
         break
        fi
      od;
    od:
    seq(seq(B[n+1-i][i], i=1..n),n=1..M); # Robert Israel, Feb 03 2016

Formula

A006997(A(n, k)) = k - 1. - Rémy Sigrist, Jan 06 2024

A268811 Sequence of positive integers where each is chosen to be as small as possible subject to the condition that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a geometric progression.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 5, 5, 6, 5, 5, 6, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 5, 5, 6, 5, 5, 6, 2, 3, 3, 5, 5, 6, 5, 5, 6, 6, 7, 7, 6, 7, 7, 8, 8, 10, 6, 7, 7, 6, 7, 7, 8, 8, 10, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 3, 5, 5, 6, 5, 5, 6, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2
Offset: 1

Views

Author

Aaron David Fairbanks, Feb 13 2016

Keywords

Comments

Apparently: all terms belong to A000452, and for any k > 0, the value A000452(k) first appears at index A265316(k+1). - Rémy Sigrist, May 13 2021

Crossrefs

Programs

  • C
    // See Links section.
  • Python
    A268811_list = []
    for n in range(1000):
        i, j, b = 1, 1, set()
        while n-2*i >= 0:
            b.add(A268811_list[n-i]**2/A268811_list[n-2*i])
            i += 1
            while j in b:
                b.remove(j)
                j += 1
        A268811_list.append(j)
    

A368808 Indices of records in A368798.

Original entry on oeis.org

0, 1, 3, 5, 11, 29, 31, 51, 53, 104, 112, 126, 266, 295, 337, 361, 403, 449, 485, 761, 891, 967, 1095, 1175, 1199, 1347, 1480, 1657, 1955, 2229, 2358, 2409, 2537, 3007, 3253, 3497, 3617, 3799, 3926, 3959, 4352, 5038, 5313, 5615, 5847, 6434, 6525, 6972, 7267
Offset: 1

Views

Author

Rémy Sigrist, Jan 06 2024

Keywords

Crossrefs

Formula

A368798(a(n)) = n - 1.

A348636 Greedy Cantor's Dust Partition.

Original entry on oeis.org

1, 3, 8, 22, 24, 65, 70, 72, 194, 208, 210, 215, 580, 582, 623, 628, 630, 644, 1738, 1740, 1745, 1867, 1869, 1883, 1888, 1890, 1931, 5212, 5214, 5219, 5233, 5235, 5600, 5605, 5607, 5648, 5662, 5664, 5669, 5791, 5793, 15635, 15640, 15642, 15656, 15697, 15699
Offset: 1

Views

Author

Gordon Hamilton, Oct 28 2021

Keywords

Comments

Starting at 1, consecutively partition the positive integers into sets s(1), s(2), s(3), ... so that no arithmetic sequence of length 3 exists in a set. When choosing s(k), always choose k as small as possible. a(n) = smallest number in s(n).

Examples

			S(1) = Cantor's dust 1,2,4,5,10,11,13,14,28,29,31,32,... (A003278)
S(2) = 3,6,7,12,15,16,19,30,33,34,...
S(3) = 8,9,17,18,20,21,35,36,44,...
S(4) = 22,23,25,26,49,50,52,53,...
S(5) = 24,27,51,54,60,63,64,67,...
S(6) = 65,66,68,69,...
S(7) = 70,71,...
S(8) = 72,...
a(1) = min [S(1)] = 1
a(2) = min [S(2)] = 3
a(3) = min [S(3)] = 8
a(4) = min [S(4)] = 22
a(5) = min [S(5)] = 24
a(6) = min [S(6)] = 65
a(7) = min [S(7)] = 70
a(8) = min [S(8)] = 72
		

Crossrefs

One more than A265316, which is the first row of A262057.

Formula

a(n) = A265316(n) + 1.

Extensions

More terms from David A. Corneth, Nov 03 2021 (computed from A265316).
Showing 1-4 of 4 results.