cp's OEIS Frontend

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.

A317830 Numerators of rational valued sequence whose Dirichlet convolution with itself yields A175851, the ordinal transform of the nextprime function, A151800.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Crossrefs

Cf. A151800, A175851, A046644 (denominators).

Programs

  • 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 *)
  • 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)&&(dA317830aux(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)&&(dA317830aux(d)*A317830aux(n/d),0)))/2); mapput(memo317830,n,v); (v)));

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A175851(n) - Sum_{d|n, d>1, d 1.