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

A052474 Construct difference array so that (1) first row begins with 1, (2) every row is monotonic increasing, (3) no number appears more than once, (4) smallest number not yet used begins a new row. Sequence gives main diagonal.

Original entry on oeis.org

1, 2, 4, 7, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 32, 35, 36, 39, 42, 48, 49, 50, 51, 53, 54, 57, 58, 59, 61, 62, 64, 66, 68, 76, 77, 78, 80, 82, 86, 87, 89, 91, 92, 93, 98, 103, 109, 110, 118, 124, 127, 128, 129, 132, 133, 135, 136, 139, 140, 141, 142, 143, 149
Offset: 1

Views

Author

Jonas Wallgren, Jul 30 2000

Keywords

Examples

			Array begins
1 3 9 26 73 194 ...
.2 6 17 47 121 ...
. 4 11 30 74 ...
.. 7 19 44 ...
... 12 25 ...
.... 13 ...
		

Crossrefs

Cf. A057153 (first row), A057154 (numbers not used), A056230 (array), A056231, A056232, A056233, A056234.

Programs

A056230 Construct difference array so that (1) first row begins with 1, (2) every row is monotonic increasing, (3) no number appears more than once, (4) smallest number not yet used begins a new row. Sequence gives array read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 7, 11, 17, 26, 12, 19, 30, 47, 73, 13, 25, 44, 74, 121, 194, 14, 27, 52, 96, 170, 291, 485, 15, 29, 56, 108, 204, 374, 665, 1150, 16, 31, 60, 116, 224, 428, 802, 1467, 2617, 18, 34, 65, 125, 241, 465, 893, 1695, 3162, 5779, 20, 38, 72, 137, 262
Offset: 1

Views

Author

Jonas Wallgren, Jul 30 2000

Keywords

Examples

			Array begins
1 3 9 26 73 194 ...
.2 6 17 47 121 ...
. 4 11 30 74 ...
.. 7 19 44 ...
... 12 25 ...
.... 13 ...
		

Crossrefs

Cf. A057153 (first row), A200379 (second row), A052474 (main diagonal), A057154 (numbers not used), A056231, A056232, A056233, A056234.

Programs

  • Haskell
    import Data.List (intersect, union, (\\))
    a056230 n k = a056230_tabl !! (n-1) !! (k-1)
    a056230_tabl = [1] : f [1] [2..] [1] where
       f adiag (a:as) us | null (adiag' `intersect` us) =
                           adiag' : f adiag' (as \\ adiag') (us `union` adiag')
                         | otherwise = f adiag as us
                         where adiag' = scanl (+) a adiag
    -- Reinhard Zumkeller, Nov 19 2011

A056231 Form an array with 3 rows: row 1 begins with 1; all rows are increasing; each entry is sum of 2 entries above it; each number appears at most once; smallest unused number is appended to first row if possible. Sequence gives row 1.

Original entry on oeis.org

1, 2, 4, 7, 8, 10, 12, 13, 14, 16, 19, 20, 21, 23, 28, 31, 32, 34, 36, 37, 38, 43, 45, 46, 48, 49, 50, 53, 54, 55, 56, 58, 60, 61, 62, 64, 67, 68, 69, 71, 76, 77, 78, 79, 82, 83, 84, 86, 87, 89, 92, 96, 98, 100, 101, 102, 104, 105, 106, 108, 113, 115
Offset: 1

Views

Author

N. J. A. Sloane, E. M. Rains, Aug 22 2000

Keywords

Examples

			Array begins
1 2 4 7 8 10 12 ...
.3 6 11 15 18 ...
. 9 17 26 33 ...
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a056231 n = ([1,2] ++ threeRows !! 0) !! (n-1)
    a056232 n = ([3] ++ threeRows !! 1) !! (n-1)
    a056233 n = threeRows !! 2 !! (n-1)
    threeRows = transpose $ f [4..] [1,2,3] [2,1] [3] [] where
       f (u:free) used us vs ws
           | u `notElem` used &&
             v `notElem` used &&
             w `notElem` used = [u, v, w] :
                                f free (w:v:u:used) (u:us) (v:vs) (w:ws)
           | otherwise        = f free used us vs ws
           where v = u + head us; w = v + head vs
    -- Reinhard Zumkeller, Oct 18 2011
  • Maple
    a := [1,2,4]; an := 3; b := [3,6]; bn := 2; c := [9]; cn := 1; h := array(1..10000); h[1] := 1; h[2] := 1; h[3] := 1; h[4] := 1; h[6] := 1; h[9] := 1; m := []; k := 5;
    for i from 1 to 200 do for n from k to k+100 do n1 := a[an]+n; n2 := b[bn]+n1; if h[n]<>1 and h[n1]<>1 and h[n2]<>1 then h[n] := 1; h[n1] := 1; h[n2] := 1; an := an+1; bn := bn+1; cn := cn+1; a := [op(a), n]; b := [op(b), n1]; c := [op(c), n2]; k := n+1; break;
    else if h[n]<>1 then m := [op(m), n]; fi; fi; od; od; a; b; c; m;
  • Mathematica
    a = {1, 2, 4}; an = 3; b = {3, 6}; bn = 2; c = {9}; cn = 1; Clear[h]; h[_] = 0; h[1] = h[2] = h[3] = h[4] = h[6] = h[9] = 1; m = {}; k = 5;
    For[i = 1, i <= 200, i++, For[n = k, n <= k + 100, n++, n1 = a[[an]] + n; n2 = b[[bn]] + n1; If[h[n] != 1 && h[n1] != 1 && h[n2] != 1, h[n] = 1; h[n1] = 1; h[n2] = 1; an++; bn++; cn++; AppendTo[a, n]; AppendTo[b, n1]; AppendTo[c, n2]; k = n+1; Break[], If[h[n] != 1, AppendTo[m, n]]]]];
    {a, b, c, m} (* Jean-François Alcover, Dec 17 2019, translated from Maple *)

A056232 Form an array with 3 rows: row 1 begins with 1; all rows are increasing; each entry is sum of 2 entries above it; each number appears at most once; smallest unused number is appended to first row if possible. Sequence gives row 2.

Original entry on oeis.org

3, 6, 11, 15, 18, 22, 25, 27, 30, 35, 39, 41, 44, 51, 59, 63, 66, 70, 73, 75, 81, 88, 91, 94, 97, 99, 103, 107, 109, 111, 114, 118, 121, 123, 126, 131, 135, 137, 140, 147, 153, 155, 157, 161, 165, 167, 170, 173, 176, 181, 188, 194, 198, 201, 203
Offset: 1

Views

Author

N. J. A. Sloane, E. M. Rains, Aug 22 2000

Keywords

Examples

			Array begins
1 2 4 7 8 10 12 ...
.3 6 11 15 18 ...
. 9 17 26 33 ...
		

Crossrefs

Programs

A056233 Form an array with 3 rows: row 1 begins with 1; all rows are increasing; each entry is sum of 2 entries above it; each number appears at most once; smallest unused number is appended to first row if possible. Sequence gives row 3.

Original entry on oeis.org

9, 17, 26, 33, 40, 47, 52, 57, 65, 74, 80, 85, 95, 110, 122, 129, 136, 143, 148, 156, 169, 179, 185, 191, 196, 202, 210, 216, 220, 225, 232, 239, 244, 249, 257, 266, 272, 277, 287, 300, 308, 312, 318, 326, 332, 337, 343, 349, 357, 369, 382
Offset: 1

Views

Author

N. J. A. Sloane, E. M. Rains, Aug 22 2000

Keywords

Examples

			Array begins
1 2 4 7 8 10 12 ...
.3 6 11 15 18 ...
. 9 17 26 33 ...
		

Crossrefs

Programs

A056234 Form an array with 3 rows: row 1 begins with 1; all rows are increasing; each entry is sum of 2 entries above it; each number appears at most once; smallest unused number is appended to first row if possible. Sequence gives numbers not used.

Original entry on oeis.org

5, 24, 29, 42, 72, 90, 93, 112, 120, 125, 138, 158, 172, 175, 192, 197, 200, 205, 208, 213, 218, 230, 235, 264, 282, 285, 302, 305, 310, 321, 324, 329, 333, 364, 372, 375, 378, 386, 416, 430, 439, 452, 455, 477, 496, 504, 509, 522, 542, 556
Offset: 1

Views

Author

N. J. A. Sloane, E. M. Rains, Aug 22 2000

Keywords

Examples

			Array begins
1 2 4 7 8 10 12 ...
.3 6 11 15 18 ...
. 9 17 26 33 ...
		

Crossrefs

Programs

  • Haskell
    a056234 n = a056234_list !! (n-1)
    a056234_list = notUsed 1 a056231_list a056232_list a056233_list where
       notUsed x us'@(u:us) vs'@(v:vs) ws'@(w:ws)
        | x == u = notUsed (x + 1) us vs' ws'
        | x == v = notUsed (x + 1) us' vs ws'
        | x == w = notUsed (x + 1) us' vs' ws
        | otherwise = x : notUsed (x + 1) us' vs' ws'
    -- Reinhard Zumkeller, Nov 07 2011

A057154 Construct difference array so that (1) first row begins with 1, (2) every row is monotonic increasing, (3) no number appears more than once, (4) smallest number not yet used begins a new row. Sequence gives numbers not used.

Original entry on oeis.org

5, 8, 10, 24, 28, 33, 37, 40, 46, 63, 69, 70, 83, 85, 94, 95, 102, 105, 106, 112, 113, 114, 119, 131, 145, 147, 148, 152, 161, 165, 166, 175, 181, 197, 203, 207, 215, 221, 235, 236, 239, 247, 253, 254, 267, 270, 276, 286, 289, 290, 296, 307, 309, 315, 317, 322
Offset: 1

Views

Author

Jonas Wallgren, Jul 30 2000

Keywords

Examples

			Array begins
1 3 9 26 73 194 ...
.2 6 17 47 121 ...
. 4 11 30 74 ...
.. 7 19 44 ...
... 12 25 ...
.... 13 ...
		

Crossrefs

Cf. A057153 (first row), A052474 (main diagonal), A056230 (array), A056231, A056232, A056233, A056234.

Programs

  • Haskell
    import Data.List (intersect, union, (\\))
    a057154 n = a057154_list !! (n-1)
    a057154_list = g [1] [2..] [1] where
       g ds (a:as) us
         | null (ds' `intersect` us) = g ds' (as \\ ds') (us `union` ds')
         | otherwise = a : g ds as us
         where ds' = scanl (+) a ds
    -- Reinhard Zumkeller, Nov 19 2011

Extensions

More terms from Rob Speer (rob(AT)twcny.rr.com) and Loren Merritt, Aug 14 2000
Further terms from Larry Reeves (larryr(AT)acm.org), May 09 2001

A200379 Second row of array defined in A056230.

Original entry on oeis.org

2, 6, 17, 47, 121, 291, 665, 1467, 3162, 6718, 14156, 29702, 62190, 130060, 271760, 567488, 1184917, 2475907, 5181798, 10869647, 22858188, 48178441, 101712259, 214900119, 454006064, 958316150, 2019797853, 4248758319, 8917387482, 18670242203, 38989676130
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2011

Keywords

Comments

First differences of A057153;
a(n) = A056230(n+1,n).

Programs

  • Haskell
    a200379 n = a056230_tabl !! n !! (n-1)

A133544 A007318 * A052474.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 1, 6, 12, 7, 1, 8, 24, 28, 12, 1, 10, 40, 70, 60, 13, 1, 12, 60, 140, 180, 78, 14, 1, 14, 84, 245, 420, 273, 98, 15, 1, 16, 112, 392, 840, 728, 392, 120, 16, 1, 18, 144, 588, 1512, 1638, 1176, 540, 144, 18
Offset: 1

Views

Author

Gary W. Adamson, Sep 14 2007

Keywords

Comments

Right border = A052474: (1, 2, 4, 7, 12, 13, 14, 15, 16, 18, 20, ...).
Row sums = A057153: (1, 3, 9, 26, 73, 194, 485, 1150, ...).

Examples

			First few rows of the triangle:
  1;
  1,  2;
  1,  4,  4;
  1,  6, 12,   7;
  1,  8, 24,  28,  12;
  1, 10, 40,  70,  60, 13;
  1, 12, 60, 140, 180, 78, 14;
  ...
		

Crossrefs

Formula

Binomial transform of A052474 as a diagonalized matrix (A052474 as the diagonal of an infinite lower triangular matrix and the rest zeros).
Showing 1-9 of 9 results.