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.

Previous Showing 21-30 of 38 results. Next

A370921 Positive integers in whose ternary representation, 2 occurs at least once, and every 2 is followed by 1.

Original entry on oeis.org

7, 16, 21, 22, 34, 43, 48, 49, 63, 64, 66, 67, 70, 88, 97, 102, 103, 115, 124, 129, 130, 144, 145, 147, 148, 151, 189, 190, 192, 193, 196, 198, 199, 201, 202, 205, 210, 211, 250, 259, 264, 265, 277, 286, 291, 292, 306, 307, 309, 310, 313, 331, 340, 345, 346
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2024

Keywords

Examples

			The ternary representations of 7, 16, and 21 are 21, 121, and 210.
		

Crossrefs

Programs

  • Mathematica
    Map[#[[1]] &, Select[Map[{#, #[[1]] > 0 && #[[1]] == #[[2]] &[{Length[
    StringCases[#, "2"]], Length[StringCases[#, "21"]]}] &[
    IntegerString[#, 3]]} &, Range[500]], #[[2]] &]]
      (* Peter J. C. Moses, Mar 05 2024 *)

A107756 Numbers k such that Sum_{j=1..k} Catalan(j) == 1 (mod 3).

Original entry on oeis.org

1, 4, 5, 6, 7, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 31, 32, 33, 34, 37, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 85, 86, 87, 88, 91, 94, 95
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2005

Keywords

Crossrefs

Equals A074940 - 1.

Programs

Formula

Equivalently, numbers k such that base-3 expansion of k+1 contains a 2.

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

A262096 Triangle read by rows: numbers c from the set of arithmetic triples a < b < c (three numbers in arithmetic progression) where a and b are terms of A005836.

Original entry on oeis.org

2, 6, 5, 8, 7, 5, 18, 17, 15, 14, 20, 19, 17, 16, 11, 24, 23, 21, 20, 15, 14, 26, 25, 23, 22, 17, 16, 14, 54, 53, 51, 50, 45, 44, 42, 41, 56, 55, 53, 52, 47, 46, 44, 43, 29, 60, 59, 57, 56, 51, 50, 48, 47, 33, 32, 62, 61, 59, 58, 53, 52, 50, 49, 35, 34, 32
Offset: 1

Views

Author

Max Barrentine, Sep 10 2015

Keywords

Comments

The first term in each row of the triangle is a term of A005823; these are also the local maxima. From this term until the next row, the first differences are A236313.

Examples

			Each term is generated from arithmetic sequences started from pairs of terms from A005836. The order is according to the arithmetic triples 0, 1, a(1)=2; 0, 3, a(2)=6; 1, 3, a(3)=5; 0, 4, a(4)=8; 1, 4, a(5)=7; 3, 4, a(6)=5; ...
As a triangle, sequence starts:
   2;
   6,  5;
   8,  7,  5;
  18, 17, 15, 14;
  20, 19, 17, 16, 11;
  24, 23, 21, 20, 15, 14;
  26, 25, 23, 22, 17, 16, 14;
  54, 53, 51, 50, 45, 44, 42, 41;
  ...
		

Crossrefs

Programs

  • PARI
    isok(n) = (n==0) || (vecmax(digits(n, 3)) != 2);
    lista(nn) = {oks = select(x->isok(x), vector(nn, n, n-1)); for (n=2, #oks, for (k=1, n-1, print1(2*oks[n]-oks[k], ", ");););} \\ Michel Marcus, Sep 12 2015

Extensions

Name corrected by Max Barrentine, May 24 2016

A262256 List of arithmetic triples aA005836.

Original entry on oeis.org

0, 1, 2, 0, 3, 6, 1, 3, 5, 0, 4, 8, 1, 4, 7, 3, 4, 5, 0, 9, 18, 1, 9, 17, 3, 9, 15, 4, 9, 14, 0, 10, 20, 1, 10, 19, 3, 10, 17, 4, 10, 16, 9, 10, 11, 0, 12, 24, 1, 12, 23, 3, 12, 21, 4, 12, 20, 9, 12, 15, 10, 12, 14, 0, 13, 26, 1, 13, 25, 3, 13, 23, 4, 13, 22
Offset: 1

Views

Author

Max Barrentine, Sep 15 2015

Keywords

Comments

The values a(3n) are A262096.

Examples

			0, 1, 2;
0, 3, 6;
1, 3, 5;
0, 4, 8;
...
		

Crossrefs

Extensions

Name edited by Max Barrentine, May 24 2016

A037408 Positive numbers having the same set of digits in base 2 and base 3.

Original entry on oeis.org

1, 9, 10, 12, 27, 28, 30, 36, 37, 39, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 243, 244, 246, 247, 252, 253, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352, 354, 355, 360, 361, 363
Offset: 1

Views

Author

Keywords

Comments

From Alonso del Arte, Sep 10 2017: (Start)
Neither binary repunits (A000225 without the initial 0) nor ternary repunits (A003462 without the initial 0) can be in this sequence, except for 1.
The ternary repunits are numbers of the form (3^k - 1)/2. If k is odd, then (3^k - 1)/2 is even and therefore its binary representation ends in 0. If k is even, then (3^k - 1)/2 = 1 mod 4, which means its binary representation ends in 01.
For much more obvious reasons, numbers with even just one 2 in their ternary representations (A074940) can't be in this sequence. (End)

Examples

			9 is 1001 in binary and 100 in ternary. In both representations, the set of digits used is {0, 1}, hence 9 is in the sequence.
10 is 1010 in binary and 101 in ternary. In both representations, the set of digits used is {0, 1}, hence 10 is in the sequence.
11 is 1011 in binary and 102 in ternary. Clearly the binary representation can't include the digit 2, hence 11 is not in the sequence.
		

Programs

  • Maple
    filter:= proc(n) local F;
      F:= convert(convert(n,base,3),set);
      if has(F,2) then return false fi;
      evalb(F = convert(convert(n,base,2),set))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Sep 18 2017
  • Mathematica
    Select[Range[400], Union[IntegerDigits[#, 2]] == Union[IntegerDigits[#, 3]] &] (* Vincenzo Librandi Sep 09 2017 *)
  • PARI
    isok(n) = vecsort(digits(n, 2),,8) == vecsort(digits(n, 3),,8); \\ Michel Marcus, Jan 05 2017

Extensions

Initial 0 added by Alonso del Arte, Sep 10 2017
Initial 0 removed by Georg Fischer, Oct 30 2020

A111018 Indices of Catalan numbers that are divisible by 3.

Original entry on oeis.org

5, 6, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, 33, 34, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 86, 87, 88, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Robert G. Wilson v, Sep 09 2005

Keywords

Comments

Conjecture: The sequence contains all numbers n such that n and n+1 are both in the sequence A074940, or, equivalently, such that neither n nor n+1 is in the sequence A005836. - L. Edson Jeffery, Dec 02 2015
The asymptotic density of this sequence is 1 (Burns, 2016). - Amiram Eldar, Jan 26 2021

Crossrefs

Programs

A273516 List of arithmetic triples (three numbers in arithmetic progression) derived from pairs of terms in A005836.

Original entry on oeis.org

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

Views

Author

Max Barrentine, May 23 2016

Keywords

Comments

These are all the arithmetic triples such that two terms are distinct members of A005836.
The triples are arranged in reflected colexicographic order.

Examples

			0, 1, 2;
1, 2, 3;
0, 2, 4;
2, 3, 4;
...
		

Crossrefs

A323398 Lexicographically first 3-free sequence on nonnegative integers not containing the Stanley sequence S(0,1), which is A005836.

Original entry on oeis.org

2, 5, 6, 11, 14, 15, 18, 29, 32, 33, 38, 41, 42, 45, 54, 83, 86, 87, 92, 95, 96, 99, 110, 113, 114, 119, 122, 123, 126, 135, 162, 245, 248, 249, 254, 257, 258, 261, 272, 275, 276, 281, 284, 285, 288, 297, 326, 329, 330, 335, 338, 339, 342, 353, 356, 357, 362, 365, 366, 369, 378, 405, 486, 731, 734, 735, 740, 743, 744
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Junior, Jan 13 2019

Keywords

Comments

Consider the lexicographically earliest sequence of nonnegative numbers that does not contain the arithmetic mean of any pair of terms (such sequences are called 3-free sequences as they do not contain 3-term arithmetic progressions): 0,1,3,4 and so on. This sequence is Stanley sequence S(0,1). Remove numbers in the Stanley sequence from nonnegative integers and repeat the process of finding the earliest 3-free sequence. The result is this sequence.
When written in base three these are numbers that contain exactly one 2 that might be followed by zeros.

Examples

			Removing the Stanley sequence from nonnegative integers we get sequence A074940:  2, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18 (Numbers having at least one 2 in their ternary representation). Our new sequence starts with 2,5,6. It can't contain 7 as 5,6,7 form an arithmetic progression. It can't contain 8 as 2,5,8 form an arithmetic progression. The next term is 11.
		

Crossrefs

A323418 The third greedy 3-free sequence on nonnegative integers.

Original entry on oeis.org

7, 8, 16, 17, 19, 20, 34, 35, 43, 44, 46, 47, 55, 56, 88, 89, 97, 98, 100, 101, 115, 116, 124, 125, 127, 128, 136, 137, 163, 164, 250, 251, 259, 260, 262, 263, 277, 278, 286, 287, 289, 290, 298, 299, 331, 332, 340, 341, 343, 344, 358, 359, 367, 368, 370, 371, 379, 380, 406, 407, 487, 488, 736, 737, 745, 746, 748, 749
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Junior, Jan 14 2019

Keywords

Comments

Consider the lexicographically earliest sequence of nonnegative integers that does not contain the arithmetic mean of any pair of terms (such sequences are called 3-free sequences as they do not contain 3-term arithmetic progressions): 0,1,3,4 and so on. This sequence is Stanley sequence S(0,1). Remove numbers in the Stanley sequence from nonnegative integers and repeat the process of finding the next earliest 3-free sequence, which is sequence A323398. We get this sequence on the next iteration.
When represented in ternary this sequence consists of integers ending in 1 or 2, and there is exactly one digit 2 before that that might be followed by zeros.

Crossrefs

Previous Showing 21-30 of 38 results. Next