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

A213503 Rectangular array: (row n) = b**c, where b(h) = h^2, c(h) = n-1+h, n>=1, h>=1, and ** = convolution.

Original entry on oeis.org

1, 6, 2, 20, 11, 3, 50, 34, 16, 4, 105, 80, 48, 21, 5, 196, 160, 110, 62, 26, 6, 336, 287, 215, 140, 76, 31, 7, 540, 476, 378, 270, 170, 90, 36, 8, 825, 744, 616, 469, 325, 200, 104, 41, 9, 1210, 1110, 948, 756, 560, 380, 230, 118, 46, 10
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2012

Keywords

Comments

Principal diagonal: A117066
Antidiagonal sums: A033455
For a guide to related arrays, see A213500.

Examples

			Northwest corner (the array is read by falling antidiagonals):
1....6....20....50....105....196...336
2....11...34....80....160....287...476
3....16...48....110...215....378...616
4....21...62....140...270....469...756
5....26...76....170...325....560...896
...
T(5,1) = (1)**(5) = 5
T(5,2) = (1,4)**(5,6) = 1*6+4*5 = 26
T(5,3) = (1,4,9)**(5,6,7) = 1*7+4*6+9*5 = 76
		

Crossrefs

Cf. A213500.

Programs

  • GAP
    Flat(List([1..12], n-> List([1..n], k-> (n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12))); # G. C. Greubel, Jul 05 2019
  • Magma
    [[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12: k in [1..n]]: n in [1..12]]; // G. C. Greubel, Jul 05 2019
    
  • Mathematica
    (* First program *)
    b[n_]:= n^2; c[n_]:= n;
    T[n_, k_]:= Sum[b[k-i] c[n+i], {i, 0, k-1}]
    TableForm[Table[T[n, k], {n, 1, 10}, {k, 1, 10}]]
    Flatten[Table[T[n-k+1, k], {n, 12}, {k, n, 1, -1}]] (* A213503 *)
    r[n_]:= Table[T[n, k], {k,40}]  (* columns of antidiagonal triangle *)
    d = Table[T[n, n], {n, 1, 40}] (* A117066 *)
    s[n_]:= Sum[T[i, n+1-i], {i, 1, n}]
    s1 = Table[s[n], {n, 1, 50}] (* A033455 *)
    (* Second program *)
    Table[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12, {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jul 05 2019 *)
  • PARI
    t(n,k) = (n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12;
    for(n=1,12, for(k=1,n, print1(t(n,k), ", "))) \\ G. C. Greubel, Jul 05 2019
    
  • Sage
    [[(n-k+1)*((n-k+1)^3 + 4*(n-k+1)^2*k + 6*k*(n-k+1) - n + 3*k - 1)/12 for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 05 2019
    

Formula

T(n,k) = 5*T(n,k-1) - 10*T(n,k-2) + 10*T(n,k-3) - 5*T(n,k-4) + T(n,k-5).
G.f. for row n: f(x)/g(x), where f(x) = n + x - (n - 1)^2 x^2 and g(x) = (1 - x)^5.
T(n,k) = k*(k^3 + 4*k^2*n + 6*k*n - k + 2*n)/12. - G. C. Greubel, Jul 05 2019

A247645 Triangle read by rows: T(j,0)=1, T(0,j) = [j=0], T(-1,j)=T(-2,j)=0, T(j,k)=2T(j-1,k)-T(j-2,k)+T(j-1,k-2)+T(j-2,k-2).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 3, 9, 5, 7, 1, 1, 1, 4, 16, 14, 26, 8, 10, 1, 1, 1, 5, 25, 30, 70, 34, 52, 11, 13, 1, 1, 1, 6, 36, 55, 155, 104, 190, 63, 87, 14, 16, 1, 1, 1, 7, 49, 91, 301, 259, 553, 253, 403, 101, 131, 17, 19, 1, 1, 1, 8, 64, 140, 532, 560
Offset: 0

Views

Author

N. J. A. Sloane, Sep 23 2014

Keywords

Examples

			Triangle begins:
1,
1,1,1,
1,2,4,1,1,
1,3,9,5,7,1,1,
1,4,16,14,26,8,10,1,1,
1,5,25,30,70,34,52,11,13,1,1,
1,6,36,55,155,104,190,63,87,14,16,1,1
1,7,49,91,301,259,553,253,403,101,131,17,19,1,1
1,8,64,140,532,560,1372,806,1462,504,736,148,184,20,22,1,1
...
		

Crossrefs

Programs

  • Mathematica
    T[, 0] = 1; T[j, k_] /; 0 <= k <= 2j := T[j, k] = Which[k<0 || k>2j, 0, k == 2j || k == 2j-1, 1, OddQ[k], T[j-1, k] + T[j-1, k-1], EvenQ[k], T[j-1, k-2] + 2 T[j-1, k-1] + T[j-1, k]];
    Table[T[j, k], {j, 0, 8}, {k, 0, 2j}] // Flatten (* Jean-François Alcover, Oct 09 2018 *)

Extensions

More terms from Lars Blomberg, Aug 05 2015

A271663 Convolution of nonzero squares (A000290) with nonzero pentagonal numbers (A000326).

Original entry on oeis.org

1, 9, 41, 131, 336, 742, 1470, 2682, 4587, 7447, 11583, 17381, 25298, 35868, 49708, 67524, 90117, 118389, 153349, 196119, 247940, 310178, 384330, 472030, 575055, 695331, 834939, 996121, 1181286, 1393016, 1634072, 1907400, 2216137, 2563617, 2953377, 3389163, 3874936
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 12 2016

Keywords

Comments

More generally, the ordinary generating function for the convolution of nonzero h-gonal numbers and k-gonal numbers is (1 + (h - 3)*x)*(1 + (k - 3)*x)/(1 - x)^6.

Crossrefs

Cf. A005585: convolution of nonzero squares with nonzero triangular numbers.
Cf. A033455: convolution of nonzero squares with themselves.
Cf. A051836 (after 0): convolution of nonzero triangular numbers with nonzero pentagonal numbers.

Programs

  • Magma
    /* From definition: */ P:=func; /*, where P(n,k) is the n-th k-gonal number, */ [&+[P(n+1-i,4)*P(i,5): i in [1..n]]: n in [1..40]]; // Bruno Berselli, Apr 12 2016
    
  • Magma
    [(n+1)*(n+2)*(n+3)*(6*n^2+19*n+20)/120: n in [0..40]]; // Bruno Berselli, Apr 12 2016
  • Mathematica
    LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 9, 41, 131, 336, 742}, 40]
    Table[(n + 1) (n + 2) (n + 3) (6 n^2 + 19 n + 20)/120, {n, 0, 40}]
    With[{nmax = 50}, CoefficientList[Series[(120 + 960*x + 1440*x^2 + 680*x^3 + 115*x^4 + 6*x^5)*Exp[x]/120, {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Jun 07 2017 *)
  • PARI
    vector(40, n, n--; (n+1)*(n+2)*(n+3)*(6*n^2+19*n+20)/120) \\ Altug Alkan, Apr 12 2016
    

Formula

O.g.f.: (1 + x)*(1 + 2*x)/(1 - x)^6.
E.g.f.: (120 + 960*x + 1440*x^2 + 680*x^3 + 115*x^4 + 6*x^5)*exp(x)/120.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
a(n) = (n + 1)*(n + 2)*(n + 3)*(6*n^2 + 19*n + 20)/120.
Sum_{n>=0} 1/a(n) = 1.149165731...

Extensions

Edited by Bruno Berselli, Apr 12 2016

A306548 Triangle T(n,k) read by rows, where the k-th column is the shifted self-convolution of the power function n^k, n >= 0, 0 <= k <= n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 3, 4, 1, 0, 0, 4, 10, 8, 1, 0, 0, 5, 20, 34, 16, 1, 0, 0, 6, 35, 104, 118, 32, 1, 0, 0, 7, 56, 259, 560, 418, 64, 1, 0, 0, 8, 84, 560, 2003, 3104, 1510, 128, 1, 0, 0, 9, 120, 1092, 5888, 16003, 17600, 5554, 256, 1, 0, 0, 10, 165, 1968, 14988, 64064, 130835, 101504, 20758, 512, 1, 0, 0
Offset: 0

Views

Author

Kolosov Petro, Feb 23 2019

Keywords

Comments

For n > 0 an odd-power identity n^(2m+1)+1, m >= 0 can be found using the current sequence. The sum of the n-th diagonal of T(n,k) over 0 <= k <= m multiplied by A(m,k) gives n^(2m+1)-1, where A(m,k) = A302971(m,k)/A304042(m,k). For example, consider the case n=4, m=2: the n-th diagonal of T(n, 0 <= k <= m) is {5, 10, 34}, and the m-th row of triangle A(m, 0 <= k <= m) is {1, 0, 30}, thus (3+1)^5 + 1 = 5*1 + 10*0 + 34*30 = 1025.

Examples

			==================================================================
k=    0     1     2     3      4      5     6    7    8    9    10
==================================================================
n=0:  2;
n=1:  2,    0;
n=2:  3,    0,    0;
n=3:  4,    1,    0,    0;
n=4:  5,    4,    1,    0,     0;
n=5:  6,   10,    8,    1,     0,     0;
n=6:  7,   20,   34,   16,     1,     0,    0;
n=7:  8,   35,  104,  118,    32,     1,    0,   0;
n=8:  9,   56,  259,  560,   418,    64,    1,   0,   0;
n=9:  10,  84,  560, 2003,  3104,  1510,  128,   1,   0,   0;
n=10: 11, 120, 1092, 5888, 16003, 17600, 5554, 256,   1,   0;   0;
...
		

Crossrefs

Nonzero terms of columns k=0..5 give: A000027, A000292, A033455, A145216, A145217, A145218.
Partial sums of columns k=1..2 give: A000332, A259181.

Programs

  • Mathematica
    f[m_, s_] := Piecewise[{{s^m, s >= 0}, {0, True}}];
    F[n_, m_] := Sum[f[m, n - k]*f[m, k], {k, -Infinity, +Infinity}];
    T[n_, k_] := F[n - k, k];
    Column[Table[T[n, k], {n, 0, 12}, {k, 0, n}], Left]

Formula

f(m, s) = s^m, if s >= 0;
f(m, s) = 0, otherwise.
F(n,m) = Sum_{k} f(m, n-k) * f(m, k), -oo < k < +oo;
T(n,k) = F(n-k, k).

Extensions

Edited by Kolosov Petro, Mar 13 2019

A339355 Maximum number of copies of a 12345 permutation pattern in an alternating (or zig-zag) permutation of length n + 7.

Original entry on oeis.org

8, 16, 64, 112, 272, 432, 832, 1232, 2072, 2912, 4480, 6048, 8736, 11424, 15744, 20064, 26664, 33264, 42944, 52624, 66352, 80080, 99008, 117936, 143416, 168896, 202496, 236096, 279616, 323136, 378624, 434112, 503880, 573648, 660288, 746928, 853328, 959728, 1089088, 1218448
Offset: 1

Views

Author

Lara Pudwell, Dec 01 2020

Keywords

Comments

The maximum number of copies of 123 in an alternating permutation is motivated in the Notices reference, and the argument here is analogous.

Examples

			a(1) = 8. The alternating permutation of length 1 + 7 = 8 with the maximum number of copies of 12345 is 13254768. The eight copies are 12468, 12478, 12568, 12578, 13468, 13478, 13568, and 13578.
		

Crossrefs

Programs

  • Maple
    a := proc(n2) local n; n:= floor(n2/2): if n2 = 2*n then 32*binomial(n+4,5) - 16*binomial(n+3,4) else n:=n+1; (4*n*(n^4+5*n^3+10*n^2+10*n+4))/15 fi end; seq(a(n), n=1..20); # Georg Fischer, Nov 25 2022

Formula

a(2*n) = 16*A005585(n) = 32*binomial(n+4, 5) - 16*binomial(n+3, 4).
a(2*n-1) = 8*A033455(n) = (4*n*(n^4 + 5*n^3 + 10*n^2 + 10*n + 4))/15.
D-finite with recurrence: (n-1)*((n-3)^2+9*n-6)*a(n) - (2*(n-3)^2+20*n-16)*a(n-1) - (n+5)*((n-3)^2+11*n-2)*a(n-2) = 0. - Georg Fischer, Nov 25 2022

A195166 Numbers expressible as 2^a - 2^b, with 0 <= b < a, such that n^a - n^b is divisible by 2^a - 2^b for all n.

Original entry on oeis.org

1, 2, 6, 12, 30, 24, 60, 120, 252, 240, 504, 16380, 32760, 65520
Offset: 1

Views

Author

Michel Marcus, Dec 21 2012

Keywords

Comments

1 = 2^1 - 2^0. (n^1 - n^0)/1 : A000027
2 = 2^2 - 2^1. (n^2 - n^1)/2 : A000217
6 = 2^3 - 2^1. (n^3 - n^1)/6 : A000292
12 = 2^4 - 2^2. (n^4 - n^2)/12 : A002415
30 = 2^5 - 2^1. (n^5 - n^1)/30 : A033455
24 = 2^5 - 2^3. (n^5 - n^3)/24 : A006414
60 = 2^6 - 2^2. (n^6 - n^2)/60 : A213547
120 = 2^7 - 2^3. (n^7 - n^3)/120 : A114239
252 = 2^8 - 2^2. (n^8 - n^2)/252 :
240 = 2^8 - 2^4. (n^8 - n^4)/240 : A078876
504 = 2^9 - 2^3. (n^9 - n^3)/504 :
16380 = 2^14 - 2^2. (n^14 - n^2)/16380 :
32760 = 2^15 - 2^3. (n^15 - n^3)/32760 :
65520 = 2^16 - 2^4. (n^16 - n^4)/65520 :
Comment from Tomohiro Yamada, Oct 05 2022: (Start)
"The Mod Set Stanford University" and Carl Pomerance independently noted that the completeness of this sequence follows from a result of Schinzel on primitive prime factors of sequences a^n - b^n in the remark to a problem of Harry Ruderman asking whether if 2^a - 2^b divides 3^a - 3^b, then 2^a - 2^b belongs to this sequence.
The Mod Set verified that if a > b, 2^a - 2^b divides 3^a - 3^b, but 2^a - 2^b does not belong to this sequence, then a - b > 1900. Ram Murty and Kumar Murty proved that there are only finitely many natural numbers a, b such that 2^a - 2^b divides 3^a - 3^b.
Qi Sun and Ming Zhi Zhang also showed that if a > b and n^a - n^b is divisible by 2^a - 2^b for all n, then 2^a - 2^b belongs to this sequence. (End)

Examples

			a(3) = 6 belongs to this sequence since (n^3 - n)/6 = C(n+1, 3) = A000292(n-1).
		
Previous Showing 11-16 of 16 results.