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 21-23 of 23 results.

A378203 Number of palindromic n-ary words of length n that include the last letter of their respective alphabet.

Original entry on oeis.org

1, 1, 1, 5, 7, 61, 91, 1105, 1695, 26281, 40951, 771561, 1214423, 26916709, 42664987, 1087101569, 1732076671, 49868399761, 79771413871, 2560599031177, 4108933742199, 145477500542221, 234040800869107, 9059621800971105, 14605723004036255, 613627780919407801
Offset: 0

Views

Author

John Tyler Rascoe, Nov 19 2024

Keywords

Examples

			a(0) = 1: ().
a(1) = 1: (a).
a(2) = 1: (b,b).
a(3) = 5: (a,c,a), (b,c,b), (c,a,c), (c,b,c), (c,c,c).
		

Crossrefs

Programs

  • Maple
    a:= n-> (h-> n^h-`if`(n=0, 0, (n-1)^h))(ceil(n/2)):
    seq(a(n), n=0..25);  # Alois P. Heinz, Nov 21 2024
  • Mathematica
    h[n_] := Ceiling[n/2];a[n_] := n^h[n] - (n - 1)^h[n];Join[{1},Table[a[n],{n,25}]] (* James C. McMahon, Nov 21 2024 *)
  • PARI
    h(n) = {ceil(n/2)}
    a(n) = {n^h(n)-(n-1)^h(n)}
    
  • Python
    def A378203(n): return n**(m:=n+1>>1)-(n-1)**m if n else 1 # Chai Wah Wu, Nov 21 2024

Formula

a(n) = n^h(n) - (n-1)^h(n) for n > 0, where h(n) = ceiling(n/2).
a(n) = A047969(n-1,h(n)-1) for n > 0.

A098462 a(n) = n^n + (n+1)^n.

Original entry on oeis.org

2, 3, 13, 91, 881, 10901, 164305, 2920695, 59823937, 1387420489, 35937424601, 1028320041299, 32214185570737, 1096589879846397, 40304932850948641, 1590815394987706351, 67107935949376420097, 3013151821625033296145, 143473758373207779108265
Offset: 0

Views

Author

Hugo Pfoertner, Sep 08 2004

Keywords

Crossrefs

Cf. A000169, A000312, A045531 (n^n-(n-1)^n), A055869 ((n+1)^n-n^n).

Programs

Formula

From Alois P. Heinz, Mar 19 2020: (Start)
a(n) = A000312(n) + A000169(n+1).
E.g.f.: (x-LambertW(-x))/((1+LambertW(-x))*x). (End)

Extensions

a(0)=2 prepended by Alois P. Heinz, Mar 19 2020

A181417 Irregular triangle T(n,k) = binomial(n-1,m-1)*m!*A036040(n,k), where m=A036043(n,k).

Original entry on oeis.org

1, 1, 2, 1, 12, 6, 1, 24, 18, 108, 24, 1, 40, 80, 360, 540, 960, 120, 1, 60, 150, 100, 900, 3600, 900, 4800, 10800, 9000, 720, 1, 84, 252, 420, 1890, 9450, 6300, 9450, 16800, 100800, 50400, 63000, 189000, 90720, 5040, 1, 112, 392, 784, 490, 3528, 21168, 35280, 26460, 35280, 47040, 352800, 235200, 705600, 88200, 294000, 2352000, 1764000, 846720, 3175200, 987840, 40320, 1, 144, 576, 1344, 2016, 6048, 42336
Offset: 1

Views

Author

Alford Arnold, Oct 22 2010

Keywords

Comments

This is a refinement of the triangle A048743.
Row n has A000041(n) elements.
The sequence can be derived by expanding A007318 and A000142 and using A036040.
For example, row four can be derived using
(1 3 3 3 1) times (1 2 2 6 24) times (1 4 3 6 1) = (1 24 18 108 24)

Examples

			The table begins:
1
1...2
1..12...6
1..24..18..108..24
		

Crossrefs

Cf. A045531 (row sums), A048743, A007318, A036040.

Extensions

Row 6 onwards and definition by R. J. Mathar, Feb 12 2013
Previous Showing 21-23 of 23 results.