login
Numbers k such that Sum_{j=1..k} Catalan(j) == 1 (mod 3).
3

%I #16 Aug 26 2022 16:52:19

%S 1,4,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,28,31,32,33,34,

%T 37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,

%U 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,82,85,86,87,88,91,94,95

%N Numbers k such that Sum_{j=1..k} Catalan(j) == 1 (mod 3).

%H Y. More, <a href="https://www.jstor.org/stable/30037533">Problem 11165</a>, Amer. Math. Monthly, 112 (2005), 568.

%F Equivalently, numbers k such that base-3 expansion of k+1 contains a 2.

%t Select[ Range[ 100], Mod[ Sum[(2 n)!/n!/(n + 1)!, {n, #}], 3] == 1 &] (* _Robert G. Wilson v_, Jun 14 2005 *)

%t Position[Accumulate[CatalanNumber[Range[100]]],_?(Mod[#,3]==1&)]//Flatten (* _Harvey P. Dale_, Aug 26 2022 *)

%Y Cf. A000108, A107755, A107757.

%Y Equals A074940 - 1.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Jun 11 2005