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.
%I A385588 #17 Jul 14 2025 23:23:38 %S A385588 0,4,45,251,1078,4054,14115,46837,150612,474200,1471561,4520959, %T A385588 13792002,41867242,126649983,382177817,1151251648,3463715980, %U A385588 10412118981,31280396611,93933463950,281993329214,846382640155,2539986780541,7621705171308,22868739391744,68613734367105,205856772356807 %N A385588 Number of non-derangements of length n with 2 excedances. %C A385588 Number of permutations of length n guessed by a cyclic shifting strategy in 3 guesses such that the first correct entry occurs on guess 1. In other words, non-derangements guessable by cyclic shift in 3 guesses. %H A385588 Aurora Hiveley, <a href="https://arxiv.org/abs/2506.23452">Experimenting with Permutation Wordle</a>, arXiv:2506.23452 [math.CO], 2025. %H A385588 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (10,-40,82,-91,52,-12). %F A385588 a(n) = 1 - 2^(n+1) + 3^n + n^2/2 + 5*n/2 - n*2^n. %F A385588 a(n) = Sum_{k=1..n-3} binomial(n,k)*(2^(n-k) - 2*n + 2*k - 1). %F A385588 G.f.: x^4 * (4 + 5*x - 39*x^2 + 40*x^3 - 12*x^4) / ((1 - x)^3 * (1 - 2*x)^2 * (1 - 3*x)). - _Stefano Spezia_, Jul 03 2025 %e A385588 For n=4, the non-derangements with 2 excedances are 1342, 2314, 2431, and 3241. %t A385588 LinearRecurrence[{10, -40, 82, -91, 52, -12}, {0, 4, 45, 251, 1078, 4054}, 28] (* _Hugo Pfoertner_, Jul 03 2025 *) %Y A385588 Summation uses k=2 row of A046739. %K A385588 nonn,easy %O A385588 3,2 %A A385588 _Aurora Hiveley_, Jul 03 2025