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 51-59 of 59 results.

A275740 Sums of the next n consecutive nonsquare integers.

Original entry on oeis.org

0, 2, 8, 21, 46, 83, 136, 210, 306, 426, 575, 758, 972, 1223, 1519, 1855, 2236, 2669, 3156, 3694, 4290, 4956, 5678, 6467, 7332, 8269, 9278, 10368, 11548, 12804, 14148, 15593, 17126, 18753, 20485, 22325, 24262, 26308, 28481, 30756, 33148
Offset: 0

Views

Author

Olivier Gérard, Aug 07 2016

Keywords

Comments

Row sums of nonsquare integers (A000037), seen as a regular triangle:
.
2 | 2,
8 | 3, 5,
21 | 6, 7, 8,
46 | 10, 11, 12, 13,
83 | 14, 15, 17, 18, 19,
136 | 20, 21, 22, 23, 24, 26,
210 | 27, 28, 29, 30, 31, 32, 33,
306 | 34, 35, 37, 38, 39, 40, 41, 42,
...
The equivalent for all integers are A006003 (starting from 1), A229183 (starting from 2) and A027480 (starting from 0).
There are several sequences close to nonsquares whose sum of groups of n terms starts like this sequence, notably A028761, A158276, A167759.

Crossrefs

Programs

  • Maple
    R:= 0: s:= 1:
    for n from 1 to 100 do
      if floor(sqrt(s+n)) = floor(sqrt(s)) then
        R:= R, n*s + n*(n+1)/2; s:= s+n;
      else
        R:= R, n*s + n*(n+1)/2 - floor(sqrt(s+n))^2 + s+n+1; s:= s+n+1;
      fi
    od:
    R; # Robert Israel, Oct 02 2022
  • Mathematica
    Table[Sum[
      i + Floor[1/2 + Sqrt[i]], {i, n (n - 1)/2 + 1, (n + 1) (n)/2}], {n,
      0, 40}]
    Join[{0},Module[{nn=1000,nsi,len},nsi=Select[Range[nn],!IntegerQ[Sqrt[#]]&];len=Floor[ (Sqrt[ 8*Length[nsi]+1]-1)/2];Total/@TakeList[nsi,Range[len]]]] (* Harvey P. Dale, Jan 04 2024 *)

Extensions

Definition clarified by Harvey P. Dale, Jan 04 2024

A294033 Triangle read by rows, expansion of exp(x*z)*z*(tanh(z) + sech(z)), T(n, k) for n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

1, 2, 2, -3, 6, 3, -8, -12, 12, 4, 25, -40, -30, 20, 5, 96, 150, -120, -60, 30, 6, -427, 672, 525, -280, -105, 42, 7, -2176, -3416, 2688, 1400, -560, -168, 56, 8, 12465, -19584, -15372, 8064, 3150, -1008, -252, 72, 9, 79360, 124650, -97920, -51240, 20160, 6300, -1680, -360, 90, 10, -555731, 872960, 685575, -359040, -140910, 44352, 11550, -2640, -495, 110, 11
Offset: 1

Views

Author

Peter Luschny, Oct 24 2017

Keywords

Examples

			Triangle starts:
  [1][   1]
  [2][   2,   2]
  [3][  -3,   6,    3]
  [4][  -8, -12,   12,    4]
  [5][  25, -40,  -30,   20,    5]
  [6][  96, 150, -120,  -60,   30,  6]
  [7][-427, 672,  525, -280, -105, 42, 7]
		

Crossrefs

T(n, 0) = signed A065619. Row sums of abs(T(n,k)) = A231179.
A003506 (m=1), this seq. (m=2), A294034 (m=3).

Programs

  • Maple
    gf := exp(x*z)*z*(tanh(z)+sech(z)):
    s := n -> n!*coeff(series(gf,z,n+2),z,n):
    C := n -> PolynomialTools:-CoefficientList(s(n),x):
    ListTools:-FlattenOnce([seq(C(n), n=1..7)]);
    # Alternatively:
    T := (n, k) -> `if`(n = k+1, n,
    (k+1)*binomial(n,k+1)*2^(n-k-1)*(euler(n-k-1, 1/2)+euler(n-k-1, 1))):
    for n from 1 to 7 do seq(T(n,k), k=0..n-1) od;
  • Mathematica
    L[0] := 1; L[n_] := (-1)^Binomial[n, 2] 2 Abs[PolyLog[-n, -I]];
    p[n_] := n Sum[Binomial[n - 1, k - 1] L[k - 1] x^(n - k), {k, 0, n}];
    Table[CoefficientList[p[n], x], {n, 1, 11}] // Flatten

Formula

T(n, k) = (k+1)*binomial(n,k+1)*2^(n-k-1)*(Euler(n-k-1, 1/2) + Euler(n-k-1, 1)) for 0 <= k <= n-2.
T(n, k) is the coefficient of x^k of the polynomial p(n) = n*Sum_{k=1..n} binomial(n-1, k-1)*L(k-1)*x^(n-k) and L(n) = (-1)^binomial(n,2)*A000111(n). In particular n divides T(n, k).

A373288 T(n, k) is the total number of symmetric peaks in all partitions of n with exactly k blocks, n >= 3, 2 <= k <= n-1.

Original entry on oeis.org

1, 3, 2, 8, 12, 3, 20, 54, 30, 4, 48, 215, 205, 60, 5, 112, 799, 1185, 580, 105, 6, 256, 2842, 6230, 4585, 1365, 168, 7, 576, 9812, 30828, 32256, 14140, 2828, 252, 8, 1280, 33165, 146355, 210378, 128037, 37170, 5334, 360, 9, 2816, 110361, 674535, 1301860, 1060815, 420756, 86730, 9360, 495, 10
Offset: 3

Views

Author

W. Asakly, Jun 01 2024

Keywords

Examples

			The triangle T(n, k) begins:
   3|   1
   4|   3      2
   5|   8     12      3
   6|  20     54     30      4
   7|  48    215    205     60      5
   8| 112    799   1185    580    105      6
   9| 256   2842   6230   4585   1365    168      7
  10| 576   9812  30828  32256  14140   2828    252      8
.
T(5,3) represents the partitions of the set {1,2,3,4,5} into 3 blocks:
The canonical form of a set partition of [n] is an n-tuple indicating the block in which each integer occurs. The symmetric peaks in the canonical sequential form are listed:
  (1, 2, 1, 1, 3) -> 1 symmetric peak   (1, 2, 1)
  (1, 2, 1, 3, 1) -> 2 symmetric peaks, (1, 2, 1) and (1, 3, 1)
  (1, 2, 1, 2, 3) -> 1 symmetric peak,  (1, 2, 1)
  (1, 2, 1, 3, 2) -> 1 symmetric peak,  (1, 2, 1)
  (1, 2, 1, 3, 3) -> 1 symmetric peak,  (1, 2, 1)
  (1, 2, 1, 3, 1) -> 2 symmetric peaks, (1, 2, 1) and (1, 3, 1)
  (1, 2, 2, 3, 2) -> 1 symmetric peak,  (2, 3, 2)
  (1, 2, 3, 2, 1) -> 1 symmetric peak,  (2, 3, 2)
  (1, 2, 3, 2, 2) -> 1 symmetric peak,  (2, 3, 2)
  (1, 2, 3, 2, 3) -> 1 symmetric peak,  (2, 3, 2).
		

Crossrefs

Cf. A008277 (Stirling2).
Cf. A001792 (1st column), A027480 (subdiagonal).

Programs

  • Maple
    T := (n, k) -> (k-1) * Stirling2(n-1, k) + add(binomial(j, 2) * add(j^(i-3) * Stirling2(n-i, k),i=3..n-k), j = 2..k): seq(print(seq(T(n, k), k = 2..n-1)), n = 3..10);  # Peter Luschny, Jun 06 2024
  • Mathematica
    T[n_, k_] := (k-1) * StirlingS2[n-1, k] + Sum[Binomial[j, 2] * Sum[j^(i-3) * StirlingS2[n-i, k], {i, 3, n-k}], {j, 2, k}];
    Table[T[n, k], {n, 3, 12}, {k, 2, n-1}] // Flatten
  • PARI
    T(n, k) = (k-1) * stirling(n-1, k, 2) + sum(j=2, k, binomial(j, 2) * sum(i=3, n-k, j^(i-3) * stirling(n-i, k, 2))); \\ Michel Marcus, Jun 06 2024

Formula

T(n,k) = (k-1) * Stirling2(n-1, k) + Sum_{j=2..k} binomial(j, 2) * Sum_{i=3..n-k} j^(i-3) * Stirling2(n-i, k).

A373301 Sum of successive nonnegative integers in a row of length p(n) where p counts integer partitions.

Original entry on oeis.org

0, 3, 12, 40, 98, 253, 540, 1199, 2415, 4893, 9268, 17864, 32421, 59265, 104632, 184338, 315414, 540155, 901845, 1504173, 2461932, 4013511, 6443170, 10314675, 16281749, 25608450, 39838855, 61716941, 94682665, 144726102
Offset: 1

Views

Author

Olivier Gérard, May 31 2024

Keywords

Comments

The length of each row is given by A000041.
As many sequences start like the nonnegative integers, their row sums when disposed in this shape start with the same values.
Here is a sample list by A-number order of the sequences which are sufficiently close to A001477 to have the same row sums for at least 8 terms: A089867, A089868, A089869, A089870, A118760, A123719, A130696, A136602, A254109, A258069, A258070, A258071, A266279, A272813, A273885, A273886, A273887, A273888.

Examples

			Illustration of the first few terms
.
0   | 0
3   | 1,  2
12  | 3,  4,  5
40  | 6,  7,  8,  9,  10
98  | 11, 12, 13, 14, 15, 16, 17
253 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
540 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43
.
		

Crossrefs

Cf. A373300, original version, with positive integers A000027.
Cf. A001477, the nonnegative integers.
Cf. A027480, the sequence of row sums for a regular triangle.

Programs

  • Mathematica
    Module[{s = -1},
     Table[s +=
       PartitionsP[
        n - 1]; (s + PartitionsP[n]) (s + PartitionsP[n] - 1)/2 -
       s (s - 1)/2, {n, 1, 30}]]

A021449 Decimal expansion of 1/445.

Original entry on oeis.org

0, 0, 2, 2, 4, 7, 1, 9, 1, 0, 1, 1, 2, 3, 5, 9, 5, 5, 0, 5, 6, 1, 7, 9, 7, 7, 5, 2, 8, 0, 8, 9, 8, 8, 7, 6, 4, 0, 4, 4, 9, 4, 3, 8, 2, 0, 2, 2, 4, 7, 1, 9, 1, 0, 1, 1, 2, 3, 5, 9, 5, 5, 0, 5, 6, 1, 7, 9, 7, 7, 5, 2, 8, 0, 8, 9, 8, 8, 7, 6, 4, 0, 4, 4, 9, 4, 3, 8, 2, 0, 2, 2, 4, 7, 1, 9, 1, 0, 1
Offset: 0

Views

Author

Keywords

Comments

Expansion in any base b >= 3 of 2/(b(b-1)(b+1)) = 2/(b^3-b). E.g., 1/12 in base 3, 1/30 in base 4, 1/60 in base 5, etc. - Franklin T. Adams-Watters, Nov 07 2006

Crossrefs

Programs

Formula

From Chai Wah Wu, May 08 2025: (Start)
a(n) = a(n-1) - a(n-22) + a(n-23) for n > 23.
G.f.: x^2*(-2*x^21 - 6*x^20 + 5*x^19 - x^18 - 5*x^17 + 5*x^16 + 4*x^14 - 4*x^13 - 2*x^12 - x^11 - x^10 - x^8 + x^7 + 8*x^6 - 8*x^5 + 6*x^4 - 3*x^3 - 2*x^2 - 2)/(x^23 - x^22 + x - 1). (End)

A180413 Total number of possible knight moves on an n X n X n chessboard, if the knight is placed anywhere.

Original entry on oeis.org

0, 144, 576, 1440, 2880, 5040, 8064, 12096, 17280, 23760, 31680, 41184, 52416, 65520, 80640, 97920, 117504, 139536, 164160, 191520, 221760, 255024, 291456, 331200, 374400, 421200, 471744, 526176, 584640, 647280, 714240, 785664, 861696
Offset: 1

Views

Author

Graziano Aglietti (mg5055(AT)mclink.it), Sep 02 2010

Keywords

Comments

The maximum number of move in tridimensional chessboard is 24, 8 for every dimension. In a vertex the number is smaller.
Binomial transform of [144, 432, 432, 144, 0, 0, 0, ...] = (144, 576, 1440, ...). - Gary W. Adamson, Sep 03 2010

Crossrefs

Programs

  • Mathematica
    Table[24n(n^2-1),{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,144,576,1440},40] (* Harvey P. Dale, Feb 13 2013 *)
  • PARI
    a(n)=24*n*(n^2-1) \\ Charles R Greathouse IV, Nov 03 2014

Formula

a(n) = 24*n*(n^2-1).
G.f.: 144*x^2/(1-x)^4. - Colin Barker, Mar 17 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(1)=0, a(2)=144, a(3)=576, a(4)=1440. - Harvey P. Dale, Feb 13 2013
E.g.f.: 24 * exp(x) * x^2 * (3 + x). - Vaclav Kotesovec, Feb 15 2015

A304391 Numbers that are the number of permutations of a set of balls of at least three distinct colors.

Original entry on oeis.org

6, 12, 20, 24, 30, 42, 56, 60, 72, 90, 105, 110, 120, 132, 140, 156, 168, 180, 182, 210, 240, 252, 272, 280, 306, 336, 342, 360, 380, 420, 462, 495, 504, 506, 552, 560, 600, 630, 650, 660, 702, 720, 756, 812, 840, 858, 870, 930, 990, 992, 1056, 1092, 1120, 1122, 1190
Offset: 1

Views

Author

David A. Corneth, May 24 2018

Keywords

Examples

			There are 30 permutations of 5 balls where 2 are red, 2 are yellow and 1 is blue.
		

Crossrefs

A002378 is a subsequence.

Formula

A027480(k) = k * (k + 1) * (k + 2) / 2 is in the sequence for k >= 2.

A321697 T(j,k) = binomial(j^k,k)/j, j <= m, k <= j, written as triangle T(j,k).

Original entry on oeis.org

1, 1, 3, 1, 12, 975, 1, 30, 10416, 43698160, 1, 60, 63550, 1259394500, 495117695312625, 1, 105, 276060, 19500470010, 39435754026361680, 2386830808433862941972976, 1, 168, 952413, 197321108600, 1595560551370855083, 526069994452248286902543528, 7282228632205891036170867431546711227
Offset: 1

Views

Author

Hugo Pfoertner, Nov 17 2018

Keywords

Crossrefs

Cf. A027480.

Programs

  • Mathematica
    f[n_] := Table[Binomial[j^k,k]/j, {j, n, n}, {k,1, j}] ; Flatten[Array[f, 11]] (* Stefano Spezia, Nov 17 2018 *)
  • PARI
    for(j=1,7,for(k=1,j,print1(binomial(j^k,k)/j,", ")))

A368608 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x != y and y <= z.

Original entry on oeis.org

2, 1, 4, 5, 2, 1, 6, 9, 8, 4, 2, 1, 8, 13, 14, 12, 6, 4, 2, 1, 10, 17, 20, 20, 16, 9, 6, 4, 2, 1, 12, 21, 26, 28, 26, 21, 12, 9, 6, 4, 2, 1, 14, 25, 32, 36, 36, 33, 26, 16, 12, 9, 6, 4, 2, 1, 16, 29, 38, 44, 46, 45, 40, 32, 20, 16, 12, 9, 6, 4, 2, 1, 18, 33
Offset: 1

Views

Author

Clark Kimberling, Jan 25 2024

Keywords

Comments

Row n consists of 2n positive integers.

Examples

			First six rows:
   2   1
   4   5   2   1
   6   9   8   4   2   1
   8  13  14  12   6   4   2  1
  10  17  20  20  16   9   6  4  2  1
  12  21  26  28  26  21  12  9  6  4  2  1
For n=2, there are 3 triples (x,y,z) having x != y and y <= z:
  122:  |x-y| + |y-z| = 1
  211:  |x-y| + |y-z| = 1
  212:  |x-y| + |y-z| = 2
so row 2 of the array is (2,1), representing two 1s and one 2.
		

Crossrefs

Cf. A005443 (column 1), A027480 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368606, A368607, A368609.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] <= #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}];
    v = Flatten[u]  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]]  (* array *)
Previous Showing 51-59 of 59 results.