OFFSET
1,2
COMMENTS
Starting at n=1, a cube has an edge=2^(n+1)-3. The beginning cube has a value of 1 and is surrounded by 2^n layers of cubes each valued at 2^n. The sum of all cubes with values of 2^n is a(n).
Indices of primes in this sequence: 3, 10, 12, 21, 37, 70, 102, 201, 961, 1854, ....
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..825
Index entries for linear recurrences with constant coefficients, signature (29,-252,736,-512).
FORMULA
a(n) = 29*a(n-1) - 252*a(n-2) + 736*a(n-3) - 512*a(n-4).
a(n) = a(n-1) + 7*2^(4*n-1) - 27*2^(3*n-1) + 27*2^(2*n-1), for n>0.
G.f. x*(1 +220*x +1568*x^2 +512*x^3)/( (1-x)*(1-4*x)*(1-8*x)*(1-16*x) ). - R. J. Mathar, May 09 2013
EXAMPLE
The first cubes has value 1=a(1). The second cube has 2 layers of cubes each valued at 2 surrounding the cube of value 1 to give (5^3-1)*2+1=249=a(2). Next surround by 2^2 layers of cubes each valued at 2^2: (13^3-5^3)*4+249=8537=a(3). Finally, surround by 2^3 layers of cubes each of value 2^3 to get (29^3-13^3)*8 + 8537 = 186073 = a(4).
MAPLE
seq( (392*2^(4*n) -1620*2^(3*n) +1890*2^(2*n) -767)/105, n=1..20); # G. C. Greubel, Dec 31 2019
MATHEMATICA
LinearRecurrence[{29, -252, 736, -512}, {1, 249, 8537, 186073}, 20] (* Harvey P. Dale, Apr 22 2018 *)
PROG
(PARI) vector(20, n, (392*2^(4*n) -1620*2^(3*n) +1890*2^(2*n) -767)/105) \\ G. C. Greubel, Dec 31 2019
(Magma) [(392*2^(4*n) -1620*2^(3*n) +1890*2^(2*n) -767)/105: n in [1..20]]; // G. C. Greubel, Dec 31 2019
(Sage) [(392*2^(4*n) -1620*2^(3*n) +1890*2^(2*n) -767)/105 for n in (1..20)] # G. C. Greubel, Dec 31 2019
(GAP) List([1..20], n-> (392*2^(4*n) -1620*2^(3*n) +1890*2^(2*n) -767)/105); # G. C. Greubel, Dec 31 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. M. Bergot, May 01 2013
STATUS
approved