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-10 of 11 results. Next

A056011 Enumeration of natural numbers by the boustrophedonic diagonal method.

Original entry on oeis.org

1, 3, 2, 4, 5, 6, 10, 9, 8, 7, 11, 12, 13, 14, 15, 21, 20, 19, 18, 17, 16, 22, 23, 24, 25, 26, 27, 28, 36, 35, 34, 33, 32, 31, 30, 29, 37, 38, 39, 40, 41, 42, 43, 44, 45, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66
Offset: 1

Views

Author

Clark Kimberling, Aug 01 2000

Keywords

Comments

A triangle such that (1) every positive integer occurs exactly once; (2) row n consists of n consecutive numbers; (3) odd-numbered rows are increasing; and (4) even-numbered rows are decreasing.
Self-inverse permutation of the natural numbers.
Mirror image of triangle in A056023. - Philippe Deléham, Apr 04 2009
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers. - Boris Putievskiy, Dec 24 2012
For generalizations see A218890, A213927. - Boris Putievskiy, Mar 10 2013

Examples

			The start of the sequence as a table:
   1,  3,  4, 10, 11, 21, ...
   2,  5,  9, 12, 20, 23, ...
   6,  8, 13, 19, 24, 34, ...
   7, 14, 18, 25, 33, 40, ...
  15, 17, 26, 32, 41, 51, ...
  ...
Enumeration by boustrophedonic ("ox-plowing") diagonal method. - _Boris Putievskiy_, Dec 24 2012
The start of the sequence as triangle array read by rows:
   1;
   3,  2;
   4,  5,  6;
  10,  9,  8,  7;
  11, 12, 13, 14, 15;
  ...
		

Crossrefs

Cf. A079826, A131179 (first column), A218890, A213927.

Programs

  • Haskell
    a056011 n = a056011_tabl !! (n-1)
    a056011_list = concat a056011_tabl
    a056011_tabl = ox False a000027_tabl where
      ox turn (xs:xss) = (if turn then reverse xs else xs) : ox (not turn) xss
    a056011_row n = a056011_tabl !! (n-1)
    -- Reinhard Zumkeller, Nov 08 2013
  • Maple
    A056011 := proc(n,k)
            if type(n,'even') then
                    A131179(n)-k+1 ;
            else
                    A131179(n)+k-1 ;
            end if;
    end proc: # R. J. Mathar, Sep 05 2012
  • Mathematica
    Flatten[If[EvenQ[Length[#]],Reverse[#],#]&/@Table[c=(n(n+1))/2;Range[ c-n+1,c],{n,20}]] (* Harvey P. Dale, Mar 25 2012 *)
    With[{nn=20},{#[[1]],Reverse[#[[2]]]}&/@Partition[ TakeList[ Range[ (nn(nn+1))/2],Range[nn]],2]//Flatten] (* Harvey P. Dale, Oct 05 2021 *)

Formula

a(n) = ((i+j-1)*(i+j-2)+((-1)^t+1)*i - ((-1)^t-1)*j)/2, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 24 2012

Extensions

New name from Peter Luschny, Apr 15 2023, based on Boris Putievskiy's comment

A373662 a(n) = (1 + (n+1)^2 - (n-2)*(-1)^n)/2.

Original entry on oeis.org

2, 5, 9, 12, 20, 23, 35, 38, 54, 57, 77, 80, 104, 107, 135, 138, 170, 173, 209, 212, 252, 255, 299, 302, 350, 353, 405, 408, 464, 467, 527, 530, 594, 597, 665, 668, 740, 743, 819, 822, 902, 905, 989, 992, 1080, 1083, 1175, 1178, 1274, 1277, 1377, 1380, 1484, 1487, 1595
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 12 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 2 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=2.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, this sequence (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row n=2 of A056011.
Column k=2 of A056023.

Programs

  • Magma
    [(1 + (n+1)^2 - (n-2)*(-1)^n)/2: n in [1..80]];
    
  • Mathematica
    k := 2; Table[(1 + (n+k-1)^2 + (n-k) (-1)^(n+k-1))/2, {n, 80}]
  • Python
    def A373662(n): return ((n+1)*(n+2)-1 if n&1 else n*(n+1)+5)>>1 # Chai Wah Wu, Jun 23 2024

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = A131179(n+1) + (-1)^n.
G.f.: -x*(2*x^4-3*x^3+3*x+2)/((x+1)^2*(x-1)^3). - Alois P. Heinz, Jun 12 2024

A373663 a(n) = (1 + (n+2)^2 + (n-3)*(-1)^n)/2.

Original entry on oeis.org

6, 8, 13, 19, 24, 34, 39, 53, 58, 76, 81, 103, 108, 134, 139, 169, 174, 208, 213, 251, 256, 298, 303, 349, 354, 404, 409, 463, 468, 526, 531, 593, 598, 664, 669, 739, 744, 818, 823, 901, 906, 988, 993, 1079, 1084, 1174, 1179, 1273, 1278, 1376, 1381, 1483, 1488, 1594
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 12 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 3 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=3.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), this sequence (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row 3 of the example in A056011, Column 3 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+2)^2 + (n-3)*(-1)^n)/2: n in [1..80]];
    
  • Mathematica
    k := 3; Table[(1 + (n+k-1)^2 + (n-k) (-1)^(n+k-1))/2, {n, 80}]
  • Python
    def A373663(n): return ((n+1)*(n+2)+6 if n&1 else (n+2)*(n+3)-4)>>1 # Chai Wah Wu, Jun 23 2024

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = A373662(n+1) - (-1)^n.
G.f.: -x*(x^4+2*x^3-7*x^2+2*x+6)/((x+1)^2*(x-1)^3).

A374004 a(n) = (1 + (n+3)^2 - (n-4)*(-1)^n)/2.

Original entry on oeis.org

7, 14, 18, 25, 33, 40, 52, 59, 75, 82, 102, 109, 133, 140, 168, 175, 207, 214, 250, 257, 297, 304, 348, 355, 403, 410, 462, 469, 525, 532, 592, 599, 663, 670, 738, 745, 817, 824, 900, 907, 987, 994, 1078, 1085, 1173, 1180, 1272, 1279, 1375, 1382, 1482, 1489, 1593
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 4 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=4.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), this sequence (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row 4 of the table in A056011.
Column 4 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+3)^2 - (n-4)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(7*x^4 - 7*x^3 - 10*x^2 + 7 x + 7)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 4; Table[(1 + (n+k-1)^2 + (n-k) (-1)^(n+k-1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(7*x^4-7*x^3-10*x^2+7x+7)/((x+1)^2*(x-1)^3).
a(n) = A373663(n+1) + (-1)^n.

A374005 a(n) = (1 + (n+4)^2 + (n-5)*(-1)^n)/2.

Original entry on oeis.org

15, 17, 26, 32, 41, 51, 60, 74, 83, 101, 110, 132, 141, 167, 176, 206, 215, 249, 258, 296, 305, 347, 356, 402, 411, 461, 470, 524, 533, 591, 600, 662, 671, 737, 746, 816, 825, 899, 908, 986, 995, 1077, 1086, 1172, 1181, 1271, 1280, 1374, 1383, 1481, 1490, 1592, 1601
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 5 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=5.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), this sequence (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row 5 of the table in A056011.
Column 5 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+4)^2 + (n-5)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(6*x^4 + 2*x^3 - 21*x^2 + 2*x + 15)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 5; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(6*x^4+2*x^3-21*x^2+2*x+15)/((x+1)^2*(x-1)^3).
a(n) = A374004(n+1) - (-1)^n.

A374007 a(n) = (1 + (n+5)^2 - (n-6)*(-1)^n)/2.

Original entry on oeis.org

16, 27, 31, 42, 50, 61, 73, 84, 100, 111, 131, 142, 166, 177, 205, 216, 248, 259, 295, 306, 346, 357, 401, 412, 460, 471, 523, 534, 590, 601, 661, 672, 736, 747, 815, 826, 898, 909, 985, 996, 1076, 1087, 1171, 1182, 1270, 1281, 1373, 1384, 1480, 1491, 1591, 1602
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 6 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=6.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), this sequence (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row 6 of the table in A056011.
Column 6 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+5)^2 - (n-6)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(16*x^4 - 11*x^3 - 28*x^2 + 11*x + 16)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 6; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(16*x^4-11*x^3-28*x^2+11*x+16)/((x+1)^2*(x-1)^3).
a(n) = A374005(n+1) + (-1)^n.

A374008 a(n) = (1 + (n+6)^2 + (n-7)*(-1)^n)/2.

Original entry on oeis.org

28, 30, 43, 49, 62, 72, 85, 99, 112, 130, 143, 165, 178, 204, 217, 247, 260, 294, 307, 345, 358, 400, 413, 459, 472, 522, 535, 589, 602, 660, 673, 735, 748, 814, 827, 897, 910, 984, 997, 1075, 1088, 1170, 1183, 1269, 1282, 1372, 1385, 1479, 1492, 1590, 1603, 1705
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 7 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=7.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), this sequence (k=7), A374009 (k=8), A374010 (k=9), A374011 (k=10).
Row 7 of the table in A056011.
Column 7 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+6)^2 + (n-7)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(15*x^4 + 2*x^3 - 43*x^2 + 2 x + 28)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 7; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(15*x^4+2*x^3-43*x^2+2x+28)/((x+1)^2*(x-1)^3).
a(n) = A374007(n+1) - (-1)^n.

A374009 a(n) = (1 + (n+7)^2 - (n-8)*(-1)^n)/2.

Original entry on oeis.org

29, 44, 48, 63, 71, 86, 98, 113, 129, 144, 164, 179, 203, 218, 246, 261, 293, 308, 344, 359, 399, 414, 458, 473, 521, 536, 588, 603, 659, 674, 734, 749, 813, 828, 896, 911, 983, 998, 1074, 1089, 1169, 1184, 1268, 1283, 1371, 1386, 1478, 1493, 1589, 1604, 1704, 1719
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 8 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=8.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), this sequence (k=8), A374010 (k=9), A374011 (k=10).
Row 8 of the table in A056011.
Column 8 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+7)^2 - (n-8)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(29*x^4 - 15*x^3 - 54*x^2 + 15*x + 29)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 8; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(29*x^4-15*x^3-54*x^2+15*x+29)/((x+1)^2*(x-1)^3).
a(n) = A374008(n+1) + (-1)^n.

A374010 a(n) = (1 + (n+8)^2 + (n-9)*(-1)^n)/2.

Original entry on oeis.org

45, 47, 64, 70, 87, 97, 114, 128, 145, 163, 180, 202, 219, 245, 262, 292, 309, 343, 360, 398, 415, 457, 474, 520, 537, 587, 604, 658, 675, 733, 750, 812, 829, 895, 912, 982, 999, 1073, 1090, 1168, 1185, 1267, 1284, 1370, 1387, 1477, 1494, 1588, 1605, 1703, 1720, 1822
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 9 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=9.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), this sequence (k=9), A374011 (k=10).
Row 9 of the table in A056011.
Column 9 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+8)^2 + (n-9)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(28*x^4 + 2*x^3 - 73*x^2 + 2*x + 45)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 9; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(28*x^4+2*x^3-73*x^2+2*x+45)/((x+1)^2*(x-1)^3).
a(n) = A374009(n+1) - (-1)^n.

A374011 a(n) = (1 + (n+9)^2 - (n-10)*(-1)^n)/2.

Original entry on oeis.org

46, 65, 69, 88, 96, 115, 127, 146, 162, 181, 201, 220, 244, 263, 291, 310, 342, 361, 397, 416, 456, 475, 519, 538, 586, 605, 657, 676, 732, 751, 811, 830, 894, 913, 981, 1000, 1072, 1091, 1167, 1186, 1266, 1285, 1369, 1388, 1476, 1495, 1587, 1606, 1702, 1721, 1821
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 24 2024

Keywords

Comments

Fill an array with the natural numbers n = 1,2,... along diagonals in alternating 'down' and 'up' directions. a(n) is row 10 of the boustrophedon-style array (see example).
In general, row k is given by (1+t^2+(n-k)*(-1)^t)/2, t = n+k-1. Here, k=10.

Examples

			       [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12]
  [ 1]   1    3    4   10   11   21   22   36   37   55   56   78   ...
  [ 2]   2    5    9   12   20   23   35   38   54   57   77   ...
  [ 3]   6    8   13   19   24   34   39   53   58   76   ...
  [ 4]   7   14   18   25   33   40   52   59   75   ...
  [ 5]  15   17   26   32   41   51   60   74   ...
  [ 6]  16   27   31   42   50   61   73   ...
  [ 7]  28   30   43   49   62   72   ...
  [ 8]  29   44   48   63   71   ...
  [ 9]  45   47   64   70   ...
  [10]  46   65   69   ...
  [11]  66   68   ...
  [12]  67   ...
        ...
		

Crossrefs

For rows k = 1..10: A131179 (k=1) n>0, A373662 (k=2), A373663 (k=3), A374004 (k=4), A374005 (k=5), A374007 (k=6), A374008 (k=7), A374009 (k=8), A374010 (k=9), this sequence (k=10).
Row 10 of the table in A056011.
Column 10 of the rectangular array in A056023.

Programs

  • Magma
    [(1 + (n+9)^2 - (n-10)*(-1)^n)/2: n in [1..80]];
  • Mathematica
    CoefficientList[Series[-(46*x^4 - 19*x^3 - 88*x^2 + 19*x + 46)/((x + 1)^2*(x - 1)^3), {x, 0, 50}], x]
    k := 10; Table[(1 + (n + k - 1)^2 + (n - k) (-1)^(n + k - 1))/2, {n, 80}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: -x*(46*x^4-19*x^3-88*x^2+19*x+46)/((x+1)^2*(x-1)^3).
a(n) = A374010(n+1) + (-1)^n.
Showing 1-10 of 11 results. Next