This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A317830 #11 Dec 19 2021 04:32:42 %S A317830 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, %T A317830 -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, %U A317830 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 %N A317830 Numerators of rational valued sequence whose Dirichlet convolution with itself yields A175851, the ordinal transform of the nextprime function, A151800. %H A317830 Antti Karttunen, <a href="/A317830/b317830.txt">Table of n, a(n) for n = 1..65537</a> %F A317830 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. %t A317830 A175851[n_] := If[!CompositeQ[n], 1, n - NextPrime[n, -1] + 1]; %t A317830 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]}])]; %t A317830 a[n_] := Numerator[f[n]]; %t A317830 Array[a, 100] (* _Jean-François Alcover_, Dec 19 2021 *) %o A317830 (PARI) %o A317830 A175851(n) = if(1==n,n,1 + n - precprime(n)); %o A317830 A317830aux(n) = if(1==n,n,(A175851(n)-sumdiv(n,d,if((d>1)&&(d<n),A317830aux(d)*A317830aux(n/d),0)))/2); %o A317830 A317830(n) = numerator(A317830aux(n)); %o A317830 (PARI) %o A317830 \\ Memoized implementation: %o A317830 memo317830 = Map(); %o A317830 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))); %Y A317830 Cf. A151800, A175851, A046644 (denominators). %Y A317830 Cf. also A305791, A305805, A305806, A317833, A317834, A317847. %K A317830 sign,frac %O A317830 1,4 %A A317830 _Antti Karttunen_, Aug 12 2018