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 12 results. Next

A347088 a(n) = A055155(n) - d(n), where A055155(n) = Sum_{d|n} gcd(d, n/d) and d(n) gives the number of divisors of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 5, 0, 4, 0, 2, 0, 0, 0, 4, 4, 0, 4, 2, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 2, 4, 0, 0, 10, 6, 8, 0, 2, 0, 8, 0, 4, 0, 0, 0, 4, 0, 0, 4, 15, 0, 0, 0, 2, 0, 0, 0, 18, 0, 0, 8, 2, 0, 0, 0, 10, 12, 0, 0, 4, 0, 0, 0, 4, 0, 8, 0, 2, 0, 0, 0, 16, 0, 12, 4, 19, 0, 0, 0, 4, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2021

Keywords

Crossrefs

Cf. A000005, A005117 (positions of zeros), A055155, A347089.

Programs

  • PARI
    A055155(n) = sumdiv(n, d, gcd(d, n/d)); \\ From A055155
    A347088(n) = (A055155(n)-numdiv(n));
    
  • Python
    from sympy import gcd, divisors, divisor_count
    def A347088(n): return sum(gcd(d,n//d) for d in divisors(n,generator=True)) - divisor_count(n) # Chai Wah Wu, Aug 19 2021

Formula

a(n) = A055155(n) - A000005(n).

A347089 a(n) = gcd(A055155(n), d(n)), where A055155(n) = Sum_{d|n} gcd(d, n/d) and d(n) gives the number of divisors of n.

Original entry on oeis.org

1, 2, 2, 1, 2, 4, 2, 2, 1, 4, 2, 2, 2, 4, 4, 5, 2, 2, 2, 2, 4, 4, 2, 4, 1, 4, 4, 2, 2, 8, 2, 2, 4, 4, 4, 1, 2, 4, 4, 4, 2, 8, 2, 2, 2, 4, 2, 10, 3, 2, 4, 2, 2, 8, 4, 4, 4, 4, 2, 4, 2, 4, 2, 1, 4, 8, 2, 2, 4, 8, 2, 6, 2, 4, 2, 2, 4, 8, 2, 10, 1, 4, 2, 4, 4, 4, 4, 4, 2, 4, 4, 2, 4, 4, 4, 4, 2, 6, 2, 1, 2, 8, 2, 4, 8
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2021

Keywords

Crossrefs

Programs

  • PARI
    A055155(n) = sumdiv(n, d, gcd(d, n/d)); \\ From A055155
    A347089(n) = gcd(A055155(n),numdiv(n));
    
  • Python
    from sympy import gcd, divisors, divisor_count
    def A347089(n): return gcd(divisor_count(n),sum(gcd(d,n//d) for d in divisors(n,generator=True))) # Chai Wah Wu, Aug 19 2021

Formula

a(n) = gcd(A000005(n), A055155(n)).
a(n) = gcd(A000005(n), A347088(n)) = gcd(A055155(n), A347088(n)).

A294877 Lexicographically earliest such sequence a that a(i) = a(j) => A003557(i) = A003557(j) and A046523(i) = A046523(j), for all i, j.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 4, 2, 7, 2, 4, 4, 8, 2, 9, 2, 7, 4, 4, 2, 10, 11, 4, 12, 7, 2, 13, 2, 14, 4, 4, 4, 15, 2, 4, 4, 10, 2, 13, 2, 7, 9, 4, 2, 16, 17, 18, 4, 7, 2, 19, 4, 10, 4, 4, 2, 20, 2, 4, 9, 21, 4, 13, 2, 7, 4, 13, 2, 22, 2, 4, 18, 7, 4, 13, 2, 16, 23, 4, 2, 20, 4, 4, 4, 10, 2, 24, 4, 7, 4, 4, 4, 25, 2, 26, 9, 27, 2, 13, 2, 10, 13, 4, 2, 28, 2, 13
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Comments

Restricted growth sequence transform of A291757, which means that this is the lexicographically least sequence a, such that for all i, j: a(i) = a(j) <=> A291757(i) = A291757(j) <=> A003557(i) = A003557(j) and A046523(i) = A046523(j). That this is equal to the definition given in the title follows because any such lexicographically least sequence satisfying relation <=> is also the least sequence satisfying relation => with the same parameters.
Also the restricted growth sequence transform of A294876, Product_{d|n, d>1} prime(gcd(d,n/d)). (This was the original definition).
For all i, j:
A295300(i) = A295300(j) => a(i) = a(j),
A319347(i) = A319347(j) => a(i) = a(j),
a(i) = a(j) => A055155(i) = A055155(j).

Crossrefs

Cf. A000188, A055155, A294897, A295666, A322020 (a few of the matched sequences).

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A294876(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(gcd(d,n/d)))); m; };
    v294877 = rgs_transform(vector(up_to,n,A294876(n)));
    A294877(n) = v294877[n];
    
  • PARI
    A003557(n) = n/factorback(factor(n)[, 1]); \\ From A003557
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v294877 = rgs_transform(vector(up_to,n,[A003557(n),A046523(n)]));
    A294877(n) = v294877[n]; \\ Antti Karttunen, Nov 28 2018

Extensions

Name changed and comments added by Antti Karttunen, Nov 28 2018

A057670 a(n) = Sum_{k|n} lcm(k, n/k).

Original entry on oeis.org

1, 4, 6, 10, 10, 24, 14, 24, 21, 40, 22, 60, 26, 56, 60, 52, 34, 84, 38, 100, 84, 88, 46, 144, 55, 104, 72, 140, 58, 240, 62, 112, 132, 136, 140, 210, 74, 152, 156, 240, 82, 336, 86, 220, 210, 184, 94, 312, 105, 220, 204, 260, 106, 288, 220, 336, 228, 232, 118, 600
Offset: 1

Views

Author

Leroy Quet, Oct 18 2000

Keywords

Examples

			a(8) = lcm(1,8) + lcm(2,4) + lcm(4,2) + lcm(8,1) = 8 + 4 + 4 + 8 = 24.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, LCM[#, n/#] &], {n, 59}] (* Michael De Vlieger, Dec 11 2017 *)
    f[p_, e_] := (2*p^(e + 1) - p^Ceiling[(e + 1)/2] - p^Floor[(e + 1)/2])/(p - 1); f[p_, 1] := 2*p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    a(n) = sumdiv(n, d, lcm(d, n/d)); \\ Michel Marcus, May 19 2014

Formula

Multiplicative with a(p) = 2*p, a(p^k) = (2*p^(k+1) - p^ceiling((k+1)/2) - p^floor((k+1)/2)) / (p-1). a(n) is odd iff n is an odd square. - Henry Bottomley, May 16 2005
Multiplicative with a(p^e) = Sum_{k=0..e} p^max(k, e-k), (cf. A107661). - Mitch Harris, May 18 2005
Dirichlet g.f.: (zeta(s-1))^2*zeta(2s-1)/zeta(2s-2). - R. J. Mathar, Feb 11 2011
Sum_{k=1..n} a(k) ~ 3*zeta(3)*n^2 / (2*Pi^2) * (2*log(n) - 24*zeta'(2)/Pi^2 - 1 + 4*gamma + 4*zeta'(3)/zeta(3)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 01 2019

A294876 a(n) = Product_{d|n, d>1} prime(gcd(d,n/d)).

Original entry on oeis.org

1, 2, 2, 6, 2, 8, 2, 18, 10, 8, 2, 72, 2, 8, 8, 126, 2, 200, 2, 72, 8, 8, 2, 648, 22, 8, 50, 72, 2, 128, 2, 882, 8, 8, 8, 23400, 2, 8, 8, 648, 2, 128, 2, 72, 200, 8, 2, 31752, 34, 968, 8, 72, 2, 5000, 8, 648, 8, 8, 2, 10368, 2, 8, 200, 16758, 8, 128, 2, 72, 8, 128, 2, 2737800, 2, 8, 968, 72, 8, 128, 2, 31752, 1150, 8, 2, 10368, 8, 8, 8, 648, 2, 80000, 8, 72
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Crossrefs

Cf. A294877 (rgs-version of this filter).
Cf. also A293442, A293514, A293524.

Programs

  • Mathematica
    A294876[n_] := Product[Prime[GCD[d, n/d]], {d, Rest[Divisors[n]]}];
    Array[A294876, 100] (* Paolo Xausa, Feb 22 2024 *)
  • PARI
    A294876(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(gcd(d,n/d)))); m; };

Formula

a(n) = Product_{d|n, d>1} A000040(gcd(d,n/d)).
Other identities. For all n >= 1:
1+A007814(a(n)) = A034444(n).
1+A056239(a(n)) = A055155(n).
For n > 1, A061395(a(n)) = A000188(n).

A345266 a(n) = Sum_{p|n, p prime} gcd(p,n/p).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 2, 2, 1, 4, 1, 3, 2, 2, 1, 3, 5, 2, 3, 3, 1, 3, 1, 2, 2, 2, 2, 5, 1, 2, 2, 3, 1, 3, 1, 3, 4, 2, 1, 3, 7, 6, 2, 3, 1, 4, 2, 3, 2, 2, 1, 4, 1, 2, 4, 2, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 6, 3, 2, 3, 1, 3, 3, 2, 1, 4, 2, 2, 2, 3, 1, 5, 2, 3, 2, 2, 2, 3, 1, 8, 4, 7, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 13 2021

Keywords

Examples

			a(18) = Sum_{p|18} gcd(p,18/p) = gcd(2,9) + gcd(3,6) = 1 + 3 = 4.
		

Crossrefs

Cf. A001221 (omega), A007947 (rad), A008472 (sopf), A345302.

Programs

  • Mathematica
    Table[Sum[GCD[k, n/k] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = my(f=factor(n), p); sum(k=1, #f~, p=f[k, 1]; gcd(p,n/p)); \\ Michel Marcus, Jun 16 2021
    
  • PARI
    A345266(n) = vecsum(apply(p->gcd(p,n/p), factor(n)[,1])); \\ Antti Karttunen, Nov 13 2021

Formula

a(p) = 1 for p prime.
From Wesley Ivan Hurt, Nov 21 2021: (Start)
a(n) = A056169(n) + A063958(n).
If n is squarefree, then a(n) = omega(n).
a(p^k) = p for primes p and k >= 2. (End)

Extensions

Data section extended up to 105 terms by Antti Karttunen, Nov 13 2021

A068976 a(n) = Sum_{d | n} d/core(d) where core(x) is the smallest number such that x*core(x) is a square.

Original entry on oeis.org

1, 2, 2, 6, 2, 4, 2, 10, 11, 4, 2, 12, 2, 4, 4, 26, 2, 22, 2, 12, 4, 4, 2, 20, 27, 4, 20, 12, 2, 8, 2, 42, 4, 4, 4, 66, 2, 4, 4, 20, 2, 8, 2, 12, 22, 4, 2, 52, 51, 54, 4, 12, 2, 40, 4, 20, 4, 4, 2, 24, 2, 4, 22, 106, 4, 8, 2, 12, 4, 8, 2, 110, 2, 4, 54, 12, 4, 8, 2, 52, 101, 4, 2, 24, 4, 4, 4
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2002

Keywords

Comments

More generally, a(n,m) = Sum_{d divides n} gcd(d,n/d)^m is multiplicative with a(p^e,m) = (p^(m*e/2)*(p^m+1)-2)/(p^m-1) if e is even else 2*(p^(m*(e+1)/2)-1)/(p^m-1). - Vladeta Jovovic, May 30 2003

Crossrefs

Programs

  • Maple
    R:= proc(n) uses numtheory; local K,k;
      K:= select(k -> (n mod k^2 = 0), divisors(n));
      add(k^2*2^nops(factorset(n/k^2)),k=K);
    end proc:
    seq(R(n),n=1..100); # Robert Israel, Oct 18 2015
  • Mathematica
    a[n_]:=Total[GCD[#, n/#]^2 & /@ Divisors[n]]; Table[a[n], {n, 1, 87}] (* Jean-François Alcover, Jul 26 2011 *)
    f[p_, e_] := If[OddQ[e], 2*(p^(e+1)-1)/(p^2-1), (p^(e+2)+p^e-2)/(p^2-1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 03 2020 *)

Formula

a(n) = Sum_{d divides n} gcd(d, n/d)^2. Multiplicative with a(p^e) = (p^(e+2)+p^e-2)/(p^2-1) if e is even else 2*(p^(e+1)-1)/(p^2-1). - Vladeta Jovovic, May 30 2003
Dirichlet g.f.: zeta^2(s)*zeta(2s-2)/zeta(2s). Dirichlet convolution of A034444 and the sequence n*A010052(n). - R. J. Mathar, Apr 18 2011
Inverse Mobius transform of A008833. - R. J. Mathar, Oct 31 2011
a(n) = Sum_{d divides n} (-1)^A001222(d) * A000010(d) * A000203(n/d) = Sum_{k^2 divides n} k^2 * 2^A001221(n/k^2). - Robert Israel, Oct 18 2015
Sum_{k=1..n} a(k) ~ Zeta(3/2)^2 * n^(3/2) / (3*Zeta(3)) - (3*n*(log(n) - 1 + 2*gamma + 2*log(2*Pi) - 12*Zeta'(2)/Pi^2))/Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 05 2019
a(2^k) = (3/2)*2^k + (1/6)*(-2)^k - 2/3 = A061547(k+2). - Amiram Eldar, Sep 03 2020

A332619 a(n) = Sum_{d|n} lcm(d, n/d) / d.

Original entry on oeis.org

1, 3, 4, 6, 6, 12, 8, 12, 11, 18, 12, 24, 14, 24, 24, 23, 18, 33, 20, 36, 32, 36, 24, 48, 27, 42, 32, 48, 30, 72, 32, 45, 48, 54, 48, 66, 38, 60, 56, 72, 42, 96, 44, 72, 66, 72, 48, 92, 51, 81, 72, 84, 54, 96, 72, 96, 80, 90, 60, 144, 62, 96, 88, 88, 84, 144, 68, 108, 96, 144
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(d/igcd(d, n/d), d=numtheory[divisors](n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 17 2020
  • Mathematica
    Table[Sum[LCM[d, n/d]/d, {d, Divisors[n]}], {n, 1, 70}]
    f[p_, e_] := If[EvenQ[e], (p^(e + 2) - 1)/(p^2 - 1) + e/2, (p^(e + 2) - p)/(p^2 - 1) + (e + 1)/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 05 2022 *)
  • PARI
    A332619(n) = sumdiv(n,d,lcm(d,n/d)/d); \\ Antti Karttunen, Nov 12 2021

Formula

a(n) = Sum_{d|n} d / gcd(d, n/d).
From Amiram Eldar, Dec 05 2022: (Start)
Multiplicative with a(p^e) = (p^(e+2)-1)/(p^2-1) + e/2 if e is even, and (p^(e+2)-p)/(p^2-1) + (e + 1)/2 if e is odd.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 7*zeta(6)/(8*zeta(5)) = 0.740543... . (End)

A337180 a(n) = Sum_{d|n} d * gcd(d,n/d).

Original entry on oeis.org

1, 3, 4, 9, 6, 12, 8, 21, 19, 18, 12, 36, 14, 24, 24, 53, 18, 57, 20, 54, 32, 36, 24, 84, 51, 42, 64, 72, 30, 72, 32, 117, 48, 54, 48, 171, 38, 60, 56, 126, 42, 96, 44, 108, 114, 72, 48, 212, 99, 153, 72, 126, 54, 192, 72, 168, 80, 90, 60, 216, 62, 96, 152, 277, 84, 144
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 28 2021

Keywords

Comments

If p is prime, a(n) = Sum_{d|p} d * gcd(d,p/d) = 1*1 + p*1 = p + 1. - Wesley Ivan Hurt, May 21 2021

Crossrefs

Programs

  • Mathematica
    Table[Sum[k*GCD[k, n/k] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
    (* Second program: *)
    Table[DivisorSum[n, # GCD[#, n/#] &], {n, 100}] (* Michael De Vlieger, Nov 11 2021 *)
  • PARI
    a(n) = sumdiv(n, d, d*gcd(d, n/d)); \\ Michel Marcus, Jan 29 2021

Formula

Multiplicative with a(p^e) = (p^(2*floor(e/2)+2)-1)/(p^2-1) + p^e*ceiling(e/2). - Sebastian Karlsson, Nov 11 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = (5*zeta(4))/(4*zeta(3)) = 1.1254908... . - Amiram Eldar, Nov 18 2022

A332618 a(n) = Sum_{d|n} lcm(d, n/d) / gcd(d, n/d).

Original entry on oeis.org

1, 4, 6, 9, 10, 24, 14, 20, 19, 40, 22, 54, 26, 56, 60, 41, 34, 76, 38, 90, 84, 88, 46, 120, 51, 104, 60, 126, 58, 240, 62, 84, 132, 136, 140, 171, 74, 152, 156, 200, 82, 336, 86, 198, 190, 184, 94, 246, 99, 204, 204, 234, 106, 240, 220, 280, 228, 232, 118, 540
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n*add(1/igcd(d, n/d)^2, d=numtheory[divisors](n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 17 2020
  • Mathematica
    Table[Sum[LCM[d, n/d]/GCD[d, n/d], {d, Divisors[n]}], {n, 1, 60}]
    f[p_, e_] := If[EvenQ[e], (2*p^(e+2) - p^2 - 1)/(p^2 - 1), 2*(p^(e+2) - p)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 05 2022 *)
  • PARI
    A332618(n) = sumdiv(n,d,lcm(d,n/d)/gcd(d,n/d)); \\ Antti Karttunen, Nov 12 2021

Formula

a(n) = n * Sum_{d|n} 1 / gcd(d, n/d)^2.
Multiplicative with a(p^e) = (2*p^(e+2) - p^2 - 1)/(p^2 - 1) if e is even, a(p^e) = 2*(p^(e+2) - p)/(p^2 - 1) if e is odd. - Sebastian Karlsson, May 07 2022
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} A007913(d)*n/d.
Dirichlet g.f.: zeta(2*s)*zeta(s-1)^2/zeta(2*s-2). (End)
Showing 1-10 of 12 results. Next