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

A381643 a(n) = 4^n - (n+6)*3^(n-1) + (n+2)*2^(n-1).

Original entry on oeis.org

0, 0, 0, 3, 34, 245, 1436, 7483, 36198, 166545, 739792, 3203783, 13617242, 57072925, 236680068, 973578003, 3979881166, 16191039785, 65622734264, 265197899743, 1069304363970, 4303927449525, 17299346486380, 69458798306603, 278650899449654
Offset: 0

Views

Author

Enrique Navarrete, Mar 03 2025

Keywords

Comments

a(n) is the number of words of length n defined on a 4-letter alphabet where one of the letters is used at least twice and another letter is used at least once.

Examples

			For n=4 the 34 words that use 0 at least twice and 1 at least once are 0001 (4 of this type), 0011 (6 of this type), 0012 (12 of this type), 0013 (12 of this type).
		

Crossrefs

Programs

  • Python
    def A381643(n): return ((1<Chai Wah Wu, Mar 15 2025

Formula

E.g.f.: (exp(x)-x-1)*(exp(3*x)-exp(2*x)).
G.f.: x^3*(3 - 8*x)/((1 - 4*x)*(1 - 5*x + 6*x^2)^2). - Stefano Spezia, Mar 07 2025

A385329 a(n) = 5^n - 2*4^(n-1)*(n+4) + 3^(n-2)*(n^2+5*n+9).

Original entry on oeis.org

0, 0, 0, 0, 6, 110, 1220, 10612, 79786, 544434, 3468792, 21012200, 122500334, 693324502, 3833742796, 20809676604, 111288341970, 588046458074, 3076991784512, 15972440574064, 82370489136214, 422506631928510, 2157589903432020, 10977781519321220, 55686118748465786
Offset: 0

Views

Author

Enrique Navarrete, Jun 25 2025

Keywords

Comments

a(n) is the number of words of length n defined on 5 letters where two chosen letters, say a and b, are used at least twice.

Examples

			a(4) = 6 since the words are the 6 permutations of aabb.
a(5) = 110 since the words are (number of permutations in parentheses): aaabb (10), aabbb (10), aabbc (30), aabbd (30), aabbe (30).
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0,0,0,0] cat Coefficients(R!((2*x^4*(3 - 11*x)/((1 - 4*x)^2*(1 - 3*x)^3*(1 - 5*x))))); // Vincenzo Librandi, Jul 05 2025
  • Mathematica
    LinearRecurrence[{22, -200, 962, -2583, 3672, -2160}, {0, 0, 0, 0, 6, 110, 1220}, 25] (* Amiram Eldar, Jun 28 2025 *)

Formula

E.g.f.: exp(3*x)*(exp(x) - x - 1)^2.
G.f.: 2*x^4*(3 - 11*x)/((1 - 4*x)^2*(1 - 3*x)^3*(1 - 5*x)). - Jinyuan Wang, Jun 26 2025
Showing 1-2 of 2 results.