login
Number of 10-digit positive integers in base n where the sum of the first k digits equals the sum of the last k digits.
3

%I #17 May 09 2024 09:09:41

%S 126,6046,88428,694360,3705741,15192604,51418473,150420187,392406145,

%T 933294637,2056947827,4253047045,8329101326,15566783605,27934647638,

%U 48371293570,81155221112,132379936520,210555362990,327359243694,498565022483,745175639274,1094795785319

%N Number of 10-digit positive integers in base n where the sum of the first k digits equals the sum of the last k digits.

%C These integers are sometimes called balanced numbers.

%D Cambridge Colleges Sixth Term Examination Papers (STEP) 2007, Paper I, Section A (Pure Mathematics), Nr. 1.

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (10,-45,120,-210,252,-210,120,-45,10,-1).

%F a(n) = n*(n-1)*(156190*n^7 + 15619*n^6 + 45019*n^5 + 14149*n^4 + 18139*n^3 + 9760*n^2 + 6660*n + 5040)/362880

%F From _Chai Wah Wu_, May 08 2024: (Start)

%F a(n) = 10*a(n-1) - 45*a(n-2) + 120*a(n-3) - 210*a(n-4) + 252*a(n-5) - 210*a(n-6) + 120*a(n-7) - 45*a(n-8) + 10*a(n-9) - a(n-10) for n > 11.

%F G.f.: x^2*(x^7 + 326*x^6 + 7942*x^5 + 42341*x^4 + 67030*x^3 + 33638*x^2 + 4786*x + 126)/(x - 1)^10. (End)

%o (Python)

%o def A240929(n): return n*(n*(n*(n*(n*(n*(n*(n*(156190*n-140571)+29400)-30870)+3990)-8379)-3100)-1620)-5040)//362880 # _Chai Wah Wu_, May 08 2024

%Y Cf. A016061, A197083, A240927, A240928.

%K nonn,base,easy

%O 2,1

%A _Martin Renner_, Aug 03 2014