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.

A175655 Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1+x-5*x^2)/(1-3*x-x^2+6*x^3).

Original entry on oeis.org

1, 4, 8, 22, 50, 124, 290, 694, 1628, 3838, 8978, 21004, 48962, 114022, 265004, 615262, 1426658, 3305212, 7650722, 17697430, 40911740, 94528318, 218312114, 503994220, 1163124866, 2683496134, 6189647948, 14273690782
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010, Aug 10 2010

Keywords

Comments

a(n) represents the number of n-move routes of a fairy chess piece starting in the central square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a bishop on the eight side and corner squares but on the central square the bishop turns into a raging elephant, see A175654.
For the central square the 512 elephants lead to 46 different elephant sequences, see the cross-references for examples.
The sequence above corresponds to 16 A[5] vectors with decimal values 71, 77, 101, 197, 263, 269, 293, 323, 326, 329, 332, 353, 356, 389, 449 and 452. These vectors lead for the side squares to A000079 and for the corner squares to A175654.

Crossrefs

Cf. Elephant sequences central square [decimal value A[5]]: A000007 [0], A000012 [16], A000045 [1], A011782 [2], A000079 [3], A003945 [42], A099036 [11], A175656 [7], A105476 [69], A168604 [26], A045891 [19], A078057 [21], A151821 [170], A175657 [43], 4*A172481 [15; n>=-1], A175655 [71, this sequence], 4*A026597 [325; n>=-1], A033484 [58], A087447 [27], A175658 [23], A026150 [85], A175661 [171], A036563 [186], A098156 [59], A046717 [341], 2*A001792 [187; n>=1 with a(0)=1], A175659 [343].

Programs

  • Magma
    I:=[1, 4, 8]; [n le 3 select I[n] else 3*Self(n-1)+Self(n-2)-6*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 21 2013
    
  • Maple
    with(LinearAlgebra): nmax:=27; m:=5; A[5]:= [0,0,1,0,0,0,1,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    CoefficientList[Series[(1 + x - 5 x^2) / (1 - 3 x - x^2 + 6 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *)
    LinearRecurrence[{3,1,-6},{1,4,8},40] (* Harvey P. Dale, Dec 25 2024 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;4;8])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

G.f.: (1+x-5*x^2)/(1-3*x-x^2+6*x^3).
a(n) = 3*a(n-1) + a(n-2) - 6*a(n-3) with a(0)=1, a(1)=4 and a(2)=8.
a(n) = ((10+8*A)*A^(-n-1) + (10+8*B)*B^(-n-1))/13 - 2^n with A = (-1+sqrt(13))/6 and B = (-1-sqrt(13))/6.
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n)*2*A000244(n)/(A075118(n)-A006130(n-1)*sqrt(13)).
E.g.f.: 2*exp(x/2)*(13*cosh(sqrt(13)*x/2) + 5*sqrt(13)*sinh(sqrt(13)*x/2))/13 - cosh(2*x) - sinh(2*x). - Stefano Spezia, Jan 31 2023

A172481 a(n) = (3*n*2^n+2^(n+4)+2*(-1)^n)/18.

Original entry on oeis.org

1, 2, 5, 11, 25, 55, 121, 263, 569, 1223, 2617, 5575, 11833, 25031, 52793, 111047, 233017, 487879, 1019449, 2126279, 4427321, 9204167, 19107385, 39612871, 82021945, 169636295, 350457401, 723284423, 1491308089, 3072094663, 6323146297, 13004206535, 26724240953
Offset: 0

Views

Author

Paul Curtz, Feb 04 2010

Keywords

Comments

The binomial transform is in A126184.
An elephant sequence, see A175654 and A175655. There are 24 A[5] vectors, with decimal values between 7 and 448, that lead for the corner squares to this sequence. Its companion sequence for the central square is A175656. Furthermore there are 36 A[5] vectors, with decimal values between 15 and 480, that lead for the central square to four times this sequence for n >= -1. Its companion sequence for the corner squares is A059570. - Johannes W. Meijer, Aug 15 2010
a(n) is also the number of runs of weakly increasing parts in all compositions of n+1. a(2) = 5: (111), (12), (2)(1), (3). - Alois P. Heinz, Apr 30 2017

Crossrefs

Programs

  • Magma
    [(3*n*2^n+2^(n+4)+2*(-1)^n)/18: n in [0..40]]; // Vincenzo Librandi, Aug 04 2011
    
  • Mathematica
    Table[(3n 2^n+2^(n+4)+2(-1)^n)/18,{n,0,40}]  (* or *)
    CoefficientList[Series[(1-x-x^2)/((1+x)(1-2x)^2), {x,0,40}], x]  (* Harvey P. Dale, Mar 28 2011 *)
  • PARI
    a(n)=(3*n*2^n+2^(n+4)+2*(-1)^n)/18 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (1-x-x^2)/((1+x)*(1-2*x)^2).
a(n) = A001045(n-1)+2*a(n-1), n>0.
a(n)+A139790(n) = 2^(n+1) = A000079(n+1).
a(n) = A139790(n)+A140960(n).
a(n) = A001045(n)+(-1)^n*A084219(n).
a(n) = A127984(n) + 2^(n-1). Application: Problem 11623, AMM 119 (2012) 161. - Stephen J. Herschkorn, Feb 11 2012

Extensions

Definition replaced by explicit formula by R. J. Mathar, Feb 11 2010

A331332 Sparse ruler statistics: T(n,k) (0 <= k <= n) is the number of rulers with length n where the length of the first segment appears k times. Triangle read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 3, 0, 1, 0, 8, 4, 3, 0, 1, 0, 14, 9, 4, 4, 0, 1, 0, 26, 16, 12, 4, 5, 0, 1, 0, 46, 34, 21, 15, 5, 6, 0, 1, 0, 85, 64, 45, 28, 20, 6, 7, 0, 1, 0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1, 0, 286, 236, 183, 128, 90, 48, 35, 8, 9, 0, 1, 0, 528, 452, 361, 269, 185, 126, 63, 44, 9, 10, 0, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2020

Keywords

Comments

A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks. See A103294 for more definitions.

Examples

			Triangle starts:
[ 0][1]
[ 1][0,   1]
[ 2][0,   1,   1]
[ 3][0,   3,   0,  1]
[ 4][0,   4,   3,  0,  1]
[ 5][0,   8,   4,  3,  0,  1]
[ 6][0,  14,   9,  4,  4,  0,  1]
[ 7][0,  26,  16, 12,  4,  5,  0, 1]
[ 8][0,  46,  34, 21, 15,  5,  6, 0, 1]
[ 9][0,  85,  64, 45, 28, 20,  6, 7, 0, 1]
[10][0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1]
		

Crossrefs

Columns k=0-1 give: A000007, A331330.
Row sums give A011782.
Row sums over even columns give A331609 (for n>0).
Row sums over odd columns give A331606 (for n>0).
T(2n,n) gives A332051.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
         `if`(i=j, x, 1)*b(n-j, `if`(n (p-> seq(coeff(p, x, i), i=0..degree(p)))(
                `if`(n=0, 1, add(b(n-j, j), j=1..n))):
    seq(T(n), n=0..12);  # Alois P. Heinz, Feb 06 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, Sum[b[n - j, j], {j, 1, n}]]];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Nov 08 2020, after Alois P. Heinz *)
  • SageMath
    def A331332_row(n):
        if n == 0: return [1]
        L = [0 for k in (0..n)]
        for c in Compositions(n):
            L[list(c).count(c[0])] += 1
        return L
    for n in (0..10): print(A331332_row(n))

Formula

Sum_{k=1..n} k * T(n,k) = A175656(n-1) for n>0. - Alois P. Heinz, Feb 07 2020

A348405 a(0) = 1, a(n) + a(n+1) = round(2^n/9), n >= 0.

Original entry on oeis.org

1, -1, 1, -1, 2, 0, 4, 3, 11, 17, 40, 74, 154, 301, 609, 1211, 2430, 4852, 9712, 19415, 38839, 77669, 155348, 310686, 621382, 1242753, 2485517, 4971023, 9942058, 19884104, 39768220, 79536427, 159072867, 318145721, 636291456, 1272582898, 2545165810
Offset: 0

Views

Author

Paul Curtz, Oct 17 2021

Keywords

Crossrefs

Cf. A139797 (a(n) + a(n+1) = round(2^n/9) too, but a(0) = 0).

Programs

  • Mathematica
    CoefficientList[ Series[(x^4-x^3+2x-1)/((2*x^3-3*x^2+3*x-1)*(x+1)^2), {x, 0, 40}], x] (* Thomas Scheuerle, Oct 17 2021 *)
    nxt[{n_,a_}]:={n+1,Round[(2^n)/9]-a}; NestList[nxt,{0,1},40][[All,2]] (* or *) LinearRecurrence[{1,2,-1,1,2},{1,-1,1,-1,2},40] (* Harvey P. Dale, Apr 28 2022 *)

Formula

a(n+1) = 2*a(n) - A104581(n+6).
a(n) + a(n+1) = A113405(n).
a(n) + a(n+3) = A001045(n).
a(n+2) = a(n) + A131666(n).
From Thomas Scheuerle, Oct 18 2021: (Start)
G.f.: (x^4-x^3+2x-1)/((2*x^3-3*x^2+3*x-1)*(x+1)^2).
A172481(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(2*n-k). With negative sign for ...*a(1+2*n-k) and ...*a(3+2*n-k) too.
A175656(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(2+2*n-k).
A136298(n+1) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(4+2*n-k).
A348407(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*(a(2+2*n-k) - 2*a(1+2*n-k) - a(2*n-k)).
(End)

Extensions

a(22)-a(36) from Thomas Scheuerle, Oct 17 2021
Showing 1-4 of 4 results.