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.

Previous Showing 41-50 of 55 results. Next

A318306 Additive with a(p^e) = A002487(e).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 2, 2, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2018

Keywords

Crossrefs

Cf. also A046644.

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318306(n) = vecsum(apply(e -> A002487(e),factor(n)[,2]));
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A318306(n): return sum(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(e)[-1:2:-1],(1,0))) for e in factorint(n).values()) # Chai Wah Wu, May 18 2023

Formula

a(n) = A007814(A318307(n)).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 0.15790080909728804399..., where f(x) = -x + x * (1-x) * Product{k>=0} (1 + x^(2^k) + x^(2^(k + 1))). - Amiram Eldar, Feb 11 2024

A318498 Denominators of the sequence whose Dirichlet convolution with itself yields A061389, number of (1+phi)-divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 8, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 8, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 16, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 8, 8, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 8, 1, 2, 2, 4, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2018

Keywords

Comments

The sequence seems to give the denominators of a few other similarly constructed rational valued sequences obtained as "Dirichlet Square Roots" (of possibly A092520 and A293443).

Crossrefs

Cf. A061389, A318497 (numerators), A318499.
Cf. also A299150, A046644.

Programs

  • PARI
    up_to = 65537;
    A061389(n) = factorback(apply(e -> (1+eulerphi(e)),factor(n)[,2]));
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v318497_98 = DirSqrt(vector(up_to, n, A061389(n)));
    A318497(n) = numerator(v318497_98[n]);
    A318498(n) = denominator(v318497_98[n]);

Formula

a(n) = denominator of f(n), where f(1) = 1, f(n) = (1/2) * (A061389(n) - Sum_{d|n, d>1, d 1.
a(n) = 2^A318499(n).

A318657 Numerators of the sequence whose Dirichlet convolution with itself yields A087003, a(2n) = 0 and a(2n+1) = moebius(2n+1).

Original entry on oeis.org

1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -5, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1
Offset: 1

Views

Author

Antti Karttunen, Aug 31 2018

Keywords

Comments

Because the corresponding denominator sequence A318658 is equal to A046644 on all odd n, and this sequence as well as A087003 is zero on all even n, it means that also the Dirichlet convolution of a(n)/A046644(n) with itself will yield A087003. Because both A046644 and A087003 are multiplicative, this sequence is also. - Antti Karttunen, Sep 01 2018

Crossrefs

Cf. A046644 or A318658 (denominators).
Cf. also A087003, A257098, A318659.

Programs

  • PARI
    up_to = 65537;
    A087003(n) = ((n%2)*moebius(n)); \\ I.e. a(n) = A000035(n)*A008683(n).
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA087003(n)));
    A318657(n) = numerator(v318657_18[n]);

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A087003(n) - Sum_{d|n, d>1, d 1.
a(2n) = 0, a(2n-1) = A257098(2n-1), thus multiplicative with a(2^e) = 0, a(p^e) = A257098(p^e) for odd primes p. - Antti Karttunen, Sep 01 2018

A340141 Numerators of the sequence whose Dirichlet convolution with itself yields sequence A160595(x) = phi(x)/gcd(phi(x), x-1).

Original entry on oeis.org

1, 1, 1, 7, 1, 3, 1, 25, 11, 7, 1, 19, 1, 11, 7, 363, 1, 31, 1, 43, 5, 19, 1, 63, 19, 23, 61, 3, 1, 15, 1, 1335, 9, 31, 23, 189, 1, 35, 23, 139, 1, 29, 1, 115, 23, 43, 1, 867, 27, 127, 31, 11, 1, 163, 39, 279, 17, 55, 1, 73, 1, 59, 123, 9923, 5, -15, 1, 187, 21, -9, 1, 615, 1, 71, 127, 19, 29, 47, 1, 1875, 1363, 79, 1, 203, 31
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2020

Keywords

Crossrefs

Cf. A046644 (denominators).
Cf. A160595.
Cf. also A340142, A340143.

Programs

  • PARI
    up_to = 65537;
    A160595(n) = { my(x=eulerphi(n)); x/gcd(x,n-1); };
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA160595(n)));
    A340141(n) = numerator(v340141rat[n]);

A317847 Numerators of sequence whose Dirichlet convolution with itself yields A303757, the ordinal transform of function a(1) = 0; a(n) = phi(n) for n > 1, where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 1, 1, 7, 1, 5, 1, 9, 7, 5, 1, 15, 1, 5, 1, 43, 1, 15, 1, 7, 3, 3, 1, 5, 3, 5, 9, 15, 1, 9, 1, 87, 3, 5, 1, 1, 1, 5, 3, 13, 1, 11, 1, 11, 15, 3, 1, 187, 7, 19, 1, 15, 1, 5, 3, 21, 3, 3, 1, -1, 1, 3, 11, 387, 1, 9, 1, 7, 1, 13, 1, 119, 1, 7, 19, 23, 3, 19, 1, 139, -21, 7, 1, 21, 1, 5, 1, 39, 1, 67, 3, 3, 5, 3, 5, 451, 1, 15, 19, 69, 1, 13, 1, -27, 7
Offset: 1

Views

Author

Antti Karttunen, Aug 14 2018

Keywords

Crossrefs

Cf. A000010, A303757, A046644 (denominators).

Programs

  • Mathematica
    A303757[n_] := If[n == 2, 1, Count[EulerPhi[Range[n]] - EulerPhi[n], 0]];
    f[n_] := f[n] = If[n == 1, 1, (1/2)(A303757[n] -
         Sum[If[1Jean-François Alcover, Dec 20 2021 *)
  • PARI
    up_to = 65537;
    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; };
    DirSqrt(v)={my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v303757 = ordinal_transform(vector(up_to,n,if(1==n,0,eulerphi(n))));
    v317847 = DirSqrt(vector(up_to, n, v303757[n]));
    A317847(n) = numerator(v317847[n]);

Formula

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

A317848 Multiplicative with a(p^e) = binomial(2*e, e).

Original entry on oeis.org

1, 2, 2, 6, 2, 4, 2, 20, 6, 4, 2, 12, 2, 4, 4, 70, 2, 12, 2, 12, 4, 4, 2, 40, 6, 4, 20, 12, 2, 8, 2, 252, 4, 4, 4, 36, 2, 4, 4, 40, 2, 8, 2, 12, 12, 4, 2, 140, 6, 12, 4, 12, 2, 40, 4, 40, 4, 4, 2, 24, 2, 4, 12, 924, 4, 8, 2, 12, 4, 8, 2, 120, 2, 4, 12, 12, 4, 8, 2, 140
Offset: 1

Views

Author

Andrew Howroyd, Aug 08 2018

Keywords

Comments

The Dirichlet convolution square of this sequence is A165825.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := Binomial[2*e, e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 30 2023 *)
  • PARI
    a(n)={my(v=factor(n)[,2]); prod(i=1, #v, binomial(2*v[i], v[i]))}
    
  • PARI
    \\ DirSqrt(v) finds u such that v = v[1]*dirmul(u, u).
    DirSqrt(v)={my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&d
    				
  • PARI
    A317848(n) = factorback(apply(e -> binomial(e+e,e),factor(n)[,2])); \\ Antti Karttunen, Sep 17 2018

Formula

A037445(n) = A006519(a(n)).
A046643(n) = numerator(a(n)/A165825(n)) = A000265(a(n)).
A046644(n) = denominator(a(n)/A165825(n)) = A165825(n)/A037445(n).
A299149(n) = numerator(n*a(n)/A165825(n)) = A000265(n*a(n)).
A299150(n) = denominator(n*a(n)/A165825(n)) = A165825(n)/(A037445(n) * A006519(n)).

A318443 Numerators of the sequence whose Dirichlet convolution with itself yields A018804, Pillai's arithmetical function: Sum_{k=1..n} gcd(k, n).

Original entry on oeis.org

1, 3, 5, 23, 9, 15, 13, 91, 59, 27, 21, 115, 25, 39, 45, 1451, 33, 177, 37, 207, 65, 63, 45, 455, 179, 75, 353, 299, 57, 135, 61, 5797, 105, 99, 117, 1357, 73, 111, 125, 819, 81, 195, 85, 483, 531, 135, 93, 7255, 363, 537, 165, 575, 105, 1059, 189, 1183, 185, 171, 117, 1035, 121, 183, 767, 46355, 225, 315, 133, 759, 225, 351, 141, 5369
Offset: 1

Views

Author

Antti Karttunen and Andrew Howroyd, Aug 29 2018

Keywords

Comments

Because A018804 gets only odd values on primes, A046644 gives the sequence of denominators. Because both of those sequences are multiplicative, this is also.

Crossrefs

Cf. A018804, A046644 (denominators).
Cf. also A318444.

Programs

  • Mathematica
    a18804[n_] := Sum[n EulerPhi[d]/d, {d, Divisors[n]}];
    f[1] = 1; f[n_] := f[n] = 1/2 (a18804[n] - Sum[f[d] f[n/d], {d, Divisors[ n][[2 ;; -2]]}]);
    a[n_] := f[n] // Numerator;
    Array[a, 72] (* Jean-François Alcover, Sep 13 2018 *)
  • PARI
    up_to = 16384;
    A018804(n) = sumdiv(n, d, n*eulerphi(d)/d); \\ From A018804
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v318443aux = DirSqrt(vector(up_to, n, A018804(n)));
    A318443(n) = numerator(v318443aux[n]);
    
  • PARI
    for(n=1, 100, print1(numerator(direuler(p=2, n, (1-X)^(1/2)/(1-p*X))[n]), ", ")) \\ Vaclav Kotesovec, May 09 2025

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A018804(n) - Sum_{d|n, d>1, d 1.
Sum_{k=1..n} A318443(k) / A046644(k) ~ sqrt(3/2)*n^2/Pi. - Vaclav Kotesovec, May 10 2025

A318656 The 2-adic valuation of ratio A318649(n)/A318512(n); a(n) = 2*A007814(n) - A046645(n).

Original entry on oeis.org

0, 1, -1, 1, -1, 0, -1, 2, -3, 0, -1, 0, -1, 0, -2, 1, -1, -2, -1, 0, -2, 0, -1, 1, -3, 0, -4, 0, -1, -1, -1, 2, -2, 0, -2, -2, -1, 0, -2, 1, -1, -1, -1, 0, -4, 0, -1, 0, -3, -2, -2, 0, -1, -3, -2, 1, -2, 0, -1, -1, -1, 0, -4, 2, -2, -1, -1, 0, -2, -1, -1, -1, -1, 0, -4, 0, -2, -1, -1, 0, -7, 0, -1, -1, -2, 0, -2, 1, -1, -3, -2, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 02 2018

Keywords

Comments

Also the 2-adic valuation of ratio A318681(n)/A299150(n) [which is equal to A318649(n)/A318512(n), but not represented in lowest terms], as well as the 2-adic valuation of A318680(n)/A299150(n) = A318511(n)/A318512(n).

Crossrefs

Cf. A318654 (positions of positive terms).

Programs

Formula

a(n) = A318655(n) - A318513(n).
a(n) = A007814(n) - A318440(n).
a(n) = 2*A007814(n) - A046645(n) = A007814(n^2) - A046645(n).

A340144 Numerators of the sequence whose Dirichlet convolution with itself yields sequence A247074(x) = phi(x)/(Product_{primes p dividing x} gcd(p-1, x-1)).

Original entry on oeis.org

1, 1, 1, 7, 1, 3, 1, 25, 11, 7, 1, 19, 1, 11, 3, 363, 1, 31, 1, 43, 5, 19, 1, 63, 19, 23, 61, 3, 1, 19, 1, 1335, 9, 31, 11, 189, 1, 35, 11, 139, 1, 29, 1, 115, 7, 43, 1, 867, 27, 127, 15, 11, 1, 163, 19, 279, 17, 55, 1, 93, 1, 59, 51, 9923, 5, -15, 1, 187, 21, 3, 1, 615, 1, 71, 55, 19, 29, 59, 1, 1875, 1363, 79, 1, 203
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2020

Keywords

Examples

			For n = 561 = 3*11*17, its divisors d are: 1, 3, 11, 17, 33, 51, 187, 561.
For this sequence, the corresponding terms a(d) are: 1, 1, 1, 1, 9, 15, 79, -99.
For A046644, the corresponding terms are:            1, 2, 2, 2, 4,  4,  4,   8.
Convolving these ratios as Sum_{d|561} r(d)*r(n/d) = 2*((1/1)*(-99/8) + (1/2)*(79/4) + (1/2)*(15/4) + (1/2)*(9/4)) yields 1 as expected, because 561 is Carmichael number (A002997) and A247074 obtains value 1 on all of them.
		

Crossrefs

Cf. A046644 (denominators).
Cf. A247074.
Cf. also A340141, A340145, A340146.

Programs

  • PARI
    up_to = 65537;
    A247074(n) = { my(f=factor(n)); eulerphi(f)/prod(i=1, #f~, gcd(f[i, 1]-1, n-1)); }; \\ From A247074
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA247074(n)));
    A340144(n) = numerator(v340144rat[n]);

A383657 Numerator of Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = zeta(s)^(3/2).

Original entry on oeis.org

1, 3, 3, 15, 3, 9, 3, 35, 15, 9, 3, 45, 3, 9, 9, 315, 3, 45, 3, 45, 9, 9, 3, 105, 15, 9, 35, 45, 3, 27, 3, 693, 9, 9, 9, 225, 3, 9, 9, 105, 3, 27, 3, 45, 45, 9, 3, 945, 15, 45, 9, 45, 3, 105, 9, 105, 9, 9, 3, 135, 3, 9, 45, 3003, 9, 27, 3, 45, 9, 27, 3, 525, 3
Offset: 1

Views

Author

Vaclav Kotesovec, May 04 2025

Keywords

Comments

In general, for m > 0, if Dirichlet g.f. is zeta(s)^m, then Sum_{j=1..n} a(j) ~ n*log(n)^(m-1)/Gamma(m) * (1 + (m-1)*(m*gamma - 1)/log(n)), where gamma is the Euler-Mascheroni constant A001620 and Gamma() is the gamma function.

Crossrefs

Programs

  • Mathematica
    coeff=CoefficientList[Series[1/(1-x)^(3/2),{x,0,20}]//Normal,x];dptTerm[n_]:=Module[{flist=FactorInteger[n]},If[n==1,coeff[[1]],Numerator[Times@@(coeff[[flist[[All,2]]+1]])]]];Array[dptTerm,73] (* Shenghui Yang, May 04 2025 *)
  • PARI
    for(n=1, 100, print1(numerator(direuler(p=2, n, 1/(1-X)^(3/2))[n]), ", "))

Formula

Sum_{k=1..n} A383657(k)/A383658(k) ~ 2*n*sqrt(log(n)/Pi) * (1 - (1 - 3*gamma/2)/(2*log(n))), where gamma is the Euler-Mascheroni constant A001620.
Previous Showing 41-50 of 55 results. Next