Displaying 1-3 of 3 results found.
page
1
Denominators of rational valued sequence whose Dirichlet convolution with itself yields A005187.
+10
4
1, 2, 1, 8, 1, 1, 2, 16, 1, 1, 2, 4, 2, 4, 1, 128, 1, 1, 2, 1, 2, 4, 1, 2, 2, 4, 1, 16, 1, 2, 2, 256, 1, 1, 2, 4, 2, 4, 1, 8, 2, 4, 1, 16, 1, 2, 2, 64, 8, 4, 1, 16, 1, 2, 2, 32, 1, 2, 2, 8, 2, 4, 1, 1024, 1, 1, 2, 2, 2, 4, 1, 1, 2, 4, 1, 16, 4, 2, 2, 32, 2, 4, 1, 16, 1, 2, 2, 32, 1, 2, 4, 8, 2, 4, 1, 64, 2, 16, 1, 16, 1, 2, 2, 32, 2
FORMULA
a(n) = denominator of f(n), where f(1) = 1, f(n) = (1/2) * ( A005187(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
PROG
(PARI)6
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
A317927perA317928(n) = if(1==n, n, ( A005187(n)-sumdiv(n, d, if((d>1)&&(d<n), A317927perA317928(d)*A317927perA317928(n/d), 0)))/2);
A317928(n) = denominator(A317927perA317928(n));
Numerators of rational valued sequence whose Dirichlet convolution with itself yields A002487, Stern's Diatomic sequence.
+10
3
1, 1, 1, 3, 3, 1, 3, 5, 3, 3, 5, 3, 5, 3, 1, 35, 5, 3, 7, 9, 5, 5, 7, 5, 19, 5, 5, 9, 7, 1, 5, 63, 1, 5, 9, 9, 11, 7, 5, 15, 11, 5, 13, 15, 13, 7, 9, 35, 27, 19, 7, 15, 13, 5, 7, 15, 3, 7, 11, 3, 9, 5, -7, 231, -1, 1, 11, 15, 7, 9, 13, 15, 15, 11, 47, 21, 19, 5, 13, 105, 27, 11, 19, 15, 27, 13, 11, 25, 17, 13, 23, 21, 11, 9, 1, 63
FORMULA
a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * ( A002487(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
A317931perA317932(n) = if(1==n, n, ( A002487(n)-sumdiv(n, d, if((d>1)&&(d<n), A317931perA317932(d)*A317931perA317932(n/d), 0)))/2);
A317931(n) = numerator(A317931perA317932(n));
(PARI)
\\ Memoized implementation:
memo = Map();
A317931perA317932(n) = if(1==n, n, if(mapisdefined(memo, n), mapget(memo, n), my(v = ( A002487(n)-sumdiv(n, d, if((d>1)&&(d<n), A317931perA317932(d)*A317931perA317932(n/d), 0)))/2); mapput(memo, n, v); (v)));
1, -3, -4, 2, -8, 14, -11, 0, 0, 30, -19, -14, -23, 41, 38, 0, -32, -2, -35, -34, 49, 73, -42, 4, 17, 89, 14, -46, -54, -172, -57, 0, 88, 126, 109, 10, -71, 137, 110, 12, -79, -219, -82, -86, -6, 164, -89, 0, 26, -103, 158, -106, -102, -76, 199, 16, 170, 212, -113, 274, -117, 223, 16, 0, 240, -406, -131, -154, 201
PROG
(PARI)
up_to = 65537;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
v346237 = DirInverseCorrect(vector(up_to, n, A005187(n)));
Search completed in 0.009 seconds
|