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 21-30 of 44 results. Next

A092089 Number of odd-length palindromes among the k-tuples of partial quotients of the continued fraction expansions of n/r, r = 1, ..., n.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 3, 8, 5, 6, 3, 12, 3, 6, 9, 12, 3, 10, 3, 12, 9, 6, 3, 24, 5, 6, 7, 12, 3, 18, 3, 16, 9, 6, 9, 20, 3, 6, 9, 24, 3, 18, 3, 12, 15, 6, 3, 36, 5, 10, 9, 12, 3, 14, 9, 24, 9, 6, 3, 36, 3, 6, 15, 20, 9, 18, 3, 12, 9, 18, 3, 40, 3, 6, 15, 12, 9, 18, 3, 36, 9, 6, 3, 36, 9, 6, 9, 24, 3
Offset: 1

Views

Author

John W. Layman, Mar 29 2004

Keywords

Comments

Suggested by R. K. Guy, Mar 26 2004
From Jianing Song, Mar 24 2019: (Start)
a(n) is also the number of inequivalent residue classes modulo n where the equivalence relation is defined as [a] ~ [b] (mod n) if and only if there exists some k such that gcd(k, n) = 1 and that a*k^2 == b (mod n). For example, for n = 16, the inequivalent residue classes are {[0], [1], [2], [3], [4], [5], [6], [7], [8], [10], [12], [14]}, so a(16) = 14.
Proof: let S(n) be the set of inequivalent residue classes modulo n, so our goal is to show that |S(n)| = a(n) for all n. By the Chinese Remainder Theorem, if gcd(s, t) = 1, then [a] ~ [b] (mod s*t) if and only if [a] ~ [b] (mod s) and [a] ~ [b] (mod t), so there is a one-to-one correspondence between S(s*t) and S(s) X S(t), that is, |S(n)| is multiplicative. It is obvious that |S(p^e)| = a(p^e), so |S(n)| = a(n) for all n. (End)

Examples

			[1, 2, 1, 2, 1] <-> 1+1/(2+1/(1+1/(2+1/1))) = 15/11 is one of the nine palindromes {[15], [5], [3, 1, 3], [3], [1, 1, 1], [1, 2, 1, 2, 1], [1, 3, 1], [1, 13, 1], [1]} among the continued fraction expansions of 15/r for r = 1..15. Thus a(15)=9.
		

Crossrefs

Programs

  • Mathematica
    Table[Apply[Times, FactorInteger[n] /. {p_, e_} /; p > 0 :> Which[p == 1, 1, OddQ@ p, 2 e + 1, And[p == 2, e == 1], 2, True, 4 (e - 1)]], {n, 89}] (* Michael De Vlieger, Sep 11 2017 *)
  • PARI
    a(n) = if (n % 2, numdiv(n^2), if (n/2 % 2, 2*numdiv((n/2)^2), val = valuation(n, 2); 4*(val-1)*numdiv((n/2^val)^2))); \\ Michel Marcus, Jun 26 2014
    
  • Scheme
    (define (A092089 n) (cond ((= 1 n) n) ((zero? (modulo n 4)) (* 4 (+ -1 (A067029 n)) (A092089 (A000265 n)))) ((even? n) (* 2 (A092089 (/ n 2)))) (else (* (+ 1 (* 2 (A067029 n))) (A092089 (A028234 n)))))) ;; Antti Karttunen, Sep 11 2017

Formula

Conjecture: Let n = (2^k0)*(p1^k1)*(p2^k2)*...*(pm^km) be the prime factorization of n where p1, p2, ..., pm are distinct primes. Then a(n) is multiplicative and is given by a(n) = f(k0)*g(k1)*g(k2)*...*g(km), where f(0) = 1, f(1) = 2, f(k) = 4(k-1) if k>1 and g(k) = 2k+1 (This has been verified for n = 1-10000.) [Corrected by Jianing Song, Mar 24 2019]
Multiplicative with a(p^e) = 2e+1 if p is odd; a(2) = 2, a(2^e)= 4*(e-1), if e > 1. - Michel Marcus, Jun 26 2014
Dirichlet g.f.: zeta(s)^3/zeta(2*s) * (1 - 1/2^s + 1/2^(2*s-1)). - Jianing Song, Mar 25 2019 [corrected by Amiram Eldar, Dec 18 2023]
Sum_{k=1..n} a(k) ~ (3/Pi^2) * n * (log(n^2) + c_1 * log(n) + c_2), where c_1 = 6 * gamma - 2 - log(2) - 4*zeta'(2)/zeta(2) = 3.04999078122..., gamma is Euler's constant (A001620), c_2 = 2 - 6 * gamma + 6 * gamma^2 + log(2) - 3 * gamma * log(2) + 3*log(2)^2/2 - 6 *gamma_1 + 4*zeta'(2)/zeta(2) + (2 * log(2) - 12 * gamma) * zeta'(2)/zeta(2) + 8 * (zeta'(2)/zeta(2))^2 - 4 * zeta''(2)/zeta(2) = -0.1743888255..., and gamma_1 is the 1st Stieltjes constant (A082633). - Amiram Eldar, Dec 18 2023

A293227 a(n) is the number of proper divisors of n that are squarefree.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 08 2017

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n, dA008966(d).
a(n) = A034444(n) - A008966(n).
a(n) = 2^A001221(n) - A008683(n)^2 = 2^omega(n) - mu(n)^2.
G.f.: Sum_{k>=1} mu(k)^2*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Oct 28 2018
Sum_{k=1..n} a(k) ~ (6/Pi^2)*n*(log(n) + 2*(gamma - 1 - zeta'(2)/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 01 2023

A354417 a(n) is the numerator of the sum of the reciprocals of the first n squarefree numbers.

Original entry on oeis.org

1, 3, 11, 61, 11, 82, 171, 1951, 26133, 13424, 41273, 716656, 13871719, 4700888, 9548741, 222854273, 112857219, 3310041496, 20075905417, 628822761157, 19239404599, 9709078632, 1959180271, 73097429088, 147378388979, 445594718515, 18404305970657, 3089336006908, 133763418792581
Offset: 1

Views

Author

Ilya Gutkovskiy, May 26 2022

Keywords

Examples

			1, 3/2, 11/6, 61/30, 11/5, 82/35, 171/70, 1951/770, 26133/10010, 13424/5005, 41273/15015, ...
		

Crossrefs

Programs

  • Maple
    s:= 0: R:= NULL: count:= 0:
    for x from 1 while count < 40 do
      if numtheory:-issqrfree(x) then
        s:= s + 1/x;
        v:= numer(s);
        R:= R, v;
        count:= count+1;
      fi;
    od:
    R; # Robert Israel, Mar 05 2023
  • Mathematica
    Accumulate[1/Select[Range[43], SquareFreeQ]] // Numerator
  • PARI
    a(n) = my(i=0, s=0); for(x=1, oo, if(core(x)==x, s+=1/x; i++; if(i==n, return(numerator(s))))) \\ Felix Fröhlich, May 26 2022

Formula

a(n)/A354418(n) ~ (6/Pi^2) * (log(n) + c) + O*(1.044/sqrt(n)), where f = O*(g) means |f| <= g and c = gamma + 2 * Sum_{p prime} log(p)/(p^2-1) = A001620 + 2 * A306016 = 1.71713765109059847340... (Ramaré, 2019; Alterman, 2022). - Amiram Eldar, Oct 29 2022

A373059 a(n) = Sum_{1 <= x_1, x_2 <= n} gcd(x_1, n)/gcd(x_1, x_2, n).

Original entry on oeis.org

1, 5, 13, 25, 41, 65, 85, 121, 157, 205, 221, 325, 313, 425, 533, 569, 545, 785, 685, 1025, 1105, 1105, 1013, 1573, 1441, 1565, 1777, 2125, 1625, 2665, 1861, 2617, 2873, 2725, 3485, 3925, 2665, 3425, 4069, 4961, 3281, 5525, 3613, 5525, 6437, 5065, 4325, 7397, 5965
Offset: 1

Views

Author

Seiichi Manyama, May 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p^(2*e)*((e+1)*p^2 + 2*p-e) + 1)/(p+1)^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 27 2024 *)
  • PARI
    a(n) = sum(i=1, n, sum(j=1, n, gcd(i, n)/gcd([i, j, n])));
    
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; (p^(2*e)*((e+1)*p^2 + 2*p-e) + 1)/(p+1)^2);} \\ Amiram Eldar, May 27 2024

Formula

a(n) = Sum_{d|n} phi(n/d) * (n/d) * sigma_2(d^2)/sigma(d^2).
From Amiram Eldar, May 27 2024: (Start)
Multiplicative with a(p^e) = (p^(2*e)*((e+1)*p^2 + 2*p-e) + 1)/(p+1)^2.
Dirichlet g.f.: zeta(s) * zeta(s-2)^2 / zeta(s-1)^2.
Sum_{k=1..n} a(k) ~ (2*zeta(3)*n^3/(15*zeta(4))) * (log(n) + 2*gamma - 1/3 - 2*zeta'(2)/zeta(2) + zeta'(3)/zeta(3)), where gamma is Euler's constant (A001620). (End)

A234307 a(n) = Sum_{i=1..n} gcd(2*n-i, i).

Original entry on oeis.org

1, 3, 6, 8, 11, 17, 16, 20, 27, 31, 26, 44, 31, 45, 60, 48, 41, 75, 46, 80, 87, 73, 56, 108, 85, 87, 108, 116, 71, 165, 76, 112, 141, 115, 158, 192, 91, 129, 168, 196, 101, 239, 106, 188, 261, 157, 116, 256, 175, 235, 222, 224, 131, 297, 256, 284, 249, 199
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 22 2013

Keywords

Comments

Sum of the GCD's of the smallest and largest parts in the partitions of 2n into exactly two parts.

Examples

			a(6) = 17; the partitions of 2(6) = 12 into two parts are: (11,1),(10,2),(9,3),(8,4),(7,5),(6,6). Then a(6) = gcd(11,1) + gcd(10,2) + gcd(9,3) + gcd(8,4) + gcd(7,5) + gcd(6,6) = 1 + 2 + 3 + 4 + 1 + 6 = 17.
		

Crossrefs

Cf. A001105 (sum of parts), A002378 (differences of parts).

Programs

  • Maple
    A234307:=n->add( gcd(2*n-i, i), i=1..n); seq(A234307(n), n=1..100);
  • Mathematica
    Table[Sum[GCD[2n - i, i], {i, n}], {n, 100}]
    f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := (Times @@ f @@@ FactorInteger[2*n] - n)/2; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    a(n) = sum(i=1, n, gcd(i, 2*n-i)); \\ Michel Marcus, Dec 23 2013
    
  • PARI
    a(n) = {my(f = factor(2*n)); (prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(e-1)*(p+e*(p-1))) - n)/2;} \\ Amiram Eldar, Mar 30 2024

Formula

a(n) = Sum_{i=1..n} gcd(2*n-i, i).
a(n) = (A018804(2*n)-n)/2. - Sebastian Karlsson, Oct 03 2021
Conjecture: a(n) = (1/4)*Sum_{k = 1..4*n} (-1)^k *gcd(k, 8*n). - Peter Bala, Jan 01 2024
Sum_{k=1..n} a(k) ~ (Pi^2/4)*n^2 * (log(n) + 2*gamma - 1/2 + log(2)/6 - Pi^2/16 - zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Mar 30 2024

A360162 a(n) is the sum of the square roots of the unitary divisors of n that are squares.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 1, 3, 1, 1, 1, 5, 1, 4, 1, 3, 1, 1, 1, 1, 6, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 5, 8, 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 9, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 6, 3, 1, 1, 1, 5, 10, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Jan 29 2023

Keywords

Comments

The number of unitary divisors of n that are squares is A056624(n) and their sum is A358347(n).
The unitary analog of A069290.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], 1, p^(e/2) + 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2]%2, 1, f[i, 1]^(f[i, 2]/2) + 1)); }

Formula

a(n) = Sum_{d|n, gcd(d, n/d)=1, d square} sqrt(d).
Multiplicative with a(p^e) = p^(e/2) + 1 if e is even, and 1 if e is odd.
Dirichlet g.f.: zeta(s)*zeta(2*s-1)/zeta(3*s-1).
Sum_{k=1..n} a(k) ~ (3*n/Pi^2)*(log(n) + 3*gamma - 1 - 3*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620).

A373318 Numerator of the asymptotic density of numbers that are unitarily divided by n.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 3, 8, 1, 16, 1, 18, 1, 4, 5, 22, 1, 4, 3, 2, 3, 28, 2, 30, 1, 20, 4, 24, 1, 36, 9, 8, 1, 40, 1, 42, 5, 8, 11, 46, 1, 6, 1, 32, 3, 52, 1, 8, 3, 4, 7, 58, 1, 60, 15, 4, 1, 48, 5, 66, 2, 44, 6, 70, 1, 72, 9, 8, 9, 60, 2, 78
Offset: 1

Views

Author

Amiram Eldar, Jun 01 2024

Keywords

Comments

Numbers that are unitarily divided by n are numbers k such that n is a unitary divisor of k, or equivalently, numbers of the form m*n, with gcd(m, n) = 1.

Examples

			Fractions begin with: 1, 1/4, 2/9, 1/8, 4/25, 1/18, 6/49, 1/16, 2/27, 1/25, 10/121, 1/36, ...
For n = 2, the numbers that are unitarily divided by 2 are the numbers of the form 4*k+2 whose asymptotic density is 1/4. Therefore a(2) = numerator(1/4) = 1.
		

Crossrefs

Numbers that are unitarily divided by k: A000027 (k=1), A016825 (k=2), A016051 (k=3), A017113 (k=4), A051062 (k=8), A051063 (k=9).

Programs

  • Mathematica
    a[n_] := Numerator[EulerPhi[n]/n^2]; Array[a, 100]
  • PARI
    a(n) = numerator(eulerphi(n)/n^2);

Formula

a(n) = 1 if and only if n is in A090778.
a(n) = A000010(n) if and only if n is a cyclic number (A003277).
Let f(n) = a(n)/A373319(n). Then:
f(n) = A000010(n)/n^2 = A076512(n)/(n*A109395(n)).
f(n) = A173557(n)/A064549(n).
f(n) is multiplicative with f(p^e) = (1 - 1/p)/p^e.
Sum_{k=1..n} f(k) = (log(n) + gamma - zeta'(2)/zeta(2)) / zeta(2), where gamma is Euler's constant (A001620).

A385044 The number of unitary divisors of n that are 5-rough numbers (A007310).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4, 2, 2, 2, 2, 4, 2, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 4, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Jun 16 2025

Keywords

Comments

The sum of these divisors is A385045(n), and the largest of them is A065330(n).

Crossrefs

The unitary analog of A035218.
The number of unitary divisors of n that are: A000034 (power of 2), A055076 (exponentially odd), A056624 (square), A056671 (squarefree), A068068 (odd), A323308 (powerful), A365498 (cubefree), A365499 (biquadratefree), A368248 (cubefull), A380395 (cube), A382488 (3-smooth), A385042 (exponentially 2^n), this sequence (5-rough).

Programs

  • Mathematica
    f[p_, e_] := If[p <= 3, 1, 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> if(x <= 3, 1, 2), factor(n)[, 1]));

Formula

Multiplicative with a(p^e) = 1 if p <= 3, and 2 if p >= 5.
a(n) = A034444(n)/A382488(n).
a(n) <= A034444(n), with equality if and only if n is 5-rough.
a(n) <= A035218(n).
Dirichlet g.f.: (zeta(s)^2/zeta(2*s)) * (1/((1+1/2^s)*(1+1/3^s))).
Sum_{k=1..n} a(k) ~ (n / (2 * zeta(2))) *(log(n) + 2*gamma - 1 + log(2)/3 + log(3)/4 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620).

A045771 Number of similar sublattices of index n^2 in root lattice D_4.

Original entry on oeis.org

1, 1, 8, 1, 12, 8, 16, 1, 41, 12, 24, 8, 28, 16, 96, 1, 36, 41, 40, 12, 128, 24, 48, 8, 97, 28, 176, 16, 60, 96, 64, 1, 192, 36, 192, 41, 76, 40, 224, 12, 84, 128, 88, 24, 492, 48, 96, 8, 177, 97, 288, 28, 108, 176, 288, 16, 320, 60, 120, 96, 124, 64, 656, 1
Offset: 1

Views

Author

Michael Baake (baake(AT)miles.math.ualberta.ca)

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Apply[Times, FactorInteger[#] /. {p_, e_} /; p > 0 :> If[1 <= p <= 2, 1, (e + 1) p^e + (2 (1 + (e p - e - 1)*p^e))/((p - 1)^2)]] &, 64] (*  Michael De Vlieger, Mar 02 2018 *)
  • PARI
    fp(p, e) = if (p % 2, (e+1)*p^e + 2*(1-(e+1)*p^e+e*p^(e+1))/(p-1)^2, 1);
    a(n) = { my(f = factor(n)); prod(i=1, #f~, fp(f[i, 1], f[i, 2]));} \\ Michel Marcus, Mar 03 2014

Formula

Multiplicative with a(2^p) = 1, a(p^e) = (e+1)*p^e + (2*(1+(e*p-e-1)*p^e))/((p-1)^2), p>2. - Christian G. Bower, May 21 2005
From Amiram Eldar, May 26 2025: (Start)
Dirichlet g.f.: (zeta(s-1)^2 * zeta(s)^2 / zeta(2*s)) * (1 - 1/2^(s-1))^2/(1 + 1/2^s).
Sum_{k=1..n} a(k) ~ (n^2/4)*(log(n) + 2*gamma - 1/2 + 11*log(2)/5 + 2*zeta'(2)/zeta(2) - 2*zeta'(4)/zeta(4)), where gamma is Euler's constant (A001620). (End)

Extensions

More terms from Michel Marcus, Mar 03 2014

A064368 Number of 2 X 2 symmetric singular matrices with entries from {0,...,n}.

Original entry on oeis.org

1, 4, 7, 10, 15, 18, 21, 24, 29, 36, 39, 42, 47, 50, 53, 56, 65, 68, 75, 78, 83, 86, 89, 92, 97, 108, 111, 118, 123, 126, 129, 132, 141, 144, 147, 150, 163, 166, 169, 172, 177, 180, 183, 186, 191, 198, 201, 204, 213, 228, 239, 242, 247, 250, 257, 260, 265, 268
Offset: 0

Views

Author

Vladeta Jovovic, Sep 27 2001

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Floor[e/2]; a[0] = 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; With[{max = 100}, 1 + Range[0, max] + 2 * Accumulate[Array[a, max + 1, 0]]] (* Amiram Eldar, Nov 07 2024 *)
  • PARI
    a(n) = n + 1 + 2*sum(k=1, n, sumdiv(k, d, issquare(d)*eulerphi(sqrtint(d)))) \\ Michel Marcus, Jun 17 2013

Formula

a(n) = n + 1 + 2*Sum_{k=1..n} Sum_{d^2|k} phi(d), where phi = Euler totient function A000010.
a(n) ~ (n/zeta(2)) * (log(n) + 3*gamma - 1 + zeta(2) - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 07 2024
Previous Showing 21-30 of 44 results. Next