OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
Sequence begins: 1, 1, 2, 7/2, 8, 14, 32, 121/2, 126, 248, 512, 1003, 2048, 4064, 8176, 130539/8, 32768.
MATHEMATICA
nn=50;
sys=Table[2^(n-1)==Sum[a[d]*a[n/d], {d, Divisors[n]}], {n, nn}];
Denominator[Array[a, nn]/.Solve[sys, Array[a, nn]][[2]]]
PROG
(PARI)
up_to = 65537;
prepareA299151perA299152(up_to) = { my(vmemo = vector(up_to)); for(n=1, up_to, vmemo[n] = if(1==n, n, (2^(n-1)-sumdiv(n, d, if((d>1)&&(d<n), vmemo[d]*vmemo[n/d], 0)))/2)); (vmemo); };
v299151perA299152 = prepareA299151perA299152(up_to);
A299151perA299152(n) = v299151perA299152[n];
\\ Or without memoization as:
A299151perA299152(n) = if(1==n, n, (2^(n-1)-sumdiv(n, d, if((d>1)&&(d<n), A299151perA299152(d)*A299151perA299152(n/d), 0)))/2);
A299152(n) = denominator(A299151perA299152(n)); \\ Antti Karttunen, Jul 29 2018
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Gus Wiseman, Feb 03 2018
EXTENSIONS
More terms from Antti Karttunen, Jul 29 2018
STATUS
approved