login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A317830
Numerators of rational valued sequence whose Dirichlet convolution with itself yields A175851, the ordinal transform of the nextprime function, A151800.
6
1, 1, 1, 7, 1, 3, 1, 9, 11, 7, 1, 3, 1, 3, 5, 171, 1, -1, 1, -5, 5, 7, 1, -1, 11, 7, 29, 35, 1, -7, 1, -41, 5, 7, 9, 93, 1, 3, 5, 11, 1, -3, 1, -5, 3, 7, 1, -61, 11, 7, 9, 27, 1, -29, 5, -1, 9, 11, 1, -29, 1, 3, 3, 771, 9, 9, 1, -5, 5, -3, 1, -73, 1, 3, 3, 19, 9, 9, 1, -141, -45, 7, 1, -53, 5, 7, 9, 43, 1, -63, 5, 11, 9, 11, 13, 1597, 1
OFFSET
1,4
LINKS
FORMULA
a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A175851(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
MATHEMATICA
A175851[n_] := If[!CompositeQ[n], 1, n - NextPrime[n, -1] + 1];
f[n_] := f[n] = If[n == 1, 1, (1/2)(A175851[n] - Sum[If[1 < d < n, f[d]* f[n/d], 0], {d, Divisors[n]}])];
a[n_] := Numerator[f[n]];
Array[a, 100] (* Jean-François Alcover, Dec 19 2021 *)
PROG
(PARI)
A175851(n) = if(1==n, n, 1 + n - precprime(n));
A317830aux(n) = if(1==n, n, (A175851(n)-sumdiv(n, d, if((d>1)&&(d<n), A317830aux(d)*A317830aux(n/d), 0)))/2);
A317830(n) = numerator(A317830aux(n));
(PARI)
\\ Memoized implementation:
memo317830 = Map();
A317830aux(n) = if(1==n, n, if(mapisdefined(memo317830, n), mapget(memo317830, n), my(v = (A175851(n)-sumdiv(n, d, if((d>1)&&(d<n), A317830aux(d)*A317830aux(n/d), 0)))/2); mapput(memo317830, n, v); (v)));
CROSSREFS
Cf. A151800, A175851, A046644 (denominators).
Sequence in context: A130875 A370112 A200923 * A317938 A317834 A340144
KEYWORD
sign,frac
AUTHOR
Antti Karttunen, Aug 12 2018
STATUS
approved