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.

A284877 Irregular triangle T(n,k) for 1 <= k <= n/2 + 1: T(n,k) = number of double palindrome structures of length n using exactly k different symbols.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 7, 2, 1, 15, 5, 1, 25, 21, 3, 1, 49, 42, 7, 1, 79, 122, 44, 4, 1, 129, 225, 90, 9, 1, 211, 570, 375, 80, 5, 1, 341, 990, 715, 165, 11, 1, 517, 2321, 2487, 930, 132, 6, 1, 819, 3913, 4550, 1820, 273, 13, 1, 1275, 8827, 14350, 8330, 2009, 203, 7
Offset: 1

Views

Author

Andrew Howroyd, Apr 04 2017

Keywords

Comments

A double palindrome is the concatenation of two palindromes. Permuting the symbols will not change the structure. For the purposed of this sequence, valid palindromes include both the empty word and a singleton symbol.

Examples

			Triangle starts:
1
1     1
1     3
1     7      2
1    15      5
1    25     21       3
1    49     42       7
1    79    122      44       4
1   129    225      90       9
1   211    570     375      80       5
1   341    990     715     165      11
1   517   2321    2487     930     132      6
1   819   3913    4550    1820     273     13
1  1275   8827   14350    8330    2009    203      7
1  1863  14480   25515   15750    3990    420     15
1  2959  31802   75724   64004   23296   3920    296     8
1  4335  51425  132090  118167   44982   7854    612    17
1  6703 110928  376779  445275  229257  57078   7074   414   9
1  9709 177270  647995  807975  433713 111720  14250   855  19
1 15067 377722 1798175 2892470 2023135 698670 126300 12000 560 10
....
The first few structures are:
n = 1: a => 1
n = 2: aa; ab => 1 + 1
n = 3: aaa; aab, aba, abb => 1 + 3
n = 4: aaaa; aaab, aaba, aabb, abaa, abab, abba, abbb; abac, abcb => 1 + 7 + 2
		

Crossrefs

Columns k=2..4 are A328688, A328689, A328690.
Row sums are A165137.
Partial row sums include A180249, A328692, A328693.

Programs

  • Mathematica
    r[d_, k_]:=If[OddQ[d], d*k^((d + 1)/2), (d/2)*(k + 1)*k^(d/2)]; a[n_, k_]:= r[n, k] - Sum[If[dIndranil Ghosh, Apr 07 2017 *)
  • PARI
    r(d,k)=if (d % 2 == 0, (d/2)*(stirling(d/2,k,2)+stirling(d/2+1,k,2)), d*stirling((d+1)/2, k,2));
    a(n,k) = r(n,k) - sumdiv(n,d, if (d
    				
  • Python
    from sympy import totient, divisors, binomial, factorial
    def r(d, k): return (d//2)*(k + 1)*k**(d//2) if d%2 == 0 else d*k**((d + 1)//2)
    def a(n, k): return r(n, k) - sum([totient(n//d)*a(d, k) for d in divisors(n) if dIndranil Ghosh, Apr 07 2017

Formula

T(n, k) = (Sum_{j=0..k} (-1)^j * binomial(k, j) * A284873(n, k-j)) / k!.
T(n, k) = r(n, k) - Sum_{d|n, d

A328689 Number of double palindrome structures of length n using exactly three different symbols.

Original entry on oeis.org

0, 0, 0, 2, 5, 21, 42, 122, 225, 570, 990, 2321, 3913, 8827, 14480, 31802, 51425, 110928, 177270, 377722, 598437, 1264307, 1990098, 4175201, 6540605, 13653822, 21301740, 44288071, 68877929, 142736091, 221392266, 457560122, 708106245, 1460194770, 2255365152, 4641851924
Offset: 1

Author

Andrew Howroyd, Oct 25 2019

Keywords

Comments

A double palindrome is the concatenation of two palindromes. Permuting the symbols will not change the structure.

Examples

			For n = 4, the 2 structures are: abac, abcb.
		

Crossrefs

Column 3 of A284877.

A328690 Number of double palindrome structures of length n using exactly four different symbols.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 7, 44, 90, 375, 715, 2487, 4550, 14350, 25515, 75724, 132090, 376779, 647995, 1798175, 3060736, 8329046, 14064523, 37725791, 63313250, 168011025, 280576935, 738453366, 1228322550, 3212296488, 5325765931, 13858103244, 22913129140, 59383320585
Offset: 1

Author

Andrew Howroyd, Oct 25 2019

Keywords

Comments

A double palindrome is the concatenation of two palindromes. Permuting the symbols will not change the structure.

Crossrefs

Column 4 of A284877.

A328692 Number of double palindrome structures of length n using a maximum of three different symbols.

Original entry on oeis.org

1, 1, 2, 4, 10, 21, 47, 92, 202, 355, 782, 1332, 2839, 4733, 10103, 16344, 34762, 55761, 117632, 186980, 392790, 619805, 1297727, 2037180, 4248151, 6642921, 13812710, 21522622, 44630687, 69353037, 143470907, 222408044, 459129802, 710268189, 1463532722, 2259952352
Offset: 0

Author

Andrew Howroyd, Oct 25 2019

Keywords

Comments

A double palindrome is the concatenation of two palindromes. Permuting the symbols will not change the structure.

Examples

			For n=4, the 10 structures are: aaaa; aaab, aaba, aabb, abaa, abab, abba, abbb; abac, abcb.
		

Crossrefs

Formula

a(n) = Sum_{k=1..3} A284877(n,k) for n > 0.
a(n) = A328688(n) + A328689(n) + 1.
Showing 1-4 of 4 results.