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.

Showing 1-4 of 4 results.

A349344 Dirichlet inverse of A109168, where A109168(n) = (n+A006519(n))/2, and A006519 is the highest power of 2 dividing n.

Original entry on oeis.org

1, -2, -2, 0, -3, 4, -4, 0, -1, 6, -6, 0, -7, 8, 4, 0, -9, 2, -10, 0, 5, 12, -12, 0, -4, 14, -2, 0, -15, -8, -16, 0, 7, 18, 6, 0, -19, 20, 8, 0, -21, -10, -22, 0, 3, 24, -24, 0, -9, 8, 10, 0, -27, 4, 8, 0, 11, 30, -30, 0, -31, 32, 4, 0, 9, -14, -34, 0, 13, -12, -36, 0, -37, 38, 8, 0, 9, -16, -40, 0, -4, 42, -42, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA109168(n) = ((n+bitand(n, -n))\2); \\ From A109168 by M. F. Hasler, Oct 19 2019 (Cf. A140472).
    v349344 = DirInverseCorrect(vector(up_to,n,A109168(n)));
    A349344(n) = v349344[n];

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A109168(n/d) * a(d).
a(n) = A349345(n) - A109168(n).

A349341 Dirichlet inverse of A026741, which is defined as n if n is odd, n/2 if n is even.

Original entry on oeis.org

1, -1, -3, -1, -5, 3, -7, -1, 0, 5, -11, 3, -13, 7, 15, -1, -17, 0, -19, 5, 21, 11, -23, 3, 0, 13, 0, 7, -29, -15, -31, -1, 33, 17, 35, 0, -37, 19, 39, 5, -41, -21, -43, 11, 0, 23, -47, 3, 0, 0, 51, 13, -53, 0, 55, 7, 57, 29, -59, -15, -61, 31, 0, -1, 65, -33, -67, 17, 69, -35, -71, 0, -73, 37, 0, 19, 77, -39, -79
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Agrees with A349343 on odd numbers.

Programs

  • Mathematica
    a[1]=1;a[n_]:=-DivisorSum[n,If[OddQ[n/#],n/#,n/(2#)]*a@#&,#Giorgos Kalogeropoulos, Nov 15 2021 *)
    f[p_, e_] := If[e == 1, -p, 0]; f[2, e_] := -1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    A349341(n) = { my(f = factor(n)); prod(i=1, #f~, if(2==f[i,1], -1, if(1==f[i,2], -f[i,1], 0))); };
    
  • Python
    from sympy import prevprime, factorint, prod
    def f(p, e):
        return -1 if p == 2 else 0 if e > 1 else -p
    def a(n):
        return prod(f(p, e) for p, e in factorint(n).items()) # Sebastian Karlsson, Nov 15 2021

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A026741(n/d) * a(d).
a(n) = A349342(n) - A026741(n).
a(2n+1) = A349343(2n+1) for all n >= 1.
Multiplicative with a(2^e) = -1, a(p) = -p and a(p^e) = 0 if e > 1. - Sebastian Karlsson, Nov 15 2021

A349343 Dirichlet inverse of A193356, which is defined as n if n is odd, 0 if n is even.

Original entry on oeis.org

1, 0, -3, 0, -5, 0, -7, 0, 0, 0, -11, 0, -13, 0, 15, 0, -17, 0, -19, 0, 21, 0, -23, 0, 0, 0, 0, 0, -29, 0, -31, 0, 33, 0, 35, 0, -37, 0, 39, 0, -41, 0, -43, 0, 0, 0, -47, 0, 0, 0, 51, 0, -53, 0, 55, 0, 57, 0, -59, 0, -61, 0, 0, 0, 65, 0, -67, 0, 69, 0, -71, 0, -73, 0, 0, 0, 77, 0, -79, 0, 0, 0, -83, 0, 85, 0, 87, 0, -89
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Agrees with A349341 on odd numbers.

Programs

  • Mathematica
    a[1]=1;a[n_]:=-DivisorSum[n,If[OddQ[n/#],n/#,0]*a@#&,#Giorgos Kalogeropoulos, Nov 15 2021 *)
    f[p_, e_] := If[e == 1, -p, 0]; f[2, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    A349343(n) = { my(f = factor(n)); prod(i=1, #f~, if((2==f[i,1])||(f[i,2]>1), 0, -f[i,1])); };

Formula

a(2n) = 0, a(2n+1) = A349341(2n+1) for all n >= 1.
Multiplicative with a(p^e) = 0 if p=2 or e>1, otherwise a(p) = -p. - (After Sebastian Karlsson's similar formula for A349341).

A349347 Sum of A181988 and its Dirichlet inverse, where A181988(n) = A001511(n)*A003602(n).

Original entry on oeis.org

2, 0, 0, 4, 0, 8, 0, 4, 4, 12, 0, 4, 0, 16, 12, 5, 0, 12, 0, 6, 16, 24, 0, 8, 9, 28, 12, 8, 0, 8, 0, 6, 24, 36, 24, 14, 0, 40, 28, 12, 0, 12, 0, 12, 26, 48, 0, 10, 16, 34, 36, 14, 0, 32, 36, 16, 40, 60, 0, 28, 0, 64, 36, 7, 42, 20, 0, 18, 48, 24, 0, 20, 0, 76, 46, 20, 48, 24, 0, 15, 37, 84, 0, 38, 54, 88, 60, 24, 0, 40
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA001511(n) = 1+valuation(n,2);
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A181988(n) = (A001511(n)*A003602(n));
    v349346 = DirInverseCorrect(vector(up_to,n,A181988(n)));
    A349346(n) = v349346[n];
    A349347(n) = (A181988(n)+A349346(n));

Formula

a(n) = A181988(n) + A349346(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A181988(d) * A349346(n/d).
Showing 1-4 of 4 results.