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.

A349135 Sum of Kimberling's paraphrases (A003602) and its Dirichlet inverse.

Original entry on oeis.org

2, 0, 0, 1, 0, 4, 0, 1, 4, 6, 0, 2, 0, 8, 12, 1, 0, 6, 0, 3, 16, 12, 0, 2, 9, 14, 12, 4, 0, 4, 0, 1, 24, 18, 24, 5, 0, 20, 28, 3, 0, 6, 0, 6, 26, 24, 0, 2, 16, 17, 36, 7, 0, 16, 36, 4, 40, 30, 0, 8, 0, 32, 36, 1, 42, 10, 0, 9, 48, 12, 0, 5, 0, 38, 46, 10, 48, 12, 0, 3, 37, 42, 0, 11, 54, 44, 60, 6, 0, 20, 56, 12
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

Question: Are all terms nonnegative?
The answer to the above question is no, because A323894 (which is a prime-shifted version of this sequence) also contains negative values. For example, for n=72747675, 88062975, 130945815, 111035925 we get here a(n) = -14126242, -17546656, -14460312, -22677277. The indices are obtained by prime-shifting with A003961 the four indices mentioned in the Apr 20 2022 comment of A323894. - Antti Karttunen, Nov 30 2024

Crossrefs

Cf. A003602 (also quadrisection of this sequence), A349134, A323894 [= a(A003961(n))].
Cf. also A323882, A349126.

Programs

  • Mathematica
    k[n_] := (n/2^IntegerExponent[n, 2] + 1)/2; d[1] = 1; d[n_] := d[n] = -DivisorSum[n, d[#]*k[n/#] &, # < n &]; a[n_] := k[n] + d[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
  • 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(dA003602(n) = (1+(n>>valuation(n,2)))/2;
    v349134 = DirInverseCorrect(vector(up_to,n,A003602(n)));
    A349134(n) = v349134[n];
    A349135(n) = (A003602(n)+A349134(n));
    
  • PARI
    A349135(n) = if(1==n,2,-sumdiv(n, d, if(1==d||n==d,0,A003602(d)*A349134(n/d)))); \\ (Demonstrates the "cut convolution" formula) - Antti Karttunen, Nov 13 2021
    
  • PARI
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    memoA349134 = Map();
    A349134(n) = if(1==n,1,my(v); if(mapisdefined(memoA349134,n,&v), v, v = -sumdiv(n,d,if(dA003602(n/d)*A349134(d),0)); mapput(memoA349134,n,v); (v)));
    A349135(n) = (A003602(n)+A349134(n)); \\ Antti Karttunen, Nov 30 2024

Formula

a(n) = A003602(n) + A349134(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A003602(d) * A349134(n/d).
For all n >= 1, a(4*n) = A003602(n). - Antti Karttunen, Dec 07 2021

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]

A349349 Sum of A252463 and its Dirichlet inverse, where A252463 shifts the prime factorization of odd numbers one step towards smaller primes and divides even numbers by two.

Original entry on oeis.org

2, 0, 0, 1, 0, 4, 0, 3, 4, 6, 0, 8, 0, 10, 12, 7, 0, 8, 0, 13, 20, 14, 0, 15, 9, 22, 8, 19, 0, 14, 0, 15, 28, 26, 30, 19, 0, 34, 44, 25, 0, 18, 0, 29, 12, 38, 0, 28, 25, 21, 52, 37, 0, 24, 42, 35, 68, 46, 0, 28, 0, 58, 20, 31, 66, 30, 0, 47, 76, 32, 0, 38, 0, 62, 18, 55, 70, 30, 0, 47, 16, 74, 0, 36, 78, 82, 92, 55
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Comments

Question: Are there any negative terms? All terms in range 1 .. 2^23 are nonnegative. (See also A349126). - Antti Karttunen, Apr 20 2022

Crossrefs

Coincides with A349126 on odd numbers.

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(dA064989(n) = {my(f); 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)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    v349348 = DirInverseCorrect(vector(up_to,n,A252463(n)));
    A349348(n) = v349348[n];
    A349349(n) = (A252463(n)+A349348(n));

Formula

a(n) = A252463(n) + A349348(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A252463(d) * A349348(n/d).
For all n >= 1, a(2n-1) = A349126(2n-1).

A349359 Sum of A064216 and its Dirichlet inverse, where A064216 = A064989(2n-1), and A064989 is fully multiplicative with a(2) = 1 and a(p) = prevprime(p) for odd primes p.

Original entry on oeis.org

2, 0, 0, 4, 0, 12, 0, 12, 9, 16, 0, 22, 0, 44, 24, 5, 0, 40, 0, 60, 66, 40, 0, 14, 16, 36, 51, 10, 0, 106, 0, 82, 60, 56, 88, 26, 0, 124, 54, -10, 0, -46, 0, 144, 134, 48, 0, 235, 121, 140, 84, 86, 0, 19, 80, -108, 186, 136, 0, -44, 0, 236, 211, 29, 72, 158, 0, 216, 72, 62, 0, 152, 0, 284, 190, 10, 220, 98, 0, 260, 181
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Compare to A323894 which in contrast to this sequence seems to have only nonnegative terms.

Crossrefs

Programs

Formula

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