login
A113594
a(1) = a(2) = 1; a(n+1) = GCD(Sum_{1<=k<=n/2} a(k), Sum_{n/2<j<=n} a(j)).
1
1, 1, 1, 1, 2, 2, 1, 3, 4, 4, 2, 2, 8, 8, 1, 1, 6, 12, 4, 16, 20, 20, 2, 2, 4, 8, 8, 16, 40, 40, 1, 1, 2, 2, 6, 12, 12, 12, 32, 64, 16, 80, 20, 100, 120, 120, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 40, 200, 240, 240, 1, 1, 2, 2, 2, 4, 6, 6, 12, 12, 24, 24, 12, 12, 72, 144, 32, 64, 192, 384
OFFSET
1,5
COMMENTS
a(2n-1) divides a(2n), for every positive integer n.
LINKS
EXAMPLE
a(12) = GCD(a(1)+a(2)+a(3)+a(4)+a(5), a(6)+a(7)+a(8)+a(9)+a(10)+a(11)) = GCD(1+1+1+1+2, 2+1+3+4+4+2) = GCD(6,16) = 2.
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = GCD[ Sum[a[k], {k, Floor[(n - 1)/2]}], Sum[a[j], {j, Ceiling[n/2], n - 1}]]; Array[a, 82] (* Robert G. Wilson v, Feb 01 2006 *)
PROG
(Python)
from math import gcd
def A113594_list(nmax):
A = [1, 1]
x, y = A[0], A[1]
for n in range(3, nmax+1):
z = (n-2)//2
if n%2 != 0 and n > 4:
x += A[z]
y -= A[z]
A.append(gcd(x, y))
y += A[-1]
return A # John Tyler Rascoe, Apr 07 2023
CROSSREFS
Sequence in context: A123956 A368606 A331953 * A368604 A246425 A286468
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 26 2006
EXTENSIONS
More terms from Robert G. Wilson v, Feb 01 2006
STATUS
approved