A212500 a(n) is the difference between multiples of 5 with even and odd digit sum in base 4 in interval [0,4^n).
1, 4, 7, 36, 65, 340, 615, 3220, 5825, 30500, 55175, 288900, 522625, 2736500, 4950375, 25920500, 46890625, 245522500, 444154375, 2325622500, 4207090625, 22028612500, 39850134375, 208658012500, 377465890625, 1976437062500, 3575408234375
Offset: 1
Examples
Let n=3. In interval [0,4^3) we have 13 multiples of 5,from which in base 4 only three (namely, 35,50,55) have odd digit sums. Thus a(3)=(13-3)-3=7. From _Bob Selcoe_, May 28 2014: (Start) n=2: a(5)=65 because T(2,k) {k=0..6} is {1,2,3,4,3,2,1} and {j=1..7} is {1,1,2,3,5,8,13}: 1*1 + 2*1 + 3*2 + 4*3 + 3*5 + 2*8 + 1*13 = 65. n=3: a(7)=615 because T(3,k) {k=0..9} is {1,3,6,10,12,12,10,6,3,1} and {j=1..10} is {1,1,2,3,5,8,13,21,34,55}: 1*1 + 3*1 + 6*2 + 10*3 + 12*5 + 12*8 + 10*13 + 6*21 + 3*34 + 1*55 = 615. (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- V. Shevelev, On monotonic strengthening of Newman-like phenomenon on (2m+1)-multiples in base 2m, arXiv:0710.3177 [math.NT], 2007.
- Index entries for linear recurrences with constant coefficients, signature (0,10,0,-5).
Programs
-
Magma
I:=[1,4,7,36]; [n le 4 select I[n] else 10*Self(n-2)-5*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 17 2014
-
Mathematica
CoefficientList[Series[-(-1 - 4 x + 3 x^2 + 4 x^3)/(1 - 10 x^2 + 5 x^4), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 17 2014 *) LinearRecurrence[{0,10,0,-5},{1,4,7,36},30] (* Harvey P. Dale, Apr 07 2019 *)
-
PARI
Vec(-x*(-1-4*x+3*x^2+4*x^3)/(1-10*x^2+5*x^4) + O(x^30)) \\ Michel Marcus, Feb 06 2016
Formula
For n>=5, a(n) = 10*a(n-2)-5*a(n-4).
a(n) = 0.4*((5+2*sqrt(5))^(n/2)+ (5-2*sqrt(5))^(n/2)) , if n is even, and
a(n) = 0.1*((5+2*sqrt(5))^((n-1)/2)*sqrt(30+10*sqrt(5))+(5-2*sqrt(5))^((n-1)/2)*sqrt(30-10*sqrt(5))), if n is odd.
a(2n+1) = Sum_{j=0..3n+1} fibonacci(j+1)*A008287(n,j). - Bob Selcoe, May 28 2014
G.f.: -x*(-1-4*x+3*x^2+4*x^3) / ( 1-10*x^2+5*x^4 ). - R. J. Mathar, Jun 16 2014
Comments