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 31-40 of 69 results. Next

A375602 Triangle read by rows, where row n is a block of length n*(n^2 + 1)/2, which is a permutation of the numbers of its constituents; see Comments.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Aug 20 2024

Keywords

Comments

The sequence is an intra-block permutation of positive integers.
Generalization of the Cantor numbering method for n (n > 1) adjacent diagonals. In this approach, the block number n combines n neighboring diagonals.
Each block is filled sequentially, starting from the top of the leftmost vertical strip and moving downwards and then rightwards to the next strip. In block number n the first (n - 1)*n/2 + 1 strips each have a length of n. The remaining n - 1 strips have lengths that decrease sequentially from n - 1 down to 1. See Example the array of permutations of the triangle read upward antidiagonals.

Examples

			Triangle begins:
     k = 1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
  n=1:   1;
  n=2:   2,  4,  3,  5,  6;
  n=3:   7, 10, 13, 16,  8, 11, 14, 17, 19,  9, 12, 15, 18, 20, 21;
Subtracting (n - 1)*n*(n^2-n+2)/8 from each term in row n is a permutation of 1 .. n(n^2+1)/2:
  1,
  1, 3, 2,  4, 5,
  1, 4, 7, 10, 2, 5, 8, 11, 13, 3, 6, 9, 12, 14, 15,
  ...
The triangle's rows of permutations can be arranged as n successive upward antidiagonals in an array:
   1, 3, 5, 10, 13, 15, ...
   1, 4, 7, 11, 14, ...
   2, 4, 8, 12, ...
   1, 5, 9, ...
   2, 6, ...
   3, ...
		

Crossrefs

Cf. A002024, A002260, A002817, A006003 (row lengths),

Programs

  • Mathematica
    a[n_]:=Module[{L,Ld,Rd,P,Result},L=Ceiling[(Sqrt[4*Sqrt[8*n+1]-3]-1)/2];
    Ld=Ceiling[(Sqrt[8*n+1]-1)/2]; Rd=n-(Ld-1)*Ld/2; P=L*Rd+Ld-L*(L+1)/2-Max[Rd-(L^2-L+2)/2,0]*(Max[Rd-(L^2-L+2)/2,0]+1)/2; Result=P+(L-1)*L*(L^2-L+2)/8; Result]
    Nmax= 21; Table[a[n],{n,1,Nmax}]

Formula

Linear sequence:
a(n) = P(n) + (L(n) - 1)*L*(L(n)^2 - L(n) + 2)/8, where L(n) =ceiling((sqrt(4*Sqrt(8*n + 1) - 3) - 1)/2), Ld(n) = ceiling((Sqrt(8*n + 1) - 1)/2), Ld(n) = A002024(n), Rd(n) = n - (Ld(n) - 1)*Ld(n)/2, Rd(n) = A002260(n),
P(n) = L(n)*Rd(n) + Ld(n) - L(n)*(L(n) + 1)/2 - Max[Rd(n) - (L(n)^2 - L(n) + 2)/2, 0]*(Max[Rd(n) - (L(n)^2 - L(n) + 2)/2, 0] + 1)/2.
Triangular array T(n,k) for 1 <= k <= n(n^2+1)/2 (see Example):
T(n,k) = (n - 1)*n*(n^2 - n + 2)/8 + P(n,k), T(n,k) = A002817(n-1) + P(n,k), where P(n,k) = n*Rd(n,k) + Ld(n,k) - n - Max[Rd(n,k) - (n^2 - n + 2)/2, 0]*(Max[Rd(n,k) - (n^2 - n + 2)/2, 0] + 1)/2, where Ld(n,k) = Ceiling[(Sqrt[(n^2 - n + 1)^2 + 8*k] - (n^2 - n + 1))/2].

A051137 Table T(n,k) read by antidiagonals: number of necklaces allowing turnovers (bracelets) with n beads of k colors.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 6, 10, 10, 5, 1, 1, 8, 21, 20, 15, 6, 1, 1, 13, 39, 55, 35, 21, 7, 1, 1, 18, 92, 136, 120, 56, 28, 8, 1, 1, 30, 198, 430, 377, 231, 84, 36, 9, 1, 1, 46, 498, 1300, 1505, 888, 406, 120, 45, 10, 1
Offset: 0

Views

Author

Keywords

Comments

Unlike A075195 and A284855, antidiagonals go from bottom-left to top-right.

Examples

			Table begins with T[0,1]:
1  1    1     1      1       1        1        1         1         1
1  2    3     4      5       6        7        8         9        10
1  3    6    10     15      21       28       36        45        55
1  4   10    20     35      56       84      120       165       220
1  6   21    55    120     231      406      666      1035      1540
1  8   39   136    377     888     1855     3536      6273     10504
1 13   92   430   1505    4291    10528    23052     46185     86185
1 18  198  1300   5895   20646    60028   151848    344925    719290
1 30  498  4435  25395  107331   365260  1058058   2707245   6278140
1 46 1219 15084 110085  563786  2250311  7472984  21552969  55605670
1 78 3210 53764 493131 3037314 14158228 53762472 174489813 500280022
		

Crossrefs

Columns 2-6 are A000029, A027671, A032275, A032276, and A056341.
Rows 2-7 are A000217, A000292, A002817, A060446, A027670, and A060532.
Cf. A000031.
T(n,k) = (A075195(n,k) + A284855(n,k)) / 2.

Programs

  • Mathematica
    b[n_, k_] := DivisorSum[n, EulerPhi[#]*k^(n/#) &] / n;
    c[n_, k_] := If[EvenQ[n], (k^(n/2) + k^(n/2+1))/2, k^((n+1)/2)];
    T[0, ] = 1; T[n, k_] := (b[n, k] + c[n, k])/2;
    Table[T[n, k-n], {k, 1, 11}, {n, k-1, 0, -1}] // Flatten
    (* Robert A. Russell, Sep 21 2018 after Jean-François Alcover *)

Formula

T(n, k) = (k^floor((n+1)/2) + k^ceiling((n+1)/2)) / 4 + (1/(2*n)) * Sum_{d divides n} phi(d) * k^(n/d). - Robert A. Russell, Sep 21 2018
G.f. for column k: (kx/4)*(kx+x+2)/(1-kx^2) - Sum_{d>0} phi(d)*log(1-kx^d)/2d. - Robert A. Russell, Sep 28 2018
T(n, k) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))*Sum_{i=1..n} k^gcd(n,i). (See A075195 formulas.) - Richard L. Ollerton, May 04 2021

A064322 Triply triangular numbers.

Original entry on oeis.org

0, 1, 21, 231, 1540, 7260, 26796, 82621, 222111, 536130, 1186570, 2445366, 4747821, 8763391, 15487395, 26357430, 43398586, 69401871, 108140571, 164629585, 245433090, 359026206, 516216646, 730632651, 1019283825, 1403201800, 1908167976, 2565535896, 3413156131
Offset: 0

Views

Author

Henry Bottomley, Oct 15 2001

Keywords

Examples

			a(4) = 1540 because 4th triangular number is 10, 10th triangular number is 55 and 55th triangular number is 1540.
		

Crossrefs

Programs

  • Maple
    a:= n-> ((k-> binomial(k+1,2))@@3)(n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Apr 19 2012
  • Mathematica
    f[n_] := n(n + 1)/2; Table[ Nest[f, n, 3], {n, 0, 25}] (* Robert G. Wilson v, Jun 30 2004 *)
  • PARI
    a(n) = { my(Tri(m)= m*(m + 1)/2); Tri(Tri(Tri(n))) } \\ Harry J. Smith, Sep 11 2009

Formula

a(n) = A000217(A000217(A000217(n))) = n*(n+1)*(n^2 + n + 2)*(n^4 + 2n^3 + 3n^2 + 2n + 8)/128 = A002817(n)*(A002817(n) + 1)/2.
G.f.: x*(1 + 12*x + 78*x^2 + 133*x^3 + 78*x^4 + 12*x^5 + x^6)/(1 - x)^9. - Colin Barker, Apr 19 2012

A093445 The triangular triangle.

Original entry on oeis.org

1, 3, 3, 6, 9, 6, 10, 18, 17, 10, 15, 30, 33, 27, 15, 21, 45, 54, 51, 39, 21, 28, 63, 80, 82, 72, 53, 28, 36, 84, 111, 120, 114, 96, 69, 36, 45, 108, 147, 165, 165, 150, 123, 87, 45, 55, 135, 188, 217, 225, 215, 190, 153, 107, 55, 66, 165, 234, 276, 294, 291, 270, 234
Offset: 1

Views

Author

Amarnath Murthy, Apr 02 2004

Keywords

Comments

The n-th row of the triangular table begins by considering n triangular numbers (A000217) in order. Now segregate them into n groups beginning with n members in the first group, n-1 members in the second group, etc. Now sum each group. Thus the first term is the sum of first n numbers = n(n+1)/2, the second term is the sum of the next n-1 terms (from n+1 to 2n-1), the third term is the sum of the next n-2 terms (2n to 3n-3), etc. and the last term is simply n(n+1)/2. This triangle can be called a triangular triangle. The sequence contains the triangle by rows.

Examples

			Triangle begins:
   1
   3,  3
   6,  9,   6
  10, 18,  17,  10
  15, 30,  33,  27,  15
  21, 45,  54,  51,  39, 21
  28, 63,  80,  82,  72, 53, 28
  36, 84, 111, 120, 114, 96, 69, 36
The row for n = 4 is (1+2+3+4), (5+6+7), (8+9), 10 => 10 18 17 10.
		

Crossrefs

Cf. A000217, A093446. TT(n, 2) = A045943. TT(n, n-1) = A014209. TT(0, k) = A027480.
Cf. A005920 (central terms), A002817 (row sums).

Programs

  • Haskell
    a093445 n k = a093445_row n !! (k-1)
    a093445_row n = f [n, n - 1 .. 1] [1 ..] where
       f [] _      = []
       f (x:xs) ys = sum us : f xs vs where (us,vs) = splitAt x ys
    a093445_tabl = map a093445_row [1 ..]
    -- Reinhard Zumkeller, Oct 03 2012
  • Maple
    A093445 := proc(n,k)
        A000217(k*n-A000217(k-1))-A000217((k-1)*n-A000217(k-2)) ;
    end proc:
    seq(seq(A093445(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Dec 09 2015
  • Mathematica
    T[n_] := n(n + 1)/2; TT[n_, k_] := T[k*n - T[k - 1]] - T[(k - 1)*n - T[k - 2]]; Flatten[ Table[ TT[n, k], {n, 1, 11}, {k, 1, n}]] (* Robert G. Wilson v, Apr 24 2004 *)
    Table[Total/@TakeList[Range[(n(n+1))/2],Range[n,1,-1]],{n,20}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 15 2019 *)

Formula

T(n) = A000217(n) is the n-th Triangular number. TT(n, k) is the k-th term of the n-th row, 0 < k <= n.
TT(n, k) = T(k*n - T(k - 1)) - T((k - 1)*n - T(k - 2)).
TT(n, 1) = TT(n, n) = T(n) = A000217(n).

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004

A217331 Number of inequivalent ways to color a 3 X 3 checkerboard using at most n colors allowing rotations and reflections.

Original entry on oeis.org

0, 1, 102, 2862, 34960, 252375, 1284066, 5105212, 16912512, 48700845, 125512750, 295649706, 646497072, 1328022787, 2586463530, 4811211000, 8598455296, 14835732057, 24812155062, 40359796390, 64032402000
Offset: 0

Views

Author

Geoffrey Critzer, Sep 30 2012

Keywords

Comments

Cycle index of symmetry group is (s(1)^9 + s(1)*s(2)^4 + 2*s(1)*s(4)^2 + 4*s(1)^3*s(2)^3)/8.

Crossrefs

Row n=3 of A343097.
Cf. A002817 (2 x 2 checkerboard).

Programs

  • Mathematica
    Table[(n^9+n^5+2*n^3+4*n^6)/8, {n,0,20}]

Formula

a(n) = (n^9 + n^5 + 2*n^3 + 4*n^6)/8.
G.f.: x*(38*x^7+1753*x^6+11244*x^5+19535*x^4+10810*x^3+1887*x^2+92*x+1)/(x-1)^10. - Colin Barker, Oct 04 2012

A001621 a(n) = n*(n + 1)*(n^2 + n + 2)/4.

Original entry on oeis.org

0, 2, 12, 42, 110, 240, 462, 812, 1332, 2070, 3080, 4422, 6162, 8372, 11130, 14520, 18632, 23562, 29412, 36290, 44310, 53592, 64262, 76452, 90300, 105950, 123552, 143262, 165242, 189660, 216690, 246512, 279312, 315282, 354620, 397530, 444222, 494912, 549822
Offset: 0

Views

Author

Keywords

Comments

Number of integer sequences of length n+1 with sum zero and sum of absolute values 4. - R. H. Hardin, Feb 22 2009
Partial sums of A034262. - Jeremy Gardiner, Jun 23 2013

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[i+i^3, {i, 1, n}]; (* Vladimir Joseph Stephan Orlovsky, Dec 05 2008 *)
    Array[# (# + 1) (#^2 + # + 2)/4 &, 39, 0] (* or *)
    CoefficientList[Series[-2x (x^2 + x + 1)/(x - 1)^5, {x, 0, 38}], x] (* or *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 2, 12, 42, 110}, 39] (* Robert G. Wilson v, Aug 05 2018 *)

Formula

Equals 2 * A002817 and (A058919(n-1) - 1)/2.
G.f.: (-2*x*(x^2+x+1))/(x-1)^5. - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009
a(n) = A000217(n) * A000124(n). - Torlach Rush, Aug 05 2018
E.g.f.: exp(x)*x*(8 + 16*x + 8*x^2 + x^3)/4. - Stefano Spezia, Oct 08 2022

A052282 Number of 3 X 3 stochastic matrices under row and column permutations.

Original entry on oeis.org

1, 1, 3, 5, 9, 13, 22, 30, 45, 61, 85, 111, 149, 189, 244, 304, 381, 465, 571, 685, 825, 977, 1158, 1354, 1585, 1833, 2121, 2431, 2785, 3165, 3596, 4056, 4573, 5125, 5739, 6393, 7117, 7885, 8730, 9626, 10605, 11641, 12769, 13959, 15249, 16609, 18076, 19620
Offset: 0

Views

Author

Vladeta Jovovic, Feb 06 2000

Keywords

Comments

Unreduced numerators in convergent to log(2) = lim[n->inf, a(n)/A000670(n+1)].

Examples

			There are 5 nonisomorphic 3 X 3 matrices with row and column sums 3:
[0 0 3] [0 0 3] [0 1 2] [0 1 2] [1 1 1]
[0 3 0] [1 2 0] [1 1 1] [1 2 0] [1 1 1]
[3 0 0] [2 1 0] [2 1 0] [2 0 1] [1 1 1]
		

Crossrefs

Row n=3 of A333733.
Cf. A002817, A052280, A052281. Different from A001993.

Programs

  • Maple
    a:= n -> (Matrix([[1, 0, 0, 1, 1, 3, 5, 9, 13]]). Matrix(9, (i,j)-> if (i=j-1) then 1 elif j=1 then [2, 1, -3, -1, 1, 3, -1, -2, 1][i] else 0 fi)^n)[1,1]: seq(a(n), n=0..50);  # Alois P. Heinz, Jul 31 2008
  • Mathematica
    LinearRecurrence[{2,1,-3,-1,1,3,-1,-2,1},{1,1,3,5,9,13,22,30,45},50] (* Harvey P. Dale, Mar 10 2018 *)

Formula

G.f.: (x^6-x^5+x^3-x+1)/((1-x)^5*(1+x)^2*(1+x+x^2)). - Ralf Stephan and Vladeta Jovovic, May 07 2004

A066370 Quadruply triangular numbers.

Original entry on oeis.org

0, 1, 231, 26796, 1186570, 26357430, 359026206, 3413156131, 24666759216, 143717956515, 703974775735, 2989908659661, 11270904497931, 38398515291136, 119929709686710, 347357071281165, 941718655098991, 2408309883851256, 5847191602173306, 13551450210950905
Offset: 0

Views

Author

Brian Bayerle (bbayer03(AT)providence.edu), Dec 22 2001

Keywords

Comments

See sequences A000217, A002817 and A064322 for triangular, doubly triangular and triply triangular numbers, respectively.

Examples

			a(2)=231 as A000217(A000217(A000217(A000217(2))))=231 is the second quadruply-triangular number.
		

Programs

  • Mathematica
    f[n_] := n(n + 1)/2; Table[ Nest[f, n, 4], {n, 0, 17}] (* Robert G. Wilson v, Jun 30 2004 *)

Formula

a(n) = n*(n + 1)*(n^2 + n + 2)*(n^4 + 2*n^3 + 3*n^2 + 2*n + 8)*(n^8 + 4*n^7 + 10*n^6 + 16*n^5 + 25*n^4 + 28*n^3 + 28*n^2 + 16*n + 128)/32768.
a(n) = A064322(n)*(A064322(n) + 1)/2 = A000217(A000217(A000217(A000217(n)))).

A165211 Period 8: repeat [0,1,0,1,1,0,1,0].

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Sep 07 2009

Keywords

Comments

Parity of A064706.
Parity of the generalized pentagonal numbers A001318. - Omar E. Pol, Feb 04 2012
More generally, parity of the generalized k-gonal numbers, for odd k >= 5. - Omar E. Pol, Feb 05 2012

Crossrefs

Cf. A130198 (essentially the same).

Programs

Formula

a(n) = A002817(n) mod 2. - Wesley Ivan Hurt, Apr 23 2014
a(n) = 1/2 - (-1)^(n*(n+1)*(n^2 + n + 2)/8)/2. - Vaclav Kotesovec, Apr 28 2014
From Colin Barker, Dec 20 2017: (Start)
G.f.: x*(1 - x + x^2) / ((1 - x)*(1 + x^4)).
a(n) = a(n-1) - a(n-4) + a(n-5) for n>4.
(End)

A212135 Number of (w,x,y,z) with all terms in {1,...,n} and median

Original entry on oeis.org

0, 0, 4, 24, 84, 220, 480, 924, 1624, 2664, 4140, 6160, 8844, 12324, 16744, 22260, 29040, 37264, 47124, 58824, 72580, 88620, 107184, 128524, 152904, 180600, 211900, 247104, 286524, 330484, 379320, 433380, 493024, 558624, 630564, 709240, 795060, 888444
Offset: 0

Views

Author

Clark Kimberling, May 05 2012

Keywords

Comments

Also, the number of (w,x,y,z) with all terms in {1,...,n} and median>mean.
For a guide to related sequences, see A211795.
Also, a(n+1) is the length of the long leg of the unique primitive Pythagorean triple whose inradius is A000217(n). - Miguel-Ángel Pérez García-Ortega, Jul 13 2025

Crossrefs

Cf. A211795.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[
    Apply[Plus, Rest[Most[Sort[{w, x, y, z}]]]]/2 > (w + x + y + z)/4, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Flatten[Map[{t[#]} &, Range[0, 20]]]  (* A212135 *)
    %/4 (* A002817 *)
  • PARI
    concat(vector(2), Vec(4*x*(1 + x + x^2) / (1 - x)^5 + O(x^40))) \\ Colin Barker, Dec 02 2017

Formula

a(n) + A212134(n) = n^4.
a(n) = n*(n - 1)*(n^2 - n + 2)/2.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: 4*x*(1 + x + x^2) / (1 - x)^5. - Colin Barker, Dec 02 2017
Previous Showing 31-40 of 69 results. Next