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-10 of 10 results.

A349382 Dirichlet convolution of A064989 with A346234 (Dirichlet inverse of A003961), where A003961 and A064989 are fully multiplicative sequences that shift the prime factorization of n one step towards larger and smaller primes respectively.

Original entry on oeis.org

1, -2, -3, -2, -4, 6, -6, -2, -6, 8, -6, 6, -6, 12, 12, -2, -6, 12, -6, 8, 18, 12, -10, 6, -12, 12, -12, 12, -8, -24, -8, -2, 18, 12, 24, 12, -10, 12, 18, 8, -6, -36, -6, 12, 24, 20, -10, 6, -30, 24, 18, 12, -12, 24, 24, 12, 18, 16, -8, -24, -8, 16, 36, -2, 24, -36, -10, 12, 30, -48, -6, 12, -8, 20, 36, 12, 36, -36
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Multiplicative because both A064989 and A346234 are.

Crossrefs

Cf. A003961, A064989, A151799, A151800, A346234, A349381 (Dirichlet inverse), A349383 (sum with it).
Cf. also A349355, A349356.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, -2, NextPrime[p, -1]^e - NextPrime[p]*NextPrime[p, -1]^(e - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 17 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A064989(n) = { my(f = factor(n)); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };
    A346234(n) = (moebius(n)*A003961(n));
    A349382(n) = sumdiv(n,d,A064989(n/d)*A346234(d));

Formula

a(n) = Sum_{d|n} A064989(n/d) * A346234(d).
a(n) = A349383(n) - A349381(n).
Multiplicative with a(p^e) = -2 if p = 2, and prevprime(p)^e - nextprime(p) * prevprime(p)^(e-1) otherwise, where prevprime function is A151799 and nextprime function is A151800. - Amiram Eldar, Nov 17 2021

A349388 Dirichlet convolution of A000027 with A346234 (Dirichlet inverse of A003961), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

1, -1, -2, -2, -2, 2, -4, -4, -6, 2, -2, 4, -4, 4, 4, -8, -2, 6, -4, 4, 8, 2, -6, 8, -10, 4, -18, 8, -2, -4, -6, -16, 4, 2, 8, 12, -4, 4, 8, 8, -2, -8, -4, 4, 12, 6, -6, 16, -28, 10, 4, 8, -6, 18, 4, 16, 8, 2, -2, -8, -6, 6, 24, -32, 8, -4, -4, 4, 12, -8, -2, 24, -6, 4, 20, 8, 8, -8, -4, 16, -54, 2, -6, -16, 4, 4, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Multiplicative because A000027 and A346234 are.

Crossrefs

Cf. A000027, A000040, A001223, A003961, A151800, A346234, A349387 (Dirichlet inverse), A349389 (sum with it), A378607 (inverse Möbius transform).
Cf. also A347238.

Programs

  • Mathematica
    f[p_, e_] := p^e - NextPrime[p] * p^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A346234(n) = (moebius(n)*A003961(n));
    A349388(n) = sumdiv(n,d,d*A346234(n/d));

Formula

a(n) = Sum_{d|n} d * A346234(n/d).
For all n >= 1, a(A000040(n)) = -A001223(n).
Multiplicative with a(p^e) = p^e - nextprime(p) * p^(e-1), where nextprime function is A151800. - Amiram Eldar, Nov 18 2021

A378607 Dirichlet convolution of sigma and the Dirichlet inverse of A003961 (A346234).

Original entry on oeis.org

1, 0, -1, -2, -1, 0, -3, -6, -7, 0, -1, 2, -3, 0, 1, -14, -1, 0, -3, 2, 3, 0, -5, 6, -11, 0, -25, 6, -1, 0, -5, -30, 1, 0, 3, 14, -3, 0, 3, 6, -1, 0, -3, 2, 7, 0, -5, 14, -31, 0, 1, 6, -5, 0, 1, 18, 3, 0, -1, -2, -5, 0, 21, -62, 3, 0, -3, 2, 5, 0, -1, 42, -5, 0, 11, 6, 3, 0, -3, 14, -79, 0, -5, -6, 1, 0, 1, 6, -7, 0, 9, 10
Offset: 1

Views

Author

Antti Karttunen, Dec 11 2024

Keywords

Crossrefs

Cf. A000203, A003961, A016825, A151800, A346234, A378606 (Dirichlet inverse).
Inverse Möbius transform of A349388.

Programs

  • Mathematica
    f[p_, e_] := (p^(e + 1) - NextPrime[p]*(p^e - 1) - 1)/(p - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 12 2025 *)
  • PARI
    A003961(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A346234(n) = (moebius(n)*A003961(n));
    A378607(n) = sumdiv(n,d,sigma(d)*A346234(n/d));

Formula

a(n) = Sum_{d|n} A000203(d)*A346234(n/d).
a(n) = Sum_{d|n} A349388(d).
Multiplicative with a(p^e) = (p^(e+1) - nextprime(p)*(p^e-1) - 1)/(p-1), where nextprime(p) = A151800(p). - Amiram Eldar, Jan 12 2025

A349632 Dirichlet convolution of A250469 with A346234, which is Dirichlet inverse of A003961.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, -12, 0, 6, 0, -18, 0, -24, 0, -24, 0, 24, 0, 0, 0, 24, -60, -36, 0, -48, 0, -42, 20, 42, 0, 12, 0, 42, 10, -12, 0, -72, 0, -60, -60, 48, 0, 24, 0, -42, 30, -72, 0, 84, 0, -12, 30, 78, 0, 120, 0, 72, -120, -90, 0, -180, 0, -96, 30, -132, 0, 48, 0, 96, -60, -108, 0, -174, 0, 12, -120
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2021

Keywords

Comments

Note that for n = 2..36, a(n) = -A349631(n).
Dirichlet convolution of this sequence with A003972 is A347376.

Crossrefs

Cf. A003961, A250469, A346234, A349631 (Dirichlet inverse).
Cf. also A003972, A347376, A349382.
Cf. also arrays A083221, A246278, A249821, A249822 and permutations A250245, A250246.

Programs

  • PARI
    up_to = 20000;
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    A250469(n) = if(1==n,n,my(spn = nextprime(1+A020639(n)), c = A078898(n), k = 0); while(c, k++; if((1==k)||(A020639(k)>=spn),c -= 1)); (k*spn));
    A346234(n) = (moebius(n)*A003961(n));
    A349632(n) = sumdiv(n,d,A250469(n/d)*A346234(d));

Formula

a(n) = Sum_{d|n} A250469(d) * A346234(n/d).

A153881 1 followed by -1, -1, -1, ... .

Original entry on oeis.org

1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Mats Granvik, Jan 03 2009

Keywords

Comments

Dirichlet inverse of A074206.

Crossrefs

If prefixed by initial 0, we get A134824.
Cf. A074206 (Dirichlet inverse).

Programs

Formula

G.f: x*(1-2*x)/(1-x). - Mats Granvik, Mar 09 2009, rewritten R. J. Mathar, Mar 31 2010
a(n) = (-1)^A000040(n). - Juri-Stepan Gerasimov, Sep 10 2009
G.f.: x / (1 + x / (1 - 2*x)). - Michael Somos, Apr 02 2012
From Wesley Ivan Hurt, Jun 20 2014: (Start)
a(1) = 1; a(n) = -1, n > 1.
a(n) = 1 - 2*sign(n-1) = 1 - 2*A057427(n-1).
a(n) = (-1)^sign(1-n) = (-1)^A057427(1-n).
a(n) = 2*floor(1/n)-1 = 2*A063524(n)-1. (End)
Dirichlet g.f.: 2 - zeta(s). - Álvar Ibeas, Dec 30 2018
a(n) = Sum_{d|n} A033879(d)*A055615(n/d) = Sum_{d|n} A344587(d)*A346234(n/d). - Antti Karttunen, Nov 22 2024

Extensions

Edited by Charles R Greathouse IV, Mar 18 2010
More terms from Antti Karttunen, Nov 22 2024

A349125 Dirichlet inverse of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, -1, -2, 0, -3, 2, -5, 0, 0, 3, -7, 0, -11, 5, 6, 0, -13, 0, -17, 0, 10, 7, -19, 0, 0, 11, 0, 0, -23, -6, -29, 0, 14, 13, 15, 0, -31, 17, 22, 0, -37, -10, -41, 0, 0, 19, -43, 0, 0, 0, 26, 0, -47, 0, 21, 0, 34, 23, -53, 0, -59, 29, 0, 0, 33, -14, -61, 0, 38, -15, -67, 0, -71, 31, 0, 0, 35, -22, -73, 0, 0, 37, -79
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, If[p == 2, -1, -NextPrime[p, -1]], 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
  • PARI
    A064989(n) = { my(f = factor(n)); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f); };
    A349125(n) = (moebius(n)*A064989(n));
    
  • PARI
    A349125(n) = { my(f = factor(n)); prod(i=1, #f~, if(1
    				
  • Python
    from sympy import prevprime, factorint, prod
    def f(p, e):
        return 0 if e > 1 else -1 if p == 2 else -prevprime(p)
    def a(n):
        return prod(f(p, e) for p, e in factorint(n).items()) # Sebastian Karlsson, Nov 13 2021

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A064989(n/d) * a(d).
a(n) = A349126(n) - A064989(n).
Multiplicative with a(p^e) = 0 if e > 1, -1 if p = 2 and -prevprime(p) otherwise. - Sebastian Karlsson, Nov 13 2021
a(n) = A008683(n) * A064989(n). [Because A064989 is fully multiplicative. See "Properties" section in the Wikipedia article]

A349385 Dirichlet convolution of A048673 with the Dirichlet inverse of A003961, where A003961 is fully multiplicative with a(p) = nextprime(p), and A048673(n) = (1+A003961(n))/2.

Original entry on oeis.org

1, -1, -2, -1, -3, 4, -5, -1, -2, 6, -6, 4, -8, 10, 12, -1, -9, 4, -11, 6, 20, 12, -14, 4, -3, 16, -2, 10, -15, -24, -18, -1, 24, 18, 30, 4, -20, 22, 32, 6, -21, -40, -23, 12, 12, 28, -26, 4, -5, 6, 36, 16, -29, 4, 36, 10, 44, 30, -30, -24, -33, 36, 20, -1, 48, -48, -35, 18, 56, -60, -36, 4, -39, 40, 12, 22, 60
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Convolving this with A003973 gives A336840.

Crossrefs

Cf. A003961, A048673, A346234, A349384 (Dirichlet inverse), A349386 (sum with it).
Cf. also A003973, A336840.

Programs

Formula

a(n) = Sum_{d|n} A048673(n/d) * A346234(d).
a(n) = A349386(n) - A349384(n).

A346479 Dirichlet inverse of A250469.

Original entry on oeis.org

1, -3, -5, 0, -7, 15, -11, 6, 0, 15, -13, 12, -17, 27, 35, 0, -19, 24, -23, 42, 55, 15, -29, -66, 0, 27, 60, 54, -31, -27, -37, -12, 45, 15, 77, -144, -41, 27, 75, -102, -43, -63, -47, 132, 60, 39, -53, -24, 0, 84, 65, 144, -59, -384, 91, -162, 85, 15, -61, -558, -67, 39, 120, 0, 119, 165, -71, 222, 115, 9, -73, 168
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2021

Keywords

Comments

Not all zeros occur on squares. For example, a(1445) = a(5 * 17^2) = 0.

Crossrefs

Cf. also A346234, A346477.

Programs

  • PARI
    up_to = 16384;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA250469(n)));
    A346479(n) = v346479[n];

Formula

a(1) = 1; and for n > 2, a(n) = -Sum_{d|n, dA250469(n/d).
a(n) = A346480(n) - A250469(n).

A378220 Dirichlet inverse of phi(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).

Original entry on oeis.org

1, -2, -4, -2, -6, 8, -10, -2, -4, 12, -12, 8, -16, 20, 24, -2, -18, 8, -22, 12, 40, 24, -28, 8, -6, 32, -4, 20, -30, -48, -36, -2, 48, 36, 60, 8, -40, 44, 64, 12, -42, -80, -46, 24, 24, 56, -52, 8, -10, 12, 72, 32, -58, 8, 72, 20, 88, 60, -60, -48, -66, 72, 40, -2, 96, -96, -70, 36, 112, -120, -72, 8, -78, 80, 24
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2024

Keywords

Crossrefs

Dirichlet inverse of A003972.
Inverse Möbius transform of A346234.
After the initial term, A349385 doubled.

Programs

  • Mathematica
    f[p_, e_] := 1 - NextPrime[p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 13 2025 *)
  • PARI
    A378220(n) = factorback(apply(p -> 1-nextprime(1+p), factor(n)[, 1]));
    
  • Python
    from math import prod
    from sympy import nextprime, primefactors
    def A378220(n): return prod(1-nextprime(p) for p in primefactors(n)) # Chai Wah Wu, Nov 23 2024

Formula

Multiplicative with a(p^e) = (1-q), where q = A151800(p), i.e., the least prime > p.
a(n) = A023900(A003961(n)).
For n > 1, a(n) = 2*A349385(n).
a(n) = Sum_{d|n} A346234(d).
a(n) = Sum_{d|n} A346246(d)*A378216(n/d).

A378221 Dirichlet inverse of sigma(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).

Original entry on oeis.org

1, -4, -6, 3, -8, 24, -12, 0, 5, 32, -14, -18, -18, 48, 48, 0, -20, -20, -24, -24, 72, 56, -30, 0, 7, 72, 0, -36, -32, -192, -38, 0, 84, 80, 96, 15, -42, 96, 108, 0, -44, -288, -48, -42, -40, 120, -54, 0, 11, -28, 120, -54, -60, 0, 112, 0, 144, 128, -62, 144, -68, 152, -60, 0, 144, -336, -72, -60, 180, -384, -74, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2024

Keywords

Crossrefs

Dirichlet inverse of A003973.

Programs

  • Mathematica
    f[p_, e_] := Which[e == 1, -NextPrime[p]-1, e == 2, NextPrime[p], e >= 3, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 12 2025 *)
  • PARI
    A378221(n) = { my(f=factor(n)~); prod(i=1, #f, if(1==f[2,i], -(nextprime(1+f[1,i])+1), if(2==f[2,i], nextprime(1+f[1,i]), 0))); };
    
  • Python
    from math import prod
    from sympy import nextprime, factorint
    def A378221(n): return 0 if any(map(lambda x:x>2,(f:=factorint(n)).values())) else prod(-nextprime(p)-1 if e&1 else nextprime(p) for p,e in f.items()) # Chai Wah Wu, Nov 23 2024

Formula

Multiplicative with a(p) = -q-1, a(p^2) = q, a(p^k) = 0 for k > 2, where q = A151800(p), the least prime > p.
a(n) = A046692(A003961(n)).
Showing 1-10 of 10 results.