A130667 a(1) = 1; a(n) = max{ 5*a(k) + a(n-k) | 1 <= k <= n/2 } for n > 1.
1, 6, 11, 36, 41, 66, 91, 216, 221, 246, 271, 396, 421, 546, 671, 1296, 1301, 1326, 1351, 1476, 1501, 1626, 1751, 2376, 2401, 2526, 2651, 3276, 3401, 4026, 4651, 7776, 7781, 7806, 7831, 7956, 7981, 8106, 8231, 8856, 8881, 9006, 9131, 9756, 9881, 10506, 11131
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..16383
- Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 27, 32-33.
- D. E. Knuth, Problem 11320, The American Mathematical Monthly, Vol. 114, No. 9 (Nov., 2007), p. 835.
Programs
-
Haskell
import Data.List (transpose) a130667 n = a130667_list !! (n-1) a130667_list = 1 : (concat $ transpose [zipWith (+) vs a130667_list, zipWith (+) vs $ tail a130667_list]) where vs = map (* 5) a130667_list -- Reinhard Zumkeller, Apr 18 2012
-
Magma
[&+[5^(2*k - Valuation(Factorial(2*k), 2)): k in [0..n]]: n in [0..50]]; // Vincenzo Librandi, Mar 15 2019
-
Maple
a:= proc(n) option remember; `if`(n=1, 1, `if`(irem(n, 2, 'm')=0, 6*a(m), 5*a(m)+a(n-m))) end: seq(a(n), n=1..70); # Alois P. Heinz, Apr 09 2012
-
Mathematica
a[1]=1; a[n_] := a[n] = If[EvenQ[n], 6a[n/2], 5a[(n-1)/2]+a[(n+1)/2]]; Array[a, 50] (* Jean-François Alcover, Feb 13 2015 *)
-
PARI
first(n)=my(v=vector(n),r,t); v[1]=1; for(i=2,n, r=0; for(k=1,i\2, t=5*v[k]+v[i-k]; if(t>r, r=t)); v[i]=r); v \\ Charles R Greathouse IV, Aug 29 2016
Formula
a(2*n) = 6*a(n) and a(2*n+1) = 5*a(n) + a(n+1).
Let r(x) = (1 + 6*x + 5*x^2). Then (1 + 6*x + 11*x^2 + 36*x^3 + ...) = r(x) * r(x^2) * r(x^4) * r(x^8) * ... - Gary W. Adamson, Mar 26 2010
a(n) = Sum_{k=0..n} 5^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 5^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023
Comments