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.

Showing 1-4 of 4 results.

A368296 Square array T(n,k), n >= 2, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=0..n} k^(n-j) * floor(j/2).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 4, 8, 6, 3, 1, 5, 14, 18, 9, 3, 1, 6, 22, 44, 39, 12, 4, 1, 7, 32, 90, 135, 81, 16, 4, 1, 8, 44, 162, 363, 408, 166, 20, 5, 1, 9, 58, 266, 813, 1455, 1228, 336, 25, 5, 1, 10, 74, 408, 1599, 4068, 5824, 3688, 677, 30, 6
Offset: 2

Views

Author

Seiichi Manyama, Dec 20 2023

Keywords

Examples

			Square array begins:
  1,  1,   1,    1,    1,     1,     1, ...
  1,  2,   3,    4,    5,     6,     7, ...
  2,  4,   8,   14,   22,    32,    44, ...
  2,  6,  18,   44,   90,   162,   266, ...
  3,  9,  39,  135,  363,   813,  1599, ...
  3, 12,  81,  408, 1455,  4068,  9597, ...
  4, 16, 166, 1228, 5824, 20344, 57586, ...
		

Crossrefs

Programs

  • PARI
    T(n, k) = (-((n+1)\2)+sum(j=1, n, j*k^(n-j)))/(k+1);

Formula

T(n,k) = T(n-2,k) + Sum_{j=0..n-2} k^j.
T(n,k) = 1/(k+1) * (-floor((n+1)/2) + Sum_{j=1..n} j*k^(n-j)).
T(n,k) = 1/(k-1) * Sum_{j=0..n} floor(k^j/(k+1)) = Sum_{j=0..n} floor(k^j/(k^2-1)) for k > 1.
T(n,k) = (k+1)*T(n-1,k) - (k-1)*T(n-2,k) - (k+1)*T(n-3,k) + k*T(n-4,k).
G.f. of column k: x^2/((1-x) * (1-k*x) * (1-x^2)).
T(n,k) = 1/(k-1) * (floor(k^(n+1)/(k^2-1)) - floor((n+1)/2)) for k > 1.

A272144 Convolution of A000217 and A001045.

Original entry on oeis.org

0, 0, 1, 4, 12, 30, 69, 150, 316, 652, 1329, 2688, 5412, 10866, 21781, 43618, 87300, 174672, 349425, 698940, 1397980, 2796070, 5592261, 11184654, 22369452, 44739060, 89478289, 178956760, 357913716, 715827642, 1431655509, 2863311258, 5726622772
Offset: 0

Views

Author

Patrick Okolo Edeogu, Apr 21 2016

Keywords

Examples

			a(4) = 12 = 0*10+1*6+1*3+3*1+5*0 from A000217: 0,1,3,6,10,... and A001045: 0,1,1,3,5,11,...
		

Crossrefs

Partial Sums of A011377(n-2)=A178420(n-1).

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); [0,0] cat Coefficients(R!(x^2/((1-x)^3*(1+x)*(1-2*x)))); // G. C. Greubel, Oct 26 2018
  • Maple
    seq(coeff(series(x^2/((1-x)^3*(1+x)*(1-2*x)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    CoefficientList[Series[x^2/((1 - x)^3 (1 + x) (1 - 2 x)), {x, 0, 30}], x] (* Michael De Vlieger, Apr 21 2016 *)
  • PARI
    concat([0, 0], Vec(x^2/((1-x)^3*(1+x)*(1-2*x)) + O(x^40))) \\ Altug Alkan, Apr 21 2016
    

Formula

a(n) = Sum{k=0..n} A000217(k) * A001045(n-k). - Joerg Arndt, May 17 2016
a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 5*a(n-4) - 2*a(n-5).
G.f.: x^2/((1-x)^3*(1+x)*(1-2*x)).
a(n+2) = (-105+(-1)^n+2^(7+n)-48*n-6*n^2)/24. - Colin Barker, Apr 21 2016
E.g.f.: (exp(-x) + 32*exp(2*x) - 3*(11 + 10*x + 2*x^2)*exp(x))/24. - Ilya Gutkovskiy, Apr 21 2016

A368346 a(n) = Sum_{k=0..n} 2^(n-k) * floor(k/4).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 7, 15, 32, 66, 134, 270, 543, 1089, 2181, 4365, 8734, 17472, 34948, 69900, 139805, 279615, 559235, 1118475, 2236956, 4473918, 8947842, 17895690, 35791387, 71582781, 143165569, 286331145, 572662298, 1145324604, 2290649216, 4581298440
Offset: 0

Views

Author

Seiichi Manyama, Dec 22 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n, m=4, k=2) = (k^(n+1)\(k^m-1)-(n+1)\m)/(k-1);
    
  • Python
    def A368346(n): return (1<>2) # Chai Wah Wu, Dec 22 2023

Formula

a(n) = a(n-4) + 2^(n-3) - 1.
a(n) = Sum_{k=0..n} floor(2^k/15).
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-4) - 3*a(n-5) + 2*a(n-6).
G.f.: x^4/((1-x) * (1-2*x) * (1-x^4)).
a(n) = floor(2^(n+1)/15) - floor((n+1)/4).

A257198 Number of permutations of length n having exactly one descent such that the first element of the permutation is an odd number.

Original entry on oeis.org

0, 0, 2, 6, 16, 36, 78, 162, 332, 672, 1354, 2718, 5448, 10908, 21830, 43674, 87364, 174744, 349506, 699030, 1398080, 2796180, 5592382, 11184786, 22369596, 44739216, 89478458, 178956942, 357913912, 715827852, 1431655734, 2863311498, 5726623028
Offset: 1

Views

Author

Ran Pan, Apr 18 2015

Keywords

Examples

			a(3)=2: (1 3 2, 3 1 2).
a(4)=6: (1 2 4 3, 1 3 2 4, 1 4 2 3, 1 3 4 2, 3 1 2 4, 3 4 1 2).
		

Crossrefs

Cf. A178420, A000295, A000975, A167030 (first differences).

Programs

  • Magma
    [2*Floor((2*2^n-3*n-1)/6): n in [1..40]]; // Vincenzo Librandi, Apr 18 2015
    
  • Mathematica
    Table[2 Floor[(2 2^n - 3 n - 1) / 6], {n, 50}] (* Vincenzo Librandi, Apr 18 2015 *)
  • PARI
    concat([0,0], Vec(-2*x^3/((x-1)^2*(x+1)*(2*x-1)) + O(x^100))) \\ Colin Barker, Apr 19 2015
    
  • PARI
    a(n)=(2<Charles R Greathouse IV, Apr 21 2015

Formula

a(n) = 2*floor((2*2^n-3*n-1)/6).
a(n) = 2*A178420(n-1).
a(n) = A000295(n)-A000975(n-1).
From Colin Barker, Apr 19 2015: (Start)
a(n) = (-3-(-1)^n+2^(2+n)-6*n)/6.
a(n) = 3*a(n-1)-a(n-2)-3*a(n-3)+2*a(n-4).
G.f.: -2*x^3 / ((x-1)^2*(x+1)*(2*x-1)).
(End)
Showing 1-4 of 4 results.