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 37 results. Next

A037259 Second differences of A037257.

Original entry on oeis.org

4, 5, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(n) = A037257(n+2) - 2*A037257(n+1) + A037257(n).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000

A037260 a()=A037260 and its first [ A037261 ], 2nd [ A037262 ] and 3rd [ A037263 ] differences together include every number at most once and are monotonic and minimal.

Original entry on oeis.org

1, 3, 9, 26, 62, 127, 233, 393, 621, 932, 1342, 1869, 2533, 3355, 4357, 5562, 6994, 8678, 10641, 12911, 15518, 18493, 21868, 25676, 29951, 34728, 40044, 45937, 52446, 59611, 67474, 76078, 85467, 95686, 106781, 118799, 131788, 145797
Offset: 0

Views

Author

Keywords

Comments

5 is the only number less than 100 not used in any of the 4 sequences - Larry Reeves (larryr(AT)acm.org), Sep 25 2000

Examples

			After 1 3 9 26 62
------ 2 6 17 36
------- 4 11 19
-------- 7 8
the next free number is 10 which we CAN add to 4th row.
		

Crossrefs

A037260-A037263 are 4-rowed analog of A037257-A037259. See A005228, A030124 for 2-rowed version.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000

A061577 Sequence and first differences (A061578) include all numbers.

Original entry on oeis.org

2, 3, 7, 12, 18, 26, 35, 45, 56, 69, 83, 98, 114, 131, 150, 170, 191, 213, 236, 260, 285, 312, 340, 369, 399, 430, 462, 495, 529, 565, 602, 640, 679, 719, 760, 802, 845, 889, 935, 982, 1030, 1079, 1129, 1180, 1232, 1285, 1339, 1394, 1451, 1509, 1568, 1628
Offset: 1

Views

Author

Ronald van Eijck (eequalsmcsquare(AT)hotmail.com), May 21 2001

Keywords

Comments

The lexicographically earliest sequence that begins with 2 and together with its first differences (A030124) contain every positive integer exactly once.
a(n) = A022953(n-1) for 2 < n <= 10000. - Georg Fischer, Oct 19 2018

Crossrefs

Programs

  • Mathematica
    Fold[Append[#1, #1[[#2]] + Complement[Range[Max@#1 + 1], #1][[#2]]] &, {2}, Range[50]] (* Ivan Neretin, Apr 04 2016 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001

A257941 Lexicographically earliest sequence of positive integers such that the terms and their absolute first differences are all distinct and no term is the sum of two distinct earlier terms.

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 9, 20, 34, 24, 39, 55, 22, 45, 66, 28, 47, 72, 85, 49, 76, 108, 68, 99, 53, 82, 112, 70, 114, 149, 74, 122, 172, 93, 145, 203, 101, 160, 95, 162, 216, 118, 187, 224, 141, 214, 143, 235, 139, 195, 281, 164, 241, 329, 166, 260, 170, 283, 168
Offset: 1

Views

Author

Eric Angelini and Alois P. Heinz, May 13 2015

Keywords

Comments

The sequence of absolute first differences begins: 2, 4, 5, 6, 8, 17, 11, 14, 10, 15, 16, 33, 23, 21, 38, 19, 25, 13, 36, 27, 32, 40, ... .
The sequence is 0-additive.

Crossrefs

Programs

  • Maple
    s:= proc() false end: b:= proc() false end:
    a:= proc(n) option remember; local i, k;
          if n=1 then b(1):= true; 1
        else for k while b(k) or s(k) or
             (t-> b(t) or t=k)(abs(a(n-1)-k)) do od;
             for i to n-1 do s(a(i)+k):= true od;
             b(k), b(abs(a(n-1)-k)):= true$2; k
          fi
        end:
    seq(a(n), n=1..101);
  • Mathematica
    s[] = False; b[] = False;
    a[n_] := a[n] = Module[{i, k}, If[n == 1, b[1] = True; 1, For[k = 1, b[k] || s[k] || Function[t, b[t] || t == k][Abs[a[n-1]-k]], k++]; For[i = 1, i <= n-1, i++, s[a[i]+k] = True]; {b[k], b[Abs[a[n-1]-k]]} = {True, True}; k]];
    Array[a, 101] (* Jean-François Alcover, Oct 28 2020, after Maple *)

A257944 Lexicographically earliest sequence of positive integers such that the terms and their absolute first differences are all distinct and no term is the sum of two distinct terms.

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 16, 31, 20, 37, 50, 22, 41, 64, 35, 56, 83, 39, 69, 45, 54, 79, 111, 58, 92, 130, 60, 96, 136, 73, 115, 163, 75, 121, 168, 77, 134, 193, 98, 149, 182, 102, 157, 206, 117, 178, 244, 138, 210, 277, 140, 214, 282, 153, 229, 307, 155, 220, 263
Offset: 1

Views

Author

Eric Angelini and Alois P. Heinz, May 13 2015

Keywords

Comments

The sequence of absolute first differences begins: 2, 4, 5, 6, 8, 10, 15, 11, 17, 13, 28, 19, 23, 29, 21, 27, 44, 30, 24, 9, 25, 32, 53, ... .

Crossrefs

Programs

  • Maple
    s:= proc() false end: b:= proc() false end:
    a:= proc(n) option remember; local i, k, ok;
          if n=1 then b(1):= true; 1
        else for k do if b(k) or s(k) or (t-> b(t) or t=k)(
               abs(a(n-1)-k)) then next fi; ok:=true;
               for i to n-1 while ok do if b(k+a(i))
                 then ok:=false fi od; if ok then break fi
             od;
             for i to n-1 do s(a(i)+k):= true od;
             b(k), b(abs(a(n-1)-k)):= true$2; k
          fi
        end:
    seq(a(n), n=1..101);
  • Mathematica
    s[] = False; b[] = False;
    a[n_] := a[n] = Module[{i, k, ok}, If[n == 1, b[1] = True; 1,
         For[k = 1, True, k++, If[b[k] || s[k] || Function[t, b[t] ||
         t == k][Abs[a[n-1] - k]], Continue[]]; ok = True;
                 For[i = 1, i <= n-1 && ok, i++, If[b[k + a[i]],
                 ok = False]]; If[ok, Break[]]];
              For[i = 1, i <= n-1, i++, s[a[i] + k] = True];
              {b[k], b[Abs[a[n-1] - k]]} = {True, True}; k]];
    Table[a[n], {n, 1, 101}] (* Jean-François Alcover, Jul 16 2021, after Alois P. Heinz *)

A037258 First differences of A037257.

Original entry on oeis.org

2, 6, 11, 18, 26, 36, 48, 61, 75, 90, 106, 123, 142, 163, 185, 208, 232, 257, 285, 314, 344, 375, 407, 440, 474, 509, 546, 585, 625, 666, 708, 751, 795, 840, 886, 933, 982, 1032, 1083, 1135, 1188, 1242, 1297, 1353, 1410, 1468, 1527, 1587, 1649, 1712, 1777
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(n) = A037257(n+1) - A037257(n).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000

A156031 Alternate A022941 and A143344.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 6, 15, 7, 22, 8, 30, 10, 40, 11, 51, 12, 63, 13, 76, 14, 90, 16, 106, 17, 123, 18, 141, 19, 160, 20, 180, 21, 201, 23, 224, 24, 248, 25, 273, 26, 299, 27, 326, 28, 354, 29, 383, 31, 414, 32, 446, 33, 479, 34, 513, 35, 548, 36, 584, 37, 621, 38, 659, 39, 698
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2009, based on a posting by Eric Angelini to the Sequence Fans Mailing List

Keywords

Comments

Eric Angelini's definition was: start with 1,2,3; then alternately adjoin either the sum of the last two terms or the smallest number not yet in the sequence.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a156031 n = a156031_list !! n
    a156031_list = tail $ concat (transpose [a022941_list, a143344_list])
    -- Reinhard Zumkeller, May 17 2013
  • PARI
    f="b156031.txt"; used=[]; write(f,c=1," ",b=1);a=1; for(i=1,1e3, used=setunion(used,Set(a+=b)); while(setsearch(used,b++), used=setminus(used,Set(b))); write(f,c++," "a"\n",c++," "b)) \\ M. F. Hasler, Nov 01 2009
    

A225385 Construct sequences P,Q,R by the rules: Q = first differences of P, R = second differences of P, P starts with 1,3,9, Q starts with 2,6, R starts with 4; at each stage the smallest number not yet present in P,Q,R is appended to R. Sequence gives P.

Original entry on oeis.org

1, 3, 9, 20, 38, 64, 100, 148, 209, 284, 374, 480, 603, 745, 908, 1093, 1301, 1533, 1790, 2074, 2386, 2727, 3098, 3500, 3934, 4401, 4902, 5438, 6011, 6623, 7275, 7968, 8703, 9481, 10303, 11170, 12083, 13043, 14052, 15111, 16221, 17383, 18598, 19867, 21191, 22571, 24008, 25503, 27057, 28671, 30347, 32086, 33890, 35760, 37697, 39702, 41776, 43920
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2013

Keywords

Comments

In contrast to A225376-A225378, here it is not required (and not true) that each number should appear just once in P union Q union R. On the other hand, again in contrast to A225376-A225378, here it is obvious that P, Q, R are infinite.
The first three numbers that are repeated are 284, 2074, 3500, which appear in both P and Q. There may be no others. Of course R is disjoint from P and Q, by definition.

Crossrefs

Programs

  • Maple
    # Based on Christopher Carl Heckman's program for A225376.
    f:=proc(N) local h,dh,ddh,S,mex,i;
    h:=1,3,9; dh:=2,6; ddh:=4; mex:=5; S:={h,dh,ddh};
    for i from 4 to N do
    while mex in S do S:=S minus {mex}; mex:=mex+1; od;
    ddh:=ddh,mex; dh:=dh,dh[-1]+mex; h:=h,h[-1]+dh[-1];
    S:=S union {h[-1], dh[-1], ddh[-1]};
    mex:=mex+1;
    od;
    RETURN([[h],[dh],[ddh]]);
    end;
    f(100);
  • Mathematica
    f[N_] := Module[{P = {1, 3, 9}, Q = {2, 6}, R = {4}, S, mex = 5, i},
      S = Join[P, Q, R];
      For[i = 4, i <= N, i++,
       While[MemberQ[S, mex], S = S~Complement~{mex}; mex++];
       AppendTo[R, mex];
       AppendTo[Q, Q[[-1]] + mex];
       AppendTo[P, P[[-1]] + Q[[-1]]];
       S = S~Union~{P[[-1]], Q[[-1]], R[[-1]]}; mex++];
    P];
    f[100] (* Jean-François Alcover, Mar 06 2023, after Maple code *)

A225386 Construct sequences P,Q,R by the rules: Q = first differences of P, R = second differences of P, P starts with 1,3,9, Q starts with 2,6, R starts with 4; at each stage the smallest number not yet present in P,Q,R is appended to R. Sequence gives Q.

Original entry on oeis.org

2, 6, 11, 18, 26, 36, 48, 61, 75, 90, 106, 123, 142, 163, 185, 208, 232, 257, 284, 312, 341, 371, 402, 434, 467, 501, 536, 573, 612, 652, 693, 735, 778, 822, 867, 913, 960, 1009, 1059, 1110, 1162, 1215, 1269, 1324, 1380, 1437, 1495, 1554, 1614, 1676, 1739, 1804, 1870, 1937, 2005, 2074, 2144
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2013

Keywords

Comments

In contrast to A225376-A225378, here it is not required (and not true) that each number should appear just once in P union Q union R. On the other hand, again in contrast to A225376-A225378, here it is obvious that P, Q, R are infinite.
The first three numbers that are repeated are 284, 2074, 3500, which appear in both P and Q. There may be no others. Of course R is disjoint from P and Q, by definition.

Crossrefs

Programs

A225387 Construct sequences P,Q,R by the rules: Q = first differences of P, R = second differences of P, P starts with 1,3,9, Q starts with 2,6, R starts with 4; at each stage the smallest number not yet present in P,Q,R is appended to R. Sequence gives R.

Original entry on oeis.org

4, 5, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2013

Keywords

Comments

In contrast to A225376-A225378, here it is not required (and not true) that each number should appear just once in P union Q union R. On the other hand, again in contrast to A225376-A225378, here it is obvious that P, Q, R are infinite.
The first three numbers that are repeated are 284, 2074, 3500, which appear in both P and Q. There may be no others. Of course R is disjoint from P and Q, by definition.

Crossrefs

Programs

Previous Showing 21-30 of 37 results. Next