[go: up one dir, main page]

login
Revision History for A177265 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of permutations of {1,2,...,n} having exactly one string of consecutive fixed points (including singletons).
(history; published version)
#33 by Alois P. Heinz at Mon May 27 16:19:52 EDT 2024
STATUS

proposed

approved

#32 by Michel Marcus at Mon May 27 05:41:12 EDT 2024
STATUS

editing

proposed

#31 by Michel Marcus at Mon May 27 05:41:04 EDT 2024
FORMULA

a(n) = (1/2)*(1 - (-1)^n) + Sum_{j=1..n} d[(j], ), where d[(j] ) = A000166(nj) are the derangement numbers.

STATUS

proposed

editing

Discussion
Mon May 27
05:41
Michel Marcus: ok ?
#30 by G. C. Greubel at Sun May 19 02:10:01 EDT 2024
STATUS

editing

proposed

#29 by G. C. Greubel at Sun May 19 01:37:57 EDT 2024
FORMULA

a(n) = (1/2)[*(1 - (-1)^n] ) + Sum_{j=1..n} d[j], where d[j] = A000166(n) are the derangement numbers.

Conjecture: D-finite with recurrence a(n) +(- (n+-1)*a(n-1) +(- (n+-1)*a(n-2) +(n-1)*a(n-3) + (n-2)*a(n-4) = 0. - R. J. Mathar, Jul 01 2022

MATHEMATICA

a[0] = 1; a[n_] := a[n] = n*a[n - 1] + (-1)^n; f[n_] := Sum[(n - k) a[n - k - 1], {k, 0, n - 1}]; Array[f, 20] (* Robert G. Wilson v, Apr 01 2011 *)

PROG

(Magma)

A000166:= func< n | Factorial(n)*(&+[(-1)^j/Factorial(j): j in [0..n]]) >;

A177265:= func< n | n le 2 select 1 else Self(n-1) + n*A000166(n-1) >;

[A177265(n): n in [1..30]]; // G. C. Greubel, May 19 2024

(SageMath)

def A000166(n): return factorial(n)*sum((-1)^j/factorial(j) for j in range(n+1))

def a(n): return 1 if n<3 else a(n-1) + n*A000166(n-1) # a = A177265

[a(n) for n in range(1, 31)] # G. C. Greubel, May 19 2024

CROSSREFS

Cf. A000166, A000240.

Cf. A000166. Column A180192(n,1).

Cf. A000240.

STATUS

approved

editing

Discussion
Sun May 19
02:10
G. C. Greubel: Sean A. Irvine's comment can be stated as a(n) = A001277(n) + (1-(-1)^n)/2 = partial sums of A000240(n). If this was added in the formula section then "empirically" can be removed.
#28 by Michael De Vlieger at Tue Jul 12 08:40:11 EDT 2022
STATUS

proposed

approved

#27 by Michel Marcus at Tue Jul 12 01:57:06 EDT 2022
STATUS

editing

proposed

#26 by Michel Marcus at Tue Jul 12 01:57:03 EDT 2022
CROSSREFS

Cf. A000240.

STATUS

proposed

editing

#25 by Sean A. Irvine at Tue Jul 12 01:05:03 EDT 2022
STATUS

editing

proposed

#24 by Sean A. Irvine at Tue Jul 12 01:04:56 EDT 2022
COMMENTS

Empirically the partial sums of A000240. - Sean A. Irvine, Jul 12 2022

STATUS

approved

editing