A117403 a(n) = Sum_{k=0..floor(n/2)} 2^((n-2*k)*k) for n>=0.
1, 1, 2, 3, 6, 13, 34, 105, 386, 1681, 8706, 53793, 395266, 3442753, 35659778, 440672385, 6476038146, 112812130561, 2336999211010, 57759810847233, 1697654543745026, 59146046307566593, 2450521284684021762
Offset: 0
Keywords
Examples
G.f.: A(x) = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 13*x^5 + 34*x^6 + 105*x^7 + ... where A(x) = 1/(1-x^2) + x/(1-2*x^2) + x^2/(1-4*x^2) + x^3/(1-8*x^2) + x^4/(1-16*x^2) + ...
Links
- G. C. Greubel, Table of n, a(n) for n = 0..150
Programs
-
Magma
[(&+[2^(k*(n-2*k)) : k in [0..Floor(n/2)]]): n in [0..30]]; // G. C. Greubel, Jun 28 2021
-
Mathematica
Table[Sum[2^(k*(n-2*k)), {k,0,Floor[n/2]}], {n,0,30}] (* G. C. Greubel, Jun 28 2021 *)
-
PARI
a(n) = sum(k=0,n\2,2^((n-2*k)*k))
-
PARI
{a(n) = polcoeff(sum(m=0,n,x^m/(1-2^m*x^2 +x*O(x^n))),n)} for(n=0,30,print1(a(n),", "))
-
Sage
[sum(2^(k*(n-2*k)) for k in (0..n//2)) for n in (0..30)] # G. C. Greubel, Jun 28 2021
Formula
G.f.: A(x) = Sum_{n>=0} x^n / (1 - 2^n*x^2).
a(2*n) = Sum_{k=0..n} 4^((n-k)*k).
a(2*n+1) = Sum_{k=0..n} 2^k * 4^((n-k)*k).
G.f.: 1/(1-x^2) - x/(Q(0) +x-x^3), where Q(k) = x^2*(2+x)*2^k -1-x - x*(2*x^2*2^k -1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 11 2013
Extensions
Name changed by Paul D. Hanna, Nov 11 2013
Comments