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-3 of 3 results.

A220062 Number A(n,k) of n length words over k-ary alphabet, where neighboring letters are neighbors in the alphabet; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 4, 2, 0, 0, 1, 5, 6, 6, 2, 0, 0, 1, 6, 8, 10, 8, 2, 0, 0, 1, 7, 10, 14, 16, 12, 2, 0, 0, 1, 8, 12, 18, 24, 26, 16, 2, 0, 0, 1, 9, 14, 22, 32, 42, 42, 24, 2, 0, 0, 1, 10, 16, 26, 40, 58, 72, 68, 32, 2, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Dec 03 2012

Keywords

Comments

Equivalently, the number of walks of length n-1 on the path graph P_k. - Andrew Howroyd, Apr 17 2017

Examples

			A(5,3) = 12: there are 12 words of length 5 over 3-ary alphabet {a,b,c}, where neighboring letters are neighbors in the alphabet: ababa, ababc, abcba, abcbc, babab, babcb, bcbab, bcbcb, cbaba, cbabc, cbcba, cbcbc.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,   1,   1,   1, ...
  0,  1,  2,  3,  4,   5,   6,   7, ...
  0,  0,  2,  4,  6,   8,  10,  12, ...
  0,  0,  2,  6, 10,  14,  18,  22, ...
  0,  0,  2,  8, 16,  24,  32,  40, ...
  0,  0,  2, 12, 26,  42,  58,  74, ...
  0,  0,  2, 16, 42,  72, 104, 136, ...
  0,  0,  2, 24, 68, 126, 188, 252, ...
		

Crossrefs

Columns k=0, 2-10 give: A000007, A040000, A029744(n+2) for n>0, A006355(n+3) for n>0, A090993(n+1) for n>0, A090995(n-1) for n>2, A129639, A153340, A153362, A153360.
Rows 0-6 give: A000012, A001477, A005843(k-1) for k>0, A016825(k-2) for k>1, A008590(k-2) for k>2, A113770(k-2) for k>3, A063164(k-2) for k>4.
Main diagonal gives: A102699.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, add(b(n-1, j, k), j=1..k),
          `if`(i>1, b(n-1, i-1, k), 0)+
          `if`(i b(n, 0, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n-1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[iJean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    ColGf(m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)==1, j->1, z);
    a(n,k)=Vec(ColGf(k,x) + O(x^(n+1)))[n+1];
    for(n=0, 7, for(k=0, 7, print1( a(n,k), ", ") ); print(); );
    \\ Andrew Howroyd, Apr 17 2017

A003185 a(n) = (4*n+1)*(4*n+5).

Original entry on oeis.org

5, 45, 117, 221, 357, 525, 725, 957, 1221, 1517, 1845, 2205, 2597, 3021, 3477, 3965, 4485, 5037, 5621, 6237, 6885, 7565, 8277, 9021, 9797, 10605, 11445, 12317, 13221, 14157, 15125, 16125, 17157, 18221
Offset: 0

Views

Author

Keywords

Comments

Bisection of A078371. - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
a(n) is the smallest number not in the sequence such that Sum_{k=0..n} 1/a(k) has a denominator 4*n+5. - Derek Orr, Jun 21 2015
a(n) is the number of 2 X 2 matrices with all elements in {-n,..,0,..,n} with permanent = determinant^n except for a(0), where a(0)=0, but A003185(0) = 5. - Indranil Ghosh, Jan 04 2017

Crossrefs

Programs

  • Mathematica
    Table[(4n+1)(4n+5),{n,0,40}] (* or *) LinearRecurrence[{3,-3,1},{5,45,117},40] (* Harvey P. Dale, Jan 27 2013 *)
  • PARI
    a(n) = (4*n+1)*(4*n+5); \\ Michel Marcus, Jan 17 2023
    
  • Python
    a= lambda n: (4*n+1)*(4*n+5) # Indranil Ghosh, Jan 04 2017

Formula

1 = Sum_{n>=0} 4/a(n). Sum_{k=0..n} 4/a(k) = 4(n+1)/[4(n+1)+1]. Integral_{x=0..1} 1/(1 + x^4) = Sum_{n>=0} 4/a(2*n) = Sum_{n>=0} (-1)^n/(4n+1). - Gary W. Adamson, Jun 18 2003
1 = 1/5 + Sum_{n>=1} 16/a(n); with partial sums (4n+1)/(4n+5). - Gary W. Adamson, Jun 18 2003
From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (-5-30*x+3*x^2)/(-1+x)^3.
a(3*n) = A001513(2*n).
Conjecture: a(n+1)-a(n) = A063164(n+2). (End)
a(n) = 32*n + a(n-1) + 8 (with a(0)=5). - Vincenzo Librandi, Nov 12 2010
a(0)=5, a(1)=45, a(2)=117, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jan 27 2013
Sum_{n>=0} (-1)^n/a(n) = (log(2*sqrt(2)+3) + Pi)/(8*sqrt(2)) - 1/4. - Amiram Eldar, Oct 08 2023

A305075 a(n) = 32*n - 24 (n>=1).

Original entry on oeis.org

8, 40, 72, 104, 136, 168, 200, 232, 264, 296, 328, 360, 392, 424, 456, 488, 520, 552, 584, 616, 648, 680, 712, 744, 776, 808, 840, 872, 904, 936, 968, 1000, 1032, 1064, 1096, 1128, 1160, 1192, 1224, 1256, 1288, 1320, 1352, 1384, 1416, 1448, 1480, 1512, 1544, 1576
Offset: 1

Views

Author

Emeric Deutsch, May 26 2018

Keywords

Comments

a(n) (n>=2) is the second Zagreb index of the single oxide chain SOX(n), defined pictorially in the Simonraj et al. reference (Fig. 4, where SOX(9) is shown marked as OX(1,9)).
The second Zagreb index of a simple connected graph is the sum of the degree products d(i)d(j) over all edges ij of the graph.
The M-polynomial of SL(n) is M(SL(n);x,y) = 2*x^2*y^2 + 2*n*x^2*y^4 + (n - 2)*x^4*y^4 (n>=2).

Crossrefs

Programs

  • GAP
    List([1..50], n->32*n-24); # Muniru A Asiru, May 27 2018
    
  • Maple
    seq(32*n - 24, n = 1 .. 50);
  • Mathematica
    32*Range[60]-24 (* or *) LinearRecurrence[{2,-1},{8,40},60] (* Harvey P. Dale, Mar 13 2022 *)
  • PARI
    Vec(8*x*(1 + 3*x) / (1 - x)^2 + O(x^50)) \\ Colin Barker, May 29 2018

Formula

a(n) = A063164(n) for n > 1.
From Colin Barker, May 29 2018: (Start)
G.f.: 8*x*(1 + 3*x) / (1 - x)^2.
a(n) = 2*a(n-1) - a(n-2) for n>2.
(End)
Showing 1-3 of 3 results.