login

Revision History for A103293

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of ways to color n regions arranged in a line such that consecutive regions do not have the same color.
(history; published version)
#61 by Michael De Vlieger at Tue Oct 15 15:42:50 EDT 2024
STATUS

reviewed

approved

#60 by Stefano Spezia at Tue Oct 15 14:21:56 EDT 2024
STATUS

proposed

reviewed

#59 by Chai Wah Wu at Tue Oct 15 14:13:03 EDT 2024
STATUS

editing

proposed

#58 by Chai Wah Wu at Tue Oct 15 14:12:57 EDT 2024
PROG

return sum(stirling(n-1, k, kind=2)+ach(n-1, k)>>1 for k in range(n)) # Chai Wah Wu, Oct 15 2024

#57 by Chai Wah Wu at Tue Oct 15 14:12:46 EDT 2024
PROG

(Python)

from functools import lru_cache

from sympy.functions.combinatorial.numbers import stirling

def A103293(n):

if n == 0: return 1

@lru_cache(maxsize=None)

def ach(n, k): return (n==k) if n<2 else k*ach(n-2, k)+ach(n-2, k-1)+ach(n-2, k-2)

return sum(stirling(n-1, k, kind=2)+ach(n-1, k)>>1 for k in range(n)) # Chai Wah Wu, Oct 15 2024

STATUS

approved

editing

#56 by Alois P. Heinz at Mon Sep 30 15:46:00 EDT 2024
STATUS

proposed

approved

#55 by Andrew Howroyd at Mon Sep 30 15:40:26 EDT 2024
STATUS

editing

proposed

#54 by Andrew Howroyd at Mon Sep 30 15:34:51 EDT 2024
CROSSREFS

Row sums of A284949.

STATUS

approved

editing

#53 by Alois P. Heinz at Sat Aug 31 21:48:09 EDT 2024
STATUS

reviewed

approved

#52 by Andrew Howroyd at Sat Aug 31 20:53:49 EDT 2024
STATUS

proposed

reviewed