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

A156140 Accumulation of Stern's diatomic series: a(0)=-1, a(1)=0, and a(n+1) = (2e(n)+1)*a(n) - a(n-1) for n > 1, where e(n) is the highest power of 2 dividing n.

Original entry on oeis.org

-1, 0, 1, 3, 2, 7, 5, 8, 3, 13, 10, 17, 7, 18, 11, 15, 4, 21, 17, 30, 13, 35, 22, 31, 9, 32, 23, 37, 14, 33, 19, 24, 5, 31, 26, 47, 21, 58, 37, 53, 16, 59, 43, 70, 27, 65, 38, 49, 11, 50, 39, 67, 28, 73, 45, 62, 17, 57, 40, 63, 23, 52, 29, 35, 6, 43, 37, 68, 31, 87, 56, 81, 25, 94, 69
Offset: 0

Views

Author

Arie Werksma (Werksma(AT)Tiscali.nl), Feb 04 2009

Keywords

Crossrefs

From Yosu Yurramendi, Mar 09 2018: (Start)
a(2^m + 0) = A000027(m), m >= 0.
a(2^m + 1) = A002061(m+2), m >= 1.
a(2^m + 2) = A002522(m), m >= 2.
a(2^m + 3) = A033816(m-1), m >= 2.
a(2^m + 4) = A002061(m), m >= 2.
a(2^m + 5) = A141631(m), m >= 3.
a(2^m + 6) = A084849(m-1), m >= 3.
a(2^m + 7) = A056108(m-1), m >= 3.
a(2^m + 8) = A000290(m-1), m >= 3.
a(2^m + 9) = A185950(m-1), m >= 4.
a(2^m + 10) = A144390(m-1), m >= 4.
a(2^m + 12) = A014106(m-2), m >= 4.
a(2^m + 16) = A028387(m-3), m >= 4.
a(2^m + 18) = A250657(m-4), m >= 5.
a(2^m + 20) = A140677(m-3), m >= 5.
a(2^m + 32) = A028872(m-2), m >= 5.
a(2^m - 1) = A005563(m-1), m >= 0.
a(2^m - 2) = A028387(m-2), m >= 2.
a(2^m - 3) = A033537(m-2), m >= 2.
a(2^m - 4) = A008865(m-1), m >= 3.
a(2^m - 7) = A140678(m-3), m >= 3.
a(2^m - 8) = A014209(m-3), m >= 4.
a(2^m - 16) = A028875(m-2), m >= 5.
a(2^m - 32) = A108195(m-5), m >= 6.
(End)

Programs

  • Maple
    A156140 := proc(n)
        option remember ;
        if n <= 1 then
            n-1 ;
        else
            (2*A007814(n-1)+1)*procname(n-1)-procname(n-2) ;
        end if;
    end proc:
    seq(A156140(n),n=0..80) ; # R. J. Mathar, Mar 14 2009
  • Mathematica
    Fold[Append[#1, (2 IntegerExponent[#2, 2] + 1) #1[[-1]] - #1[[-2]] ] &, {-1, 0}, Range[73]] (* Michael De Vlieger, Mar 09 2018 *)
  • PARI
    first(n)=my(v=vector(n+1)); v[1]=-1; v[2]=0; for(k=1,n-1,v[k+2]=(2*valuation(k,2)+1)*v[k+1] - v[k]); v \\ Charles R Greathouse IV, Apr 05 2016
    
  • PARI
    fusc(n)=my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b
    a(n)=my(m=1,s,t); if(n==0, return(-1)); while(n%2==0, s+=fusc(n>>=1)); while(n>1, t=logint(n,2); n-=2^t; s+=m*fusc(n)*(t^2+t+1); m*=-t); m*(n-1) + s \\ Charles R Greathouse IV, Dec 13 2016
    
  • R
    a <- c(0,1)
    maxlevel <- 6 # by choice
    for(m in 1:maxlevel) {
      a[2^(m+1)] <- m + 1
      for(k in 1:(2^m-1)) {
        r <- m - floor(log2(k)) - 1
        a[2^r*(2*k+1)] <- a[2^r*(2*k)] + a[2^r*(2*k+2)]
    }}
    a
    # Yosu Yurramendi, May 08 2018

Formula

Let b(n) = A002487(n), Stern's diatomic series.
a(n+1)*b(n) - a(n)*b(n+1) = 1 for n >= 0.
a(2n+1) = a(n) + a(n+1) + b(n) + b(n+1) for n >= 0.
a(2n) = a(n) + b(n) for n >= 0.
a(2^n + k) = -n*a(k) + (n^2 + n + 1)*b(k) for 0 <= k <= 2^n.
b(2^n + k) = -a(k) + (n + 1)*b(k) for 0 <= k <= 2^n.
a(2^m + k) = b(2^m+k)*m + b(k), m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Mar 09 2018
a(2^(m+1)+2^m+1) = 2*m+1, m >= 0. - Yosu Yurramendi, Mar 09 2018
From Yosu Yurramendi, May 08 2018: (Start)
a(2^m) = m, m >= 0.
a(2^r*(2*k+1)) = a(2^r*(2*k)) + a(2^r*(2*k+2)), r = m - floor(log_2(k)) - 1, m > 0, 1 <= k < 2^m.
(End)

A185868 (Odd,odd)-polka dot array in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

1, 4, 6, 11, 13, 15, 22, 24, 26, 28, 37, 39, 41, 43, 45, 56, 58, 60, 62, 64, 66, 79, 81, 83, 85, 87, 89, 91, 106, 108, 110, 112, 114, 116, 118, 120, 137, 139, 141, 143, 145, 147, 149, 151, 153, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is one of four polka dot arrays in the natural number array A000027:
(odd,odd): A185868
(odd,even): A185869
(even,odd): A185870
(even,even): A185871
row 1: A084849
col 1: A000384
col 2: A091823
diag (1,13,...): A102083
diag (4,24,...): A085250
antidiagonal sums: A059722

Examples

			The natural number array A000027 has northwest corner
  1...2...4...7...11
  3...5...8...12..17
  6...9...13..18..24
  10..14..19..25..32
  15..20..26..33..41
The numbers in (odd,odd) positions comprise A185868:
  1....4....11...22...37
  6....13...24...39...58
  15...26...41...60...83
  28...43...62...85...112
		

Crossrefs

Cf. A000027 (as an array), A185872, A185869, A185870, A185871.

Programs

  • Mathematica
    f[n_,k_]:=2n-1+(n+k-2)(2n+2k-3);
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
  • Python
    from math import isqrt, comb
    def A185868(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        x = n-comb(a,2)
        y = a-x+1
        return y*((y+(c:=x<<1)<<1)-7)+x*(c-5)+5 # Chai Wah Wu, Jun 18 2025

Formula

T(n,k) = 2*n-1+(n+k-2)*(2*n+2*k-3).

A210521 Array read by downward antidiagonals: T(n,k) = (n+k-1)*(n+k-2) + n + floor((n+k)/2)*(1-2*floor((n+k)/2)), for n, k > 0.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Jan 26 2013

Keywords

Comments

Enumeration table T(n,k). The order of the list: T(1,1)=1; for k>0: T(1,2*k+1),T(1,2*k); T(2,2*k),T(2,2*k-1); ... T(2*k,2),T(2*k,1); T(2*k+1,1).
The order of the list is descent stairs from the northeast to southwest: step to the west, step to the south, step to the west and so on. The length of each step is 1 or alternation of elements pair adjacent antidiagonals.
Permutation of the natural numbers.
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.

Examples

			The start of the sequence as a table:
   1,  3,  2,  8,  7,  17,  16,  30,  29, ...
   5,  4, 10,  9, 19,  18,  32,  31,  49, ...
   6, 12, 11, 21, 20,  34,  33,  51,  50, ...
  14, 13, 23, 22, 36,  35,  53,  52,  74, ...
  15, 25, 24, 38, 37,  55,  54,  76,  75, ...
  27, 26, 40, 39, 57,  56,  78,  77, 103, ...
  28, 42, 41, 59, 58,  80,  79, 105, 104, ...
  44, 43, 61, 60, 82,  81, 107, 106, 136, ...
  45, 63, 62, 84, 83, 109, 108, 138, 137, ...
  ...
The start of the sequence as a triangular array read by rows:
   1;
   3,  5;
   2,  4,  6;
   8, 10, 12, 14;
   7,  9, 11, 13, 15;
  17, 19, 21, 23, 25, 27;
  16, 18, 20, 22, 24, 26, 28;
  30, 32, 34, 36, 38, 40, 42, 44;
  29, 31, 33, 35, 37, 39, 41, 43, 45;
  ...
The sequence as array read by rows, the length of row r is 4*r-1. First 2*r-1 numbers are from row 2*r-1 of the triangular array above. Last 2*r numbers are from row 2*r of the triangular array. The start of the sequence:
1,3,5;
2,4,6,8,10,12,14;
7,9,11,13,15,17,19,21,23,25,27;
16,18,20,22,24,26,28,30,32,34,36,38,40,42,44;
29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65;
...
Row r contains 4*r-1 numbers: 2*r^2-5*r+4, 2*r^2-5*r+6, 2*r^2-5*r+8, ..., r*(2*r+3).
Considered as a triangle, the rows have constant parity.
		

Crossrefs

Cf. A000027, A204164, the main diagonal is A084849.

Programs

  • Mathematica
    T[n_, k_] := (n+k-1)(n+k-2) + 2n + Floor[(n+k)/2](1 - 2 Floor[(n+k)/2]);
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 03 2018 *)
  • Python
    t=int((math.sqrt(8*n-7)-1)/2)
    v=int((t+2)/2)
    result=2*n+v*(1-2*v)

Formula

As a table: T(n,k) = (n+k-1)*(n+k-2) + 2*n + floor((n+k)/2)*(1-2*floor((n+k)/2)).
As a linear sequence: a(n) = 2*A000027(n) + A204164(n)*(1-2*A204164(n)).
a(n) = 2*n+v*(1-2*v), where t = floor((-1+sqrt(8*n-7))/2) and v = floor((t+2)/2).
G.f. as a table: (2 - 2*y - 5*y^2 + 6*y^3 + 3*y^4 + x*y*(1 + 3*y-5*y^2 + y^3) + x^2*(- 3 + 7*y + 5*y^2 - 11*y^3 - 6*y^4) - x^3*(- 4 + 5*y + 7*y^2 - 9*y^3 + y^4) + x^4*(1 - y - 4*y^2 + y^3 + 7*y^4))/((- 1 + x)^3*(1 + x)^2*(- 1 + y)^3*(1 + y)^2). - Stefano Spezia, Dec 03 2018

A300401 Array T(n,k) = n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1) read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 3, 4, 7, 8, 7, 4, 5, 11, 14, 14, 11, 5, 6, 16, 22, 24, 22, 16, 6, 7, 22, 32, 37, 37, 32, 22, 7, 8, 29, 44, 53, 56, 53, 44, 29, 8, 9, 37, 58, 72, 79, 79, 72, 58, 37, 9, 10, 46, 74, 94, 106, 110, 106, 94, 74, 46, 10, 11, 56, 92, 119
Offset: 0

Views

Author

Keywords

Comments

Antidiagonal sums are given by 2*A055795.
Rows/columns n are binomial transform of {n, A152947(n+1), n, 0, 0, 0, ...}.
Some primes in the array are
n = 1: {2, 7, 11, 29, 37, 67, 79, 137, 191, 211, 277, 379, ...} = A055469, primes of the form k*(k + 1)/2 + 1;
n = 3: {3, 7, 37, 53, 479, 653, 1249, 1619, 2503, 3727, 4349, 5737, 7109, 8179, 9803, 11839, 12107, ...};
n = 4: {11, 37, 79, 137, 211, 821, 991, 1597, 1831, 2081, 2347, ...} = A188382, primes of the form 8*(2*k - 1)^2 + 2*(2*k - 1) + 1.

Examples

			The array T(n,k) begins
0     1    2    3    4     5     6     7     8     9    10    11  ...
1     2    4    7   11    16    22    29    37    46    56    67  ...
2     4    8   14   22    32    44    58    74    92   112   134  ...
3     7   14   24   37    53    72    94   119   147   178   212  ...
4    11   22   37   56    79   106   137   172   211   254   301  ...
5    16   32   53   79   110   146   187   233   284   340   401  ...
6    22   44   72  106   146   192   244   302   366   436   512  ...
7    29   58   94  137   187   244   308   379   457   542   634  ...
8    37   74  119  172   233   302   379   464   557   658   767  ...
9    46   92  147  211   284   366   457   557   666   784   911  ...
10   56  112  178  254   340   436   542   658   784   920  1066  ...
11   67  134  212  301   401   512   634   767   911  1066  1232  ...
12   79  158  249  352   467   594   733   884  1047  1222  1409  ...
13   92  184  289  407   538   682   839  1009  1192  1388  1597  ...
14  106  212  332  466   614   776   952  1142  1346  1564  1796  ...
15  121  242  378  529   695   876  1072  1283  1509  1750  2006  ...
16  137  274  427  596   781   982  1199  1432  1681  1946  2227  ...
17  154  308  479  667   872  1094  1333  1589  1862  2152  2459  ...
18  172  344  534  742   968  1212  1474  1754  2052  2368  2702  ...
19  191  382  592  821  1069  1336  1622  1927  2251  2594  2956  ...
20  211  422  653  904  1175  1466  1777  2108  2459  2830  3221  ...
...
The inverse binomial transforms of the columns are
0     1    2    3    4     5     6     7     8     9    10    11  ...  A001477
1     1    2    4    7    11    22    29    37    45    56    67  ...  A152947
0     1    2    3    4     5     6     7     8     9    10    11  ...  A001477
0     0    0    0    0     0     0     0     0     0     0     0  ...
0     0    0    0    0     0     0     0     0     0     0     0  ...
0     0    0    0    0     0     0     0     0     0     0     0  ...
...
		

References

  • Miklós Bóna, Introduction to Enumerative Combinatorics, McGraw-Hill, 2007.
  • L. Comtet, Advanced Combinatorics: The Art of Finite and Infinite Expansions, Reidel Publishing Company, 1974.
  • R. P. Stanley, Enumerative Combinatorics, second edition, Cambridge University Press, 2011.

Crossrefs

Programs

  • Maple
    T := (n, k) -> n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1);
    for n from 0 to 20 do seq(T(n, k), k = 0 .. 20) od;
  • Mathematica
    T[n_, k_] := n (Binomial[k, 2] + 1) + k (Binomial[n, 2] + 1);
    Table[T[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 07 2018 *)
  • Maxima
    T(n, k) := n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1)$
    for n:0 thru 20 do
      print(makelist(T(n, k), k, 0, 20));
    
  • PARI
    T(n, k) = n*(binomial(k,2) + 1) + k*(binomial(n,2) + 1);
    tabl(nn) = for (n=0, nn, for (k=0, nn, print1(T(n, k), ", ")); print); \\ Michel Marcus, Mar 12 2018

Formula

T(n,k) = T(k,n) = n*A152947(k+1) + k*A152947(n+1).
T(n,0) = A001477(n).
T(n,1) = A000124(n).
T(n,2) = A014206(n).
T(n,3) = A273465(3*n+2).
T(n,4) = A084849(n+1).
T(n,n) = A179000(n-1,n), n >= 1.
T(2*n,2*n) = 8*A081436(n-1), n >= 1.
T(2*n+1,2*n+1) = 2*A006000(2*n+1).
T(n,n+1) = A188377(n+3).
T(n,n+2) = A188377(n+2), n >= 1.
Sum_{k=0..n} T(k,n-k) = 2*(binomial(n, 4) + binomial(n, 2)).
G.f.: -((2*x*y - y - x)*(2*x*y - y - x + 1))/(((x - 1)*(y - 1))^3).
E.g.f.: (1/2)*(x + y)*(x*y + 2)*exp(x + y).

A211394 T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 08 2013

Keywords

Comments

Permutation of the natural numbers.
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.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(1,3), T(2,2), T(3,1);
T(1,2), T(2,1);
. . .
T(1,n), T(2,n-1), T(3,n-2), ... T(n,1);
T(1,n-1), T(2,n-3), T(3,n-4),...T(n-1,1);
. . .
First row matches with the elements antidiagonal {T(1,n), ... T(n,1)},
second row matches with the elements antidiagonal {T(1,n-1), ... T(n-1,1)}.
Table contains:
row 1 is alternation of elements A130883 and A096376,
row 2 accommodates elements A033816 in even places,
row 3 accommodates elements A100037 in odd places,
row 5 accommodates elements A100038 in odd places;
column 1 is alternation of elements A084849 and A000384,
column 2 is alternation of elements A014106 and A014105,
column 3 is alternation of elements A014107 and A091823,
column 4 is alternation of elements A071355 and |A168244|,
column 5 accommodates elements A033537 in even places,
column 7 is alternation of elements A100040 and A130861,
column 9 accommodates elements A100041 in even places;
the main diagonal is A058331,
diagonal 1, located above the main diagonal is A001844,
diagonal 2, located above the main diagonal is A001105,
diagonal 3, located above the main diagonal is A046092,
diagonal 4, located above the main diagonal is A056220,
diagonal 5, located above the main diagonal is A142463,
diagonal 6, located above the main diagonal is A054000,
diagonal 7, located above the main diagonal is A090288,
diagonal 9, located above the main diagonal is A059993,
diagonal 10, located above the main diagonal is |A147973|,
diagonal 11, located above the main diagonal is A139570;
diagonal 1, located under the main diagonal is A051890,
diagonal 2, located under the main diagonal is A005893,
diagonal 3, located under the main diagonal is A097080,
diagonal 4, located under the main diagonal is A093328,
diagonal 5, located under the main diagonal is A137882.

Examples

			The start of the sequence as table:
  1....5...2..12...7..23..16...
  6....3..13...8..24..17..39...
  4...14...9..25..18..40..31...
  15..10..26..19..41..32..60...
  11..27..20..42..33..61..50...
  28..21..43..34..62..51..85...
  22..44..35..63..52..86..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  5,6;
  2,3,4;
  12,13,14,15;
  7,8,9,10,11;
  23,24,25,26,27,28;
  16,17,18,19,20,21,22;
  . . .
Row number r matches with r numbers segment {(r+1)*r/2-r*(-1)^(r+1)-r+2,... (r+1)*r/2-r*(-1)^(r+1)+1}.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := (n+k)(n+k-1)/2 - (-1)^(n+k)(n+k-1) - k + 2;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    j=(t*t+3*t+4)/2-n
    result=(t+2)*(t+1)/2-(t+1)*(-1)**t-j+2

Formula

T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2.
As linear sequence
a(n) = A003057(n)*A002024(n)/2- A002024(n)*(-1)^A003056(n)-A004736(n)+2.
a(n) = (t+2)*(t+1)/2 - (t+1)*(-1)^t-j+2, where j=(t*t+3*t+4)/2-n and t=int((math.sqrt(8*n-7) - 1)/ 2).

A084850 2^(n-1)*(n^2+2n+2).

Original entry on oeis.org

1, 5, 20, 68, 208, 592, 1600, 4160, 10496, 25856, 62464, 148480, 348160, 806912, 1851392, 4210688, 9502720, 21299200, 47448064, 105119744, 231735296, 508559360, 1111490560, 2420113408, 5251268608, 11358175232, 24494735360
Offset: 0

Views

Author

Paul Barry, Jun 09 2003

Keywords

Comments

Binomial transform of A084849. a(n)=A014477(n-1)+A001787(n+1).

Crossrefs

Cf. A134083.

Programs

  • Mathematica
    LinearRecurrence[{6,-12,8},{1,5,20},40] (* Harvey P. Dale, Mar 15 2016 *)

Formula

G.f.: (1 - x+2x^2)/(1 - 2x)^3.
Equals A134083 * [1,2,3,...]. - Gary W. Adamson, Oct 07 2007

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

Original entry on oeis.org

2, 23, 86, 215, 434, 767, 1238, 1871, 2690, 3719, 4982, 6503, 8306, 10415, 12854, 15647, 18818, 22391, 26390, 30839, 35762, 41183, 47126, 53615, 60674, 68327, 76598, 85511, 95090, 105359, 116342, 128063, 140546, 153815, 167894, 182807, 198578, 215231, 232790
Offset: 1

Views

Author

Mohammad K. Azarian, Jul 26 2007

Keywords

Crossrefs

Programs

  • Magma
    [4*n^3-3*n^2+2*n-1: n in [1..40]]; // Vincenzo Librandi, Feb 12 2013
    
  • Magma
    I:=[2, 23, 86, 215]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 12 2013
  • Mathematica
    CoefficientList[Series[(2 + 15 x + 6 x^2 + x^3)/(1 - x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2013 *)
    Table[4n^3-3n^2+2n-1,{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{2,23,86,215},40] (* Harvey P. Dale, May 05 2018 *)

Formula

From Vincenzo Librandi, Feb 12 2013: (Start)
G.f.: x*(2 + 15*x + 6*x^2 + x^3)/(1 - x)^4.
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). (End)
E.g.f.: 1 - exp(x)*(1 - 3*x - 9*x^2 - 4*x^3). - Stefano Spezia, Dec 06 2024

A386479 a(0) = 0; thereafter a(n) = 2*n^2 - 3*n + 5.

Original entry on oeis.org

0, 4, 7, 14, 25, 40, 59, 82, 109, 140, 175, 214, 257, 304, 355, 410, 469, 532, 599, 670, 745, 824, 907, 994, 1085, 1180, 1279, 1382, 1489, 1600, 1715, 1834, 1957, 2084, 2215, 2350, 2489, 2632, 2779, 2930, 3085, 3244, 3407, 3574, 3745, 3920, 4099, 4282, 4469, 4660, 4855, 5054, 5257, 5464, 5675, 5890, 6109, 6332, 6559, 6790
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2025

Keywords

Comments

For n>0, a(n) is the maximum number of regions the plane can be divided into by drawing two n-chains (both finite and infinite regions are counted). See A386478 for further information.
We do not at present have an explicit construction that will achieve a(n) for n > 5.

Crossrefs

A column of the array in A386478.
Essentially the same (up to offset, initial terms, and the addition of a small constant) as several other sequences, including A014105, A014107, A084849, A096376, A236257, ....

Programs

  • Mathematica
    LinearRecurrence[{3,-3,1},{5,4,7},60] (* or *) a[n_]:=2n^2-3n+5;Array[a,60,0] (* James C. McMahon, Jul 26 2025 *)

Formula

From Stefano Spezia, Jul 26 2025: (Start)
G.f.: -x*(4-5*x+5*x^2) / (x-1)^3.
E.g.f.: exp(x)*(5 - x + 2*x^2) - 5. (End)

Extensions

Changed a(0) so as to match changes to A386478. - N. J. A. Sloane, Jul 26 2025

A130884 3n^3 + 2n^2 + n + 1.

Original entry on oeis.org

1, 7, 35, 103, 229, 431, 727, 1135, 1673, 2359, 3211, 4247, 5485, 6943, 8639, 10591, 12817, 15335, 18163, 21319, 24821, 28687, 32935, 37583, 42649, 48151, 54107, 60535, 67453, 74879, 82831, 91327, 100385, 110023, 120259, 131111
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 26 2007

Keywords

Crossrefs

Programs

  • Magma
    [3*n^3+2*n^2+n+1: n in [0..35]]; // Vincenzo Librandi, Feb 12 2013
  • Mathematica
    Table[3n^3+2n^2+n+1,{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,7,35,103},40] (* Harvey P. Dale, Jan 17 2012 *)

Formula

G.f.: (1+13*x^2+x^3+3*x)/(-1+x)^4. - R. J. Mathar, Nov 14 2007
a(0)=1, a(1)=7, a(2)=35, a(3)=103, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)- a(n-4) [Harvey P. Dale, Jan 17 2012]

A130885 3n^3 - 2n^2 + n - 1.

Original entry on oeis.org

1, 17, 65, 163, 329, 581, 937, 1415, 2033, 2809, 3761, 4907, 6265, 7853, 9689, 11791, 14177, 16865, 19873, 23219, 26921, 30997, 35465, 40343, 45649, 51401, 57617, 64315, 71513, 79229, 87481, 96287, 105665, 115633, 126209, 137411
Offset: 1

Views

Author

Mohammad K. Azarian, Jul 26 2007

Keywords

Crossrefs

Programs

  • Magma
    [3*n^3-2*n^2+n-1: n in [1..40]]; // Vincenzo Librandi, Feb 12 2013
    
  • Magma
    I:=[1, 17, 65, 163]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 12 2013
  • Mathematica
    Table[3*n^3 - 2*n^2 + n - 1, {n, 1, 40}] (* Vincenzo Librandi, Feb 12 2013 *)
    LinearRecurrence[{4,-6,4,-1},{1,17,65,163},40] (* Harvey P. Dale, Nov 21 2019 *)

Formula

G.f.: x*(1+13*x+3*x^2+x^3)/(-1+x)^4. - R. J. Mathar, Nov 14 2007
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Vincenzo Librandi, Feb 12 2013
Previous Showing 21-30 of 41 results. Next