OFFSET
1,2
COMMENTS
Number of ring multiplications needed to multiply two degree-n polynomials using Karatsuba's algorithm.
Number of gates in the AND/OR problem (see Chang/Tsai reference).
a(n) is also the number of odd elements in the n X n symmetric Pascal matrix. - Stefano Spezia, Nov 14 2022
REFERENCES
A. A. Karatsuba and Y. P. Ofman, Multiplication of multiplace numbers by automata. Dokl. Akad. Nauk SSSR 145, 2, 293-294 (1962).
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
K.-N. Chang and S.-C. Tsai, Exact solution of a minimal recurrence, Inform. Process. Lett. 75 (2000), 61-64.
P. J. Grabner and H.-K. Hwang, Digital sums and divide-and-conquer recurrences: Fourier expansions and absolute convergence, Constructive Approximation, Jan. 2005, Volume 21, Issue 2, pp. 149-179.
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-28.
FORMULA
Partial sums of the sequence { b(1)=1, b(n)=2^(e0(n-1)+1) } (essentially A267584), where e0(n)=A023416(n) is the number of zeros in the binary expansion of n. [Chang/Tsai] - Ralf Stephan, Jul 29 2003
a(1) = 1, a(n) = a(floor(n/2)) + 2*a(ceiling(n/2)), n > 1.
a(n+1) = Sum_{0<=i, j<=n} (binomial(i+j, i) mod 2). - Benoit Cloitre, Mar 07 2005
In particular, a(2^k)=3^k, a(3*2^k)=7*3^k. - N. J. A. Sloane, Jan 18 2016
a(n) = 2*A268514(n-1) + 1. - N. J. A. Sloane, Feb 07 2016
MAPLE
f:=proc(n) option remember; if n=1 then 1 elif n mod 2 = 0 then 3*f(n/2) else 2*f((n+1)/2)+f((n-1)/2); fi; end; [seq(f(n), n=1..60)]; # N. J. A. Sloane, Jan 17 2016
MATHEMATICA
a[n_] := a[n] = If[EvenQ[n], 3 a[n/2], 2 a[# + 1] + a[#] &[(n - 1)/2]]; a[1] = 1; Array[a, 56] (* Michael De Vlieger, Oct 29 2022 *)
PROG
(PARI) a(n) = sum(i=0, n-1, sum(j=0, n-1, binomial(i+j, i) % 2)); \\ Michel Marcus, Aug 25 2013
(Magma) [n le 1 select 1 else Self(Floor(n/2)) + 2*Self(Ceiling(n/2)): n in [1..60]]; // Vincenzo Librandi, Aug 30 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Guillaume Hanrot and Paul Zimmermann, Sep 21 2001
EXTENSIONS
Edited with clearer definition by N. J. A. Sloane, Jan 18 2016
STATUS
approved