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.

A265389 The sums from the following procedure: from the list of positive integers, repeatedly remove the first three numbers and their sum.

Original entry on oeis.org

6, 16, 27, 36, 46, 57, 66, 75, 87, 96, 106, 117, 126, 136, 147, 156, 165, 177, 186, 196, 207, 216, 227, 237, 246, 255, 267, 276, 286, 297, 306, 316, 327, 336, 345, 357, 366, 376, 387, 396, 406, 417, 426, 435, 447, 456, 466, 477, 486, 497, 507, 516, 525, 537
Offset: 1

Views

Author

Peter Kagey, Dec 08 2015

Keywords

Comments

This sequence is a solution, along with three other sequences, of a system of four complementary equations; see A297464. It is the "anti-tribonacci" sequence, in analogy with the anti-Fibonacci sequence, A075326. - Clark Kimberling, Apr 22 2018

Programs

  • Maple
    S:= {$1..1000}: A:= NULL:
    while nops(S) >= 3 do
      T:= S[1..3];
      s:= convert(T,`+`);
      S:= S[4..-1] minus {s};
      A:= A, s
    od:
    A; # Robert Israel, Dec 22 2015
  • Mathematica
    f[n_] := Block[{a = {}, r = Range@ n, s}, Do[If[Length@ r > 4, s = Total@ Take[r, 3 ]; AppendTo[a, s]; r = Drop[#, 3] &@ DeleteCases[r, x_ /; x == s], Break[]], {k, n}]; a]; f@ 184 (* Michael De Vlieger, Dec 22 2015 *)
    morph = Nest[Flatten[# /. {0 -> {1, 2, 0}, 1 -> {1, 1, 0}, 2 -> {1, 0, 0}}] &, {0}, 9]; A265389 = Accumulate[Prepend[Drop[Flatten[morph /. Thread[{0, 1, 2} -> {{1, 1, 4}, {1, 2, 3}, {1, 3, 2}}]], 1] + 8, 6]];
    Take[A265389, 100]    (* Peter J. C. Moses, May 03 2018 *)
  • Ruby
    x = (1..10000).to_a
    (0...1000).collect do
      y = x.shift(3).reduce(:+); x.delete_at x.index(y); y
    end

A297465 Solution (b(n)) of the system of 4 complementary equations in Comments.

Original entry on oeis.org

2, 5, 9, 12, 15, 19, 22, 25, 29, 32, 35, 39, 42, 45, 49, 52, 55, 59, 62, 65, 69, 72, 76, 79, 82, 85, 89, 92, 95, 99, 102, 105, 109, 112, 115, 119, 122, 125, 129, 132, 135, 139, 142, 145, 149, 152, 155, 159, 162, 166, 169, 172, 175, 179, 182, 185, 189, 192
Offset: 0

Views

Author

Clark Kimberling, Apr 22 2018

Keywords

Comments

Define sequences a(n), b(n), c(n), d(n) recursively, starting with a(0) = 1, b(0) = 2, c(0) = 3;:
a(n) = least new;
b(n) = least new;
c(n) = least new;
d(n) = a(n) + b(n) + c(n);
where "least new k" means the least positive integer not yet placed.
***
Conjecture: for all n >= 0,
0 <= 10n - 6 - 3 a(n) <= 2
0 <= 10n - 2 - 3 b(n) <= 3
0 <= 10n +1 - 3 c(n) <= 3
0 <= 10n - 3 - d(n) <= 2
***
The sequences a,b,c,d partition the positive integers. The sequence d can be called the "anti-tribonacci sequence"; viz., if sequences a and b are defined as above, and c(n) is defined by c(n) = a(n) + b(n), then the resulting system of 3 complementary sequences gives c = A036554, the "anti-Fibonacci sequence."

Examples

			n:   0    1    2    3    4    5    6    7    8    9
a:   1    4    8   11   14   18   21   24   28   31
b:   2    5    9   12   15   19   22   25   29   32
c:   3    7   10   13   17   20   23   26   30   33
d:   6   16   27   36   46   57   66   75   87   96
		

Crossrefs

Programs

  • Mathematica
    z = 400;
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = {1}; b = {2}; c = {3}; d = {}; AppendTo[d, Last[a] + Last[b] + Last[c]];
    Do[{AppendTo[a, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[b, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[c, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[d, Last[a] + Last[b] + Last[c]]}, {z}];
    Take[a, 100]  (* A297464 *)
    Take[b, 100]  (* A297465 *)
    Take[c, 100]  (* A297466 *)
    Take[d, 100]  (* A265389 *)

A297466 Solution (c(n)) of the system of 4 complementary equations in Comments.

Original entry on oeis.org

3, 7, 10, 13, 17, 20, 23, 26, 30, 33, 37, 40, 43, 47, 50, 53, 56, 60, 63, 67, 70, 73, 77, 80, 83, 86, 90, 93, 97, 100, 103, 107, 110, 113, 116, 120, 123, 127, 130, 133, 137, 140, 143, 146, 150, 153, 157, 160, 163, 167, 170, 173, 176, 180, 183, 187, 190, 193
Offset: 0

Views

Author

Clark Kimberling, Apr 22 2018

Keywords

Comments

Define sequences a(n), b(n), c(n), d(n) recursively, starting with a(0) = 1, b(0) = 2, c(0) = 3:
a(n) = least new;
b(n) = least new;
c(n) = least new;
d(n) = a(n) + b(n) + c(n);
where "least new k" means the least positive integer not yet placed.
***
Conjecture: for all n >= 0,
0 <= 10n - 6 - 3 a(n) <= 2
0 <= 10n - 2 - 3 b(n) <= 3
0 <= 10n + 1 - 3 c(n) <= 3
0 <= 10n - 3 - d(n) <= 2
***
The sequences a,b,c,d partition the positive integers. The sequence d can be called the "anti-tribonacci sequence"; viz., if sequences a and b are defined as above, and c(n) is defined by c(n) = a(n) + b(n), then the resulting system of 3 complementary sequences gives c = A036554, the "anti-Fibonacci sequence."
The linear recurrence with signature (1,0,0,0,0,0,0,0,1,-1) and g.f. (3 + 4*x + 3*x^2 + 3*x^3 + 4*x^4 + 3*x^5 + 3*x^6 + 3*x^7 + 4*x^8)/(1 - x - x^9 + x^10) first differs from this sequence at a(67). - Georg Fischer, Jul 17 2025

Examples

			n:   0    1    2    3    4    5    6    7    8    9
a:   1    4    8   11   14   18   21   24   28   31
b:   2    5    9   12   15   19   22   25   29   32
c:   3    7   10   13   17   20   23   26   30   33
d:   6   16   27   36   46   57   66   75   87   96
		

Crossrefs

Programs

  • Mathematica
    z = 400;
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = {1}; b = {2}; c = {3}; d = {}; AppendTo[d, Last[a] + Last[b] + Last[c]];
    Do[{AppendTo[a, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[b, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[c, mex[Flatten[{a, b, c, d}], 1]],
       AppendTo[d, Last[a] + Last[b] + Last[c]]}, {z}];
    Take[a, 100]  (* A297464 *)
    Take[b, 100]  (* A297465 *)
    Take[c, 100]  (* A297466 *)
    Take[d, 100]  (* A265389 *)
Showing 1-3 of 3 results.