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

A265611 a(n) = a(n-1) + floor((n-1)/2) - (-1)^n + 2 for n>=2, a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 4, 8, 10, 15, 18, 24, 28, 35, 40, 48, 54, 63, 70, 80, 88, 99, 108, 120, 130, 143, 154, 168, 180, 195, 208, 224, 238, 255, 270, 288, 304, 323, 340, 360, 378, 399, 418, 440, 460, 483, 504, 528, 550, 575, 598, 624, 648, 675, 700, 728, 754, 783, 810, 840
Offset: 0

Views

Author

Peter Luschny, Dec 17 2015

Keywords

Crossrefs

Cf. A084964 and A097065, after the first 3: a(n+1) - a(n) for n>0.
Cf. A055998, after 3: a(n+1) + a(n) for n>0.
Cf. A063929: a(2*n+1) gives the second column of the triangle; for n>0, a(2*n) gives the third column.

Programs

  • Magma
    [1] cat [(2*n*(n+6)-5*(-1)^n+5)/8: n in [1..60]]; // Bruno Berselli, Dec 18 2015
  • Maple
    A265611 := proc(n) iquo(n+1,2); %*(%+irem(n+1,2)+2)+0^n end:
    seq(A265611(n), n=0..55);
  • Mathematica
    Join[{1}, Table[(2 n (n + 6) - 5 (-1)^n + 5)/8, {n, 1, 60}]] (* Bruno Berselli, Dec 18 2015 *)
  • PARI
    Vec((x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1) + O(x^1000)) \\ Altug Alkan, Dec 18 2015
    
  • Sage
    # The initial values x, y = 0, 1 give the quarter-squares A002620.
    def A265611():
        x, y = 1, 2
        while True:
           yield x
           x, y = x + y, x//y + 1
    a = A265611(); print([next(a) for i in range(60)])
    

Formula

O.g.f.: (x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1).
E.g.f.: 1-(5/8)*exp(-x)+(1/8)*(5+14*x+2*x^2)*exp(x).
a(2*n) = n*(n+3) + 0^n = A028552(n) + 0^n. [Here 0^0 = 1, otherwise 0^s = 0. - N. J. A. Sloane, Aug 26 2022]
a(2*n+1) = (n+1)*(n+3) = A005563(n+1).
a(n+1) - a(n) = floor(n/2) + 2 + (-1)^n - 0^n.
a(n) = a(-n-6) = (2*n*(n+6) - 5*(-1)^n + 5)/8 for n>0, a(0)=1. [Bruno Berselli, Dec 18 2015]
For n>0, a(n) = n + 1 + Sum_{i=1..n+1} floor(i/2) + (-1)^i = n + floor((n+1)^2/4) + (1 - (-1)^n)/2. - Enrique Pérez Herrero, Dec 18 2015
Sum_{n>=0} 1/a(n) = 85/36. - Enrique Pérez Herrero, Dec 18 2015
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>5. - R. H. Hardin, Dec 21 2015, proved by Susanne Wienand for the algorithm sent to the seqfan mailing list and used in the Sage script below.
a(n) = A002620(n+1) + A052928(n+1) for n>=1. (Note A198442(n) = A002620(n+2) - A052928(n+2) for n>=1.) - Peter Luschny, Dec 22 2015
a(n) = (floor((n+3)/2)-1)*(ceiling((n+3)/2)+1) for n>0. - Wesley Ivan Hurt, Mar 30 2017

A277978 a(n) = 3*n*(n+3).

Original entry on oeis.org

0, 12, 30, 54, 84, 120, 162, 210, 264, 324, 390, 462, 540, 624, 714, 810, 912, 1020, 1134, 1254, 1380, 1512, 1650, 1794, 1944, 2100, 2262, 2430, 2604, 2784, 2970, 3162, 3360, 3564, 3774, 3990, 4212, 4440, 4674, 4914, 5160, 5412, 5670, 5934, 6204, 6480
Offset: 0

Views

Author

Emeric Deutsch, Nov 08 2016

Keywords

Comments

For n>= 3, a(n) is the second Zagreb index of the wheel graph with n+1 vertices. The second Zagreb index of a simple connected graph is the sum of the degree products d(i)d(j) over all edges ij of g.

Examples

			a(3) = 54. Indeed, the wheel graph with 4 vertices consists of 6 edges, each connecting two vertices of degree 3. Then, the second Zagreb index is 6*3*3 = 54.
		

Crossrefs

Programs

Formula

a(n) = 2 * A140091(n) = 3 * A028552(n) = 6 * A000096(n).
G.f.: 6*x*(2-x)/(1-x)^3
a(n) = A003154(n+1) - A003215(n-1). See Hexagonal Stars illustration. - Leo Tavares, Aug 20 2021

A285089 Rectangular array by antidiagonals: row n is the ordered sequence of numbers k that minimize |d(n+1-k) - d(k)|, where d(i) are the divisors of n.

Original entry on oeis.org

1, 4, 2, 9, 6, 3, 16, 12, 8, 10, 25, 20, 15, 18, 5, 36, 30, 24, 28, 21, 14, 49, 42, 35, 40, 32, 50, 7, 64, 56, 48, 54, 45, 66, 27, 44, 81, 72, 63, 70, 60, 84, 55, 78, 33, 100, 90, 80, 88, 77, 104, 91, 98, 65, 22, 121, 110, 99, 108, 96, 126, 112, 170, 105, 52
Offset: 1

Views

Author

Clark Kimberling, Apr 13 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the natural numbers, A000027.
Every prime (A000040) occurs in column 1.
Row 1: A000290 (squares)
Row 2: A002378 (oblong numbers)
Row 3: A005563
Row 4: A028552 (for n>=2)

Examples

			Taking n = 12, the divisors are 1,2,3,4,6,12, so that for k=1..6, the numbers d(n+1-k) - d(k) are 12-1, 6-2, 4-3, 3-4, 2-6, 1-12.  Thus, the number k that minimizes |d(n+1-k) - d(k)| is 1, so that 12 appears in row 1 (with the top row as row 0), consisting of numbers for which the minimal value is 1.
Northwest corner:
  1   4   9   16   25   36   49   64   81   10
  2   6   12  20   30   42   56   72   90   110
  3   8   15  24   35   48   63   80   99   120
  10  18  28  40   54   70   88   108  130  154
  5   21  32  45   60   77   96   117  140  165
  14  50  66  84   104  126  160  176  204  234
  7   27  55  91   112  135  160  187  216  247
  44  78  98  170  198  228  260  294  330  368
		

Crossrefs

Programs

  • Mathematica
    d[n_] := Divisors[n]; k[n_] := Length[d[n]]; x[n_, i_] := d[n][[i]];
    a[n_] := If[OddQ[k[n]], 0, x[n, k[n]/2 + 1] - x[n, k[n]/2]]
    t = Table[a[j], {j, 1, 30000}];
    r[n_] := Flatten[Position[t, n]]; v[n_, k_] := r[n][[k]];
    w = Table[v[n, k], {n, 0, 10}, {k, 1, 10}];
    TableForm[w] (* A285089, array *)
    Table[v[n - k, k], {n, 0, 60}, {k, n, 1, -1}] // Flatten (* A285089, sequence *)

Formula

row 1: k^2 for k>=1
row 2: k*(k+1) for k>=1
row 3: k*(k+2) for k>=3
row 4: k*(k+3) for k>=2
row 5: k*(k+4) for k>=3
row 6: k*(k+5) for k>=5
row 7: k*(k+6) for k>=7

A367076 Irregular triangle read by rows: T(n,k) (0 <= n, 0 <= k < 2^n). T(n,k) = -Sum_{i=0..k} A365968(n,i).

Original entry on oeis.org

0, 1, 0, 3, 4, 3, 0, 6, 10, 12, 12, 12, 10, 6, 0, 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10, 0, 15, 28, 39, 48, 57, 64, 69, 72, 79, 84, 87, 88, 89, 88, 85, 80, 85, 88, 89, 88, 87, 84, 79, 72, 69, 64, 57, 48, 39, 28, 15, 0, 21, 40, 57, 72, 87
Offset: 0

Views

Author

John Tyler Rascoe, Nov 05 2023

Keywords

Examples

			Triangle begins:
    k=0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
n=0:  0;
n=1:  1,  0;
n=2:  3,  4,  3,  0;
n=3:  6, 10, 12, 12, 12, 10,  6,  0;
n=4; 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10,  0;
		

Crossrefs

Cf. A000217 (column k=0), A028552 (column k=1), A192021 (row sums).

Programs

  • Mathematica
    nmax=10; row[n_]:=Join[CoefficientList[Series[1/(1-x)*Sum[ i/(1+x^2^(i-1))*Product[1+x^2^j,{j,0,i-2}],{i,n}],{x,0,2^n-1}],x],{0}]; Array[row,6,0] (* Stefano Spezia, Dec 23 2023 *)
  • Python
    def row_gen(n):
        x = 0
        for k in range(2**n):
            b = bin(k)[2:].zfill(n)
            x += sum((-1)**(int(b[n-i])+1)*i for i in range(1,n+1))
            yield(-x)
    def A367076_row_n(n): return(list(row_gen(n)))

Formula

T(n,k) = Sum_{i=0..n} abs(k + 1 - (2^i) * round((k+1)/2^i)) * i.
G.f. for n-th row: 1/(1-x) * Sum_{i=1..n} (i/(1+x^2^(i-1)) * Product_{j=0..i-2} 1 + x^2^j).

A380841 Array read by ascending antidiagonals: A(n,k) = n! * [x^n] 1/(1 - x*exp(x))^k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 2, 1, 0, 21, 10, 3, 1, 0, 148, 66, 18, 4, 1, 0, 1305, 560, 141, 28, 5, 1, 0, 13806, 5770, 1380, 252, 40, 6, 1, 0, 170401, 69852, 16095, 2776, 405, 54, 7, 1, 0, 2403640, 970886, 217458, 35940, 4940, 606, 70, 8, 1, 0, 38143377, 15228880, 3335745, 533304, 70045, 8088, 861, 88, 9, 1
Offset: 0

Views

Author

Stefano Spezia, Feb 05 2025

Keywords

Examples

			Array begins as:
  1,    1,    1,     1,     1,     1,      1, ...
  0,    1,    2,     3,     4,     5,      6, ...
  0,    4,   10,    18,    28,    40,     54, ...
  0,   21,   66,   141,   252,   405,    606, ...
  0,  148,  560,  1380,  2776,  4940,   8088, ...
  0, 1305, 5770, 16095, 35940, 70045, 124350, ...
  ...
		

Crossrefs

Cf. A380843 (antidiagonal sums).
Columns k=0..4 give A000007, A006153, A377529, A377530, A379993.
Rows n=0..2 give A000012, A001477, A028552.
Main diagonal gives A380842.
A(n,n+1) gives A213643(n+1).

Programs

  • Mathematica
    A[n_,k_]:=n!SeriesCoefficient[1/(1-x*Exp[x])^k,{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = n! * Sum_{j=0..n} j^(n-j) * binomial(j+k-1,j)/(n-j)!. - Seiichi Manyama, Feb 06 2025

A070895 Triangle read by rows where T(n+1,k)=T(n,k)+n*T(n-1,k) starting with T(n,n)=1 and T(n,k)=0 if n

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 10, 6, 4, 1, 1, 26, 18, 8, 5, 1, 1, 76, 48, 28, 10, 6, 1, 1, 232, 156, 76, 40, 12, 7, 1, 1, 764, 492, 272, 110, 54, 14, 8, 1, 1, 2620, 1740, 880, 430, 150, 70, 16, 9, 1, 1, 9496, 6168, 3328, 1420, 636, 196, 88, 18, 10, 1, 1, 35696, 23568
Offset: 0

Views

Author

Henry Bottomley, May 23 2002

Keywords

Comments

For n>k+1, T(n,k) is a multiple of k+2.
Eigentriangle of inverse of (-1)^(n-k)*A094587. Row sums are A187044. - Paul Barry, Mar 02 2011

Examples

			Rows start: 1; 1,1; 2,1,1; 4,3,1,1; 10,6,4,1,1; etc.
Triangle begins
1,
1, 1,
2, 1, 1,
4, 3, 1, 1,
10, 6, 4, 1, 1,
26, 18, 8, 5, 1, 1,
76, 48, 28, 10, 6, 1, 1,
232, 156, 76, 40, 12, 7, 1, 1
Production matrix begins
1, 1,
1, 0, 1,
1, 1, 0, 1,
2, 1, 1, 0, 1,
4, 3, 1, 1, 0, 1,
10, 6, 4, 1, 1, 0, 1,
26, 18, 8, 5, 1, 1, 0, 1,
76, 48, 28, 10, 6, 1, 1, 0, 1,
232, 156, 76, 40, 12, 7, 1, 1, 0, 1
Inverse begins
1,
-1, 1,
-1, -1, 1,
0, -2, -1, 1,
0, 0, -3, -1, 1,
0, 0, 0, -4, -1, 1,
0, 0, 0, 0, -5, -1, 1,
0, 0, 0, 0, 0, -6, -1, 1
- _Paul Barry_, Mar 02 2011
		

Crossrefs

Columns include A000085, A000932, A059480. Right hand columns effectively include A000012 (twice), A000027, A005843, A028552. Cf. A062323 for a triangle with similar formulas.

Formula

T(n, k+1)=(T(n, k-1)-T(n-1, k))/k for 0

A091435 Array T(n,k) = n*(n+k), read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 4, 2, 0, 9, 6, 3, 0, 16, 12, 8, 4, 0, 25, 20, 15, 10, 5, 0, 36, 30, 24, 18, 12, 6, 0, 49, 42, 35, 28, 21, 14, 7, 0, 64, 56, 48, 40, 32, 24, 16, 8, 0, 81, 72, 63, 54, 45, 36, 27, 18, 9, 0, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 121, 110, 99, 88, 77, 66, 55, 44, 33, 22, 11, 0
Offset: 0

Author

Ross La Haye, Mar 02 2004

Keywords

Examples

			Table begins
   0;
   1,  0;
   4,  2,  0;
   9,  6,  3,  0;
  16, 12,  8,  4,  0;
  25, 20, 15, 10,  5,  0;
  36, 30, 24, 18, 12,  6,  0;
  ...
a(5,3) = 40 because 5 * (5 + 3) = 5 * 8 = 40.
		

Crossrefs

Columns: a(n, 0) = A000290(n), a(n, 1) = A002378(n), a(n, 2) = A005563(n), a(n, 3) = A028552(n), a(n, 4) = A028347(n+2), a(n, 5) = A028557(n), a(n, 6) = A028560(n), a(n, 7) = A028563(n), a(n, 8) = A028566(n). Diagonals: a(n, n-4) = A054000(n-1), a(n, n-3) = A014107(n), a(n, n-2) = A046092(n-1), a(n, n-1) = A000384(n), a(n, n) = A001105(n), a(n, n+1) = A014105(n), a(n, n+2) = A046092(n), a(n, n+3) = A014106(n), a(n, n+4) = A054000(n+1), a(n, n+5) = A033537(n). Also note that the sums of the antidiagonals = A002411.

Programs

  • GAP
    Flat(List([0..11],j->List([0..j],i->j*(j-i)))); # Muniru A Asiru, Sep 11 2018
  • Maple
    seq(seq((j-i)*j,i=0..j),j=0..14);
  • Mathematica
    Table[# (# + k) &[m - k], {m, 0, 11}, {k, 0, m}] // Flatten (* Michael De Vlieger, Oct 15 2018 *)

Formula

G.f.: x*(1+x-2*x^2*y)/((1-x*y)^2*(1-x)^3). - Vladeta Jovovic, Mar 05 2004

Extensions

More terms from Emeric Deutsch, Mar 15 2004

A095729 A002260 squared, as an infinite lower triangular matrix, read by rows.

Original entry on oeis.org

1, 3, 4, 6, 10, 9, 10, 18, 21, 16, 15, 28, 36, 36, 25, 21, 40, 54, 60, 55, 36, 28, 54, 75, 88, 90, 78, 49, 36, 70, 99, 120, 130, 126, 105, 64, 45, 88, 126, 156, 175, 180, 168, 136, 81, 55, 108, 156, 196, 225, 240, 238, 216, 171, 100, 66, 130, 189, 240, 280, 306, 315, 304
Offset: 1

Author

Gary W. Adamson, Jun 05 2004, Feb 17 2007

Keywords

Comments

Sum of terms in n-th row = A001296(n-1).
By columns, k; even columns sequences as f(x), x = 1, 2, 3...; = (k/2)x^2 + (k^2 - k/2)x. For example, terms in row 2, (A028552): 4, 10, 18, 28, 40...= x^2 + 3x; row 4 = 2x^2 + 14x, row 6 = 3x^2 + 33x, row 8 = 4x^2 + 60x...etc.
The number in the i-th row and j-th column (j<=i) of the squared matrix is j*(binomial[i + 1, 2] - binomial[j, 2]). - Keith Schneider (schneidk(AT)email.unc.edu), Jul 23 2007

Examples

			First few rows of the triangle are
  1;
  3, 4;
  6, 10, 9;
  10, 18, 21, 16;
  15, 28, 36, 36, 25;
  21, 40, 54, 60, 55, 36,
  ...
[1 0 0 / 1 2 0 / 1 2 3]^2 = [1 0 0 / 3 4 0 / 6 10 9].
Next higher order matrix generates rows of the one lower order, plus the next row.
For example, the 4 X 4 matrix [1 0 0 0 / 1 2 0 0 / 1 2 3 0 / 1 2 3 4]^2 = [1 0 0 0 / 3 4 0 0 / 6 10 9 0 / 10 18 21 16].
		

Crossrefs

Programs

  • Mathematica
    FindRow[n_] := Module[{i = 0}, While[Binomial[i, 2] < n, i++ ]; i - 1]; FindCol[n_] := n - Binomial[FindRow[n], 2]; A095729[n_] := FindCol[n](Binomial[FindRow[n]+1, 2] - Binomial[FindCol[n], 2]); Table[A095729[i], {i, 1, 91}] (* Keith Schneider (schneidk(AT)email.unc.edu), Jul 23 2007 *)

Extensions

More terms from Keith Schneider (schneidk(AT)email.unc.edu), Jul 23 2007
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A132773 a(n) = n*(n + 31).

Original entry on oeis.org

0, 32, 66, 102, 140, 180, 222, 266, 312, 360, 410, 462, 516, 572, 630, 690, 752, 816, 882, 950, 1020, 1092, 1166, 1242, 1320, 1400, 1482, 1566, 1652, 1740, 1830, 1922, 2016, 2112, 2210, 2310, 2412, 2516, 2622, 2730, 2840, 2952, 3066, 3182, 3300, 3420, 3542, 3666
Offset: 0

Author

Omar E. Pol, Aug 28 2007

Keywords

Programs

Formula

G.f.: 2*x*(-16+15*x)/(-1+x)^3. - R. J. Mathar, Nov 14 2007
a(n) = 2*A132758(n). - R. J. Mathar, Jul 22 2009
a(n) = 2*n + a(n-1) + 30, with n > 0, a(0)=0. - Vincenzo Librandi, Aug 03 2010
From Amiram Eldar, Jan 16 2021: (Start)
Sum_{n>=1} 1/a(n) = H(31)/31 = A001008(31)/A102928(31) = 290774257297357/2238255069850800, where H(k) is the k-th harmonic number.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2)/31 - 7313175618421/319750724264400. (End)
From Elmo R. Oliveira, Dec 13 2024: (Start)
E.g.f.: exp(x)*x*(32 + x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A152919 a(1)=1, for n>1, a(n) = n^2/4 + n/2 for even n, a(n) = n^2/4 + n - 5/4 for odd n.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 20, 28, 30, 40, 42, 54, 56, 70, 72, 88, 90, 108, 110, 130, 132, 154, 156, 180, 182, 208, 210, 238, 240, 270, 272, 304, 306, 340, 342, 378, 380, 418, 420, 460, 462, 504, 506, 550, 552, 598, 600, 648, 650, 700, 702, 754, 756, 810, 812, 868
Offset: 1

Author

Roger L. Bagula, Dec 15 2008

Keywords

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, If[Mod[n, 2] == 0, n^2/4 + n/2, n^2/4 + n - 5/4]];
    Table[a[n], {n, 1, 100}]

Formula

From Chai Wah Wu, Jun 09 2020: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 6.
G.f.: x*(x^5 - x^4 - x - 1)/((x - 1)^3*(x + 1)^2). (End)
From Bernard Schott, Jun 10 2020: (Start)
Bisections are:
a(1) = 1 and a(2k+1) = A028552(k) for k >= 1,
a(2k) = A002378(k) for k >= 1, hence,
a(2k+2) = a(2k+1) + 2 for k >= 1. (End)
Previous Showing 41-50 of 64 results. Next