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

A349309 Numbers k such that A254926(k) = A254926(k+1).

Original entry on oeis.org

7, 26, 124, 342, 1330, 2196, 12166, 24388, 29790, 79506, 103822, 148876, 205378, 226980, 300762, 357910, 493038, 571786, 1030300, 1092726, 1225042, 2248090, 2685618, 3307948, 3442950, 3869892, 4657462, 5177716, 5735338, 6967870, 7645372, 9393930, 11089566, 11697082
Offset: 1

Views

Author

Amiram Eldar, Nov 14 2021

Keywords

Examples

			7 is a term since A254926(7) = A254926(8) = 7.
		

Crossrefs

Cf. A254926.

Programs

  • Mathematica
    f[p_, e_] := If[e < 3, p^e, p^e - p^(e - 3)]; s[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[10^6], s[#] == s[# + 1] &]
  • Python
    from math import prod
    from itertools import count, islice
    from sympy import factorint
    def A349309_gen(startvalue=1): # generator of terms >= startvalue
        a = prod(p**e - (p**(e-3) if e >= 3 else 0) for p, e in factorint(max(startvalue,1)).items())
        for k in count(max(startvalue,1)):
            b = prod(p**e - (p**(e-3) if e >= 3 else 0) for p, e in factorint(k+1).items())
            if a == b:
                yield k
            a = b
    A349309_list = list(islice(A349309_gen(),10)) # Chai Wah Wu, Jan 24 2022

A384049 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is cubefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 7, 9, 10, 11, 12, 13, 14, 15, 15, 17, 18, 19, 20, 21, 22, 23, 21, 25, 26, 26, 28, 29, 30, 31, 31, 33, 34, 35, 36, 37, 38, 39, 35, 41, 42, 43, 44, 45, 46, 47, 45, 49, 50, 51, 52, 53, 52, 55, 49, 57, 58, 59, 60, 61, 62, 63, 63, 65, 66, 67, 68
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Crossrefs

Unitary analog of A254926.
The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is: A047994 (1), A384048 (squarefree), this sequence (cubefree), A384050 (powerful), A384051 (cubefull), A384052 (square), A384053 (cube), A384054 (exponentially odd), A384055 (odd), A384056 (power of 2), A384057 (3-smooth), A384058 (5-rough).

Programs

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

Formula

Multiplicative with a(p^e) = p^e if e <= 2, and p^e - 1 if e >= 3.
a(n) = n * A047994(n) / A384051(n).
a(n) = A047994(A360540(n)) * A360539(n).
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{p prime} (1 - 1/p^s - 1/p^(3*s) + 1/p^(4*s-1)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (1 - 1/(p^5*(p+1))) = 0.988504... (A065468).

A254981 a(n) is the sum of the divisors d of n such that n/d is cubefree.

Original entry on oeis.org

1, 3, 4, 7, 6, 12, 8, 14, 13, 18, 12, 28, 14, 24, 24, 28, 18, 39, 20, 42, 32, 36, 24, 56, 31, 42, 39, 56, 30, 72, 32, 56, 48, 54, 48, 91, 38, 60, 56, 84, 42, 96, 44, 84, 78, 72, 48, 112, 57, 93, 72, 98, 54, 117, 72, 112, 80, 90, 60, 168, 62, 96, 104, 112, 84, 144
Offset: 1

Views

Author

Álvar Ibeas, Feb 11 2015

Keywords

Comments

Inverse Möbius transform of A254926.

Crossrefs

Programs

  • Mathematica
    nn = 66; f[list_, i_] := list[[i]]; a = Table[If[Max[FactorInteger[n][[All, 2]]] < 3, 1, 0], {n, 1, nn}]; b =Table[n, {n, 1, nn}]; Table[
    DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 22 2015 *)
    f[p_, e_] := p^(e-2) * (1 + p + p^2); f[p_, 1] := 1 + p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    a212793(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i, 2]) >=3, return(0)); ); return (1); }
    a(n) = sumdiv(n, d, d*a212793(n/d)); \\ Michel Marcus, Feb 11 2015
    
  • PARI
    a(n) = sumdiv(n, d, if (ispower(d, 3), moebius(sqrtnint(d, 3))*sigma(n/d), 0)); \\ Michel Marcus, Mar 04 2015

Formula

a(n) = Sum_{d | n} d * A212793(n/d) = n * Sum_{d | n} A212793(d) / d.
a(n) = Sum_{d^3 | n} mu(d) * A000203(n/d^3).
Multiplicative with a(p) = 1 + p; a(p^e) = p^(e-2) * (1 + p + p^2), for e>1.
Dirichlet g.f.: zeta(s) * zeta(s-1) / zeta(3s).
If n is powerful, a(n^k) = n^(k-1) * a(n).
For k>1, a(n^k) = n^(k-1) * a(n) * Product_{p prime, ord(n,p)=1} (p^3-1) / (p^3-p).
Sum_{k=1..n} a(k) ~ 315*n^2 / (4*Pi^4). - Vaclav Kotesovec, Feb 03 2019

A384655 a(n) = Sum_{k=1..n} A051903(gcd(n,k)).

Original entry on oeis.org

0, 1, 1, 3, 1, 4, 1, 7, 4, 6, 1, 11, 1, 8, 7, 15, 1, 14, 1, 17, 9, 12, 1, 25, 6, 14, 13, 23, 1, 22, 1, 31, 13, 18, 11, 36, 1, 20, 15, 39, 1, 30, 1, 35, 26, 24, 1, 53, 8, 32, 19, 41, 1, 44, 15, 53, 21, 30, 1, 59, 1, 32, 34, 63, 17, 46, 1, 53, 25, 46, 1, 81, 1, 38
Offset: 1

Views

Author

Amiram Eldar, Jun 06 2025

Keywords

Comments

The terms of this sequence can be calculated efficiently using the 1st formula. The value the of function f(n, k) is equal to the number of integers i from 1 to n such that gcd(i, n) is 1 if k = 1, or k-free if k >= 2 (k-free numbers are numbers that are not divisible by a k-th power other than 1). E.g., f(n, 1) = A000010(n), f(n, 2) = A063659(n), and f(n, 3) = A254926(n).

Examples

			a(4) = A051903(gcd(4,1)) + A051903(gcd(4,2)) + A051903(gcd(4,3)) + A051903(gcd(4,4)) = A051903(1) + A051903(2) + A051903(1) + A051903(4) = 0 + 1 + 0 + 2 = 3.
		

Crossrefs

Programs

  • Mathematica
    e[n_] := If[n == 1, 0, Max[FactorInteger[n][[;;, 2]]]]; a[n_] := Sum[e[GCD[n, k]], {k, 1, n}]; Array[a, 100]
    (* or *)
    f[p_, e_, k_] := p^e - If[e < k, 0, p^(e - k)]; a[n_] := Module[{fct = FactorInteger[n], emax, s}, emax = Max[fct[[;; , 2]]]; s = emax * n; Do[s -= Times @@ (f[#1, #2, k] & @@@ fct), {k, 1, emax}]; s]; a[1] = 0; Array[a, 100]
  • PARI
    e(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = sum(k = 1, n, e(gcd(n, k)));
    
  • PARI
    a(n) = if(n == 1, 0, my(f = factor(n), p = f[,1], e = f[,2], emax = vecmax(e), s = emax*n); for(k = 1, emax, s -= prod(i = 1, #p, p[i]^e[i] - if(e[i] < k, 0, p[i]^(e[i]-k)))); s);

Formula

a(n) = Sum_{k=1..A051903(n)} (n - f(n, k)) = A051903(n) * n - Sum_{k=1..A051903(n)} f(n, k), where f(n, k) is multiplicative for a given k, with f(p^e, k) = p^e - p^(e-k) if e >= k and f(p^e, k) = p^e if e < k.
a(n) = 1 if and only if n is prime.
a(n) >= 2 if and only if n is composite.
a(n) >= A051953(n) with equality if and only if n is squarefree.
a(n) >= 2*n - A000010(n) - A063659(n) with equality if and only if n is cubefree that is not squarefree (i.e., n in A067259, or equivalently, A051903(n) = 2).
a(p^e) = (p^e-1)/(p-1) for a prime p and e >= 1.
a(n) < c*n and lim sun_{n->oo} a(n)/n = c, where c is Niven's constant (A033150).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum{k>=1} (1-1/zeta(2*k)) = 0.49056393035179738598... .

A384039 The number of integers k from 1 to n such that gcd(n,k) is a powerful number.

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 6, 6, 7, 4, 10, 6, 12, 6, 8, 12, 16, 7, 18, 12, 12, 10, 22, 12, 21, 12, 21, 18, 28, 8, 30, 24, 20, 16, 24, 21, 36, 18, 24, 24, 40, 12, 42, 30, 28, 22, 46, 24, 43, 21, 32, 36, 52, 21, 40, 36, 36, 28, 58, 24, 60, 30, 42, 48, 48, 20, 66, 48, 44
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Comments

The number of integers k from 1 to n such that the powerfree part (A055231) of gcd(n,k) is 1.

Crossrefs

The number of integers k from 1 to n such that gcd(n,k) is: A026741 (odd), A062570 (power of 2), A063659 (squarefree), A078429 (cube), A116512 (power of a prime), A117494 (prime), A126246 (1 or 2), A206369 (square), A254926 (cubefree), A372671 (3-smooth), this sequence (powerful), A384040 (cubefull), A384041 (exponentially odd), A384042 (5-rough).

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, p-1, (p^2-p+1)*p^(e-2)]; 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] == 1, f[i,1]-1, (f[i,1]^2-f[i,1]+1)*f[i,1]^(f[i,2]-2)));}

Formula

Multiplicative with a(p^e) = (p^2-p+1)*p^(e-2) if e >= 2, and p-1 otherwise.
a(n) >= A000010(n), with equality if and only if n is squarefree (A005117).
Dirichlet g.f.: zeta(s-1) * Product_{p prime} (1 - 1/p^s + 1/p^(2*s)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (1 - 1/p^2 + 1/p^4) = 0.66922021803510257394... .

A384040 The number of integers k from 1 to n such that gcd(n,k) is a cubefull number.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 5, 6, 4, 10, 4, 12, 6, 8, 10, 16, 6, 18, 8, 12, 10, 22, 10, 20, 12, 19, 12, 28, 8, 30, 20, 20, 16, 24, 12, 36, 18, 24, 20, 40, 12, 42, 20, 24, 22, 46, 20, 42, 20, 32, 24, 52, 19, 40, 30, 36, 28, 58, 16, 60, 30, 36, 40, 48, 20, 66, 32, 44, 24
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Comments

The number of integers k from 1 to n such that the cubefree part (A360539) of gcd(n,k) is 1.

Crossrefs

The number of integers k from 1 to n such that gcd(n,k) is: A026741 (odd), A062570 (power of 2), A063659 (squarefree), A078429 (cube), A116512 (power of a prime), A117494 (prime), A126246 (1 or 2), A206369 (square), A254926 (cubefree), A372671 (3-smooth), A384039 (powerful), this sequence (cubefull), A384041 (exponentially odd), A384042 (5-rough).

Programs

  • Mathematica
    f[p_, e_] := Switch[e, 1, p-1, 2, p^2-p, , (p^3-p^2+1)*p^(e-3)]; 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] == 1, f[i,1]-1, if(f[i,2] == 2, f[i,1]*(f[i,1]-1), (f[i,1]^3-f[i,1]^2+1)*f[i,1]^(f[i,2]-3))));}

Formula

Multiplicative with a(p^e) = (p^3-p^2+1)*p^(e-3) if e >= 3, p*(p-1) if e = 2, and p-1 otherwise.
a(n) >= A384039(n), with equality if and only if n is squarefree (A005117).
Dirichlet g.f.: zeta(s-1) * Product_{p prime} (1 - 1/p^s + 1/p^(3*s)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (1 - 1/p^2 + 1/p^6) = 0.62159731307414305346... .

A384041 The number of integers k from 1 to n such that gcd(n,k) is an exponentially odd number.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 7, 8, 10, 11, 9, 13, 14, 15, 13, 17, 16, 19, 15, 21, 22, 23, 21, 24, 26, 25, 21, 29, 30, 31, 27, 33, 34, 35, 24, 37, 38, 39, 35, 41, 42, 43, 33, 40, 46, 47, 39, 48, 48, 51, 39, 53, 50, 55, 49, 57, 58, 59, 45, 61, 62, 56, 53, 65, 66, 67, 51
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Crossrefs

The number of integers k from 1 to n such that gcd(n,k) is: A026741 (odd), A062570 (power of 2), A063659 (squarefree), A078429 (cube), A116512 (power of a prime), A117494 (prime), A126246 (1 or 2), A206369 (square), A254926 (cubefree), A372671 (3-smooth), A384039 (powerful), A384040 (cubefull), this sequence (exponentially odd), A384042 (5-rough).

Programs

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

Formula

Multiplicative with a(p^e) = ((p^2+p-1)*p^(e-1) - (-1)^e)/(p+1).
a(n) >= A000010(n), with equality if and only if n = 1.
Dirichlet g.f.: (zeta(s-1)*zeta(2*s)/zeta(s)) * Product_{p prime} (1 + 1/p^s - 1/p^(3*s)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (1 - 1/p^2 + 1/(p^2+1)) = 0.93749428273130025078... .

A384042 The number of integers k from 1 to n such that gcd(n,k) is a 5-rough number (A007310).

Original entry on oeis.org

1, 1, 2, 2, 5, 2, 7, 4, 6, 5, 11, 4, 13, 7, 10, 8, 17, 6, 19, 10, 14, 11, 23, 8, 25, 13, 18, 14, 29, 10, 31, 16, 22, 17, 35, 12, 37, 19, 26, 20, 41, 14, 43, 22, 30, 23, 47, 16, 49, 25, 34, 26, 53, 18, 55, 28, 38, 29, 59, 20, 61, 31, 42, 32, 65, 22, 67, 34, 46
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Crossrefs

The number of integers k from 1 to n such that gcd(n,k) is: A026741 (odd), A062570 (power of 2), A063659 (squarefree), A078429 (cube), A116512 (power of a prime), A117494 (prime), A126246 (1 or 2), A206369 (square), A254926 (cubefree), A372671 (3-smooth), A384039 (powerful), A384040 (cubefull), A384041 (exponentially odd), this sequence (5-rough).

Programs

  • Mathematica
    f[p_, e_] := If[p < 5, (p-1)*p^(e-1), p^e]; 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,1] < 5, (f[i,1]-1)*f[i,1]^(f[i,2]-1), f[i,1]^f[i,2]));}

Formula

Multiplicative with a(p^e) = (p-1)*p^(e-1) if p <= 3 and p^e if p >= 5.
a(n) >= A000010(n), with equality if and only if n is 3-smooth (A003586).
a(n) = A000010(A065331(n)) * A065330(n).
a(n) = 2 * n * phi(n)/phi(6*n) = n * A000010(n) / A372671(n).
Dirichlet g.f.: zeta(s-1) * (1-1/2^s) * (1-1/3^s).
Sum_{k=1..n} a(k) ~ n^2 / 3.

A309287 Square array T(v, m), read by antidiagonals, for the Rogel-Klee arithmetic function: number of positive integers h in the set [m] for which gcd(h, m) is v-th-power-free, i.e., gcd(h, m) is not divisible by any v-th power of an integer > 1 (with v, m >= 1).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 2, 1, 4, 3, 3, 2, 1, 2, 5, 4, 3, 2, 1, 6, 6, 5, 4, 3, 2, 1, 4, 7, 6, 5, 4, 3, 2, 1, 6, 6, 7, 6, 5, 4, 3, 2, 1, 4, 8, 7, 7, 6, 5, 4, 3, 2, 1, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 4, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 12, 9, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 6, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Petros Hadjicostas, Jul 21 2019

Keywords

Comments

For fixed v >= 1, T(v, .) is a multiplicative arithmetic function with T(v, 1) = 1; T(v, p^e) = p^e, if e < v; and T(v, p^e) = p^e - p^(e-v) if e >= v (where p is a prime >= 2).
Here, T(v=1, m) = phi(m) is the number of arithmetic progressions (s*m + k: s >= 0), k = 1, ..., m, that contain infinitely many primes (by Dirichlet's theorem). For v >= 2, T(v, m) is the number of these arithmetic progressions that contain infinitely many v-th-power-free numbers.
In Section 6 of his paper, Cohen (1959) mentions that this function was introduced by Rogel (1900) in an article published in a Bohemian journal. Roger's (1900) paper is a continuation of Rogel (1897) and the two should be read together.
McCarthy (1958) uses the asymptotic result given in the FORMULA section below to prove that the probability that the GCD of two positive integers is v-th-power-free is 1/zeta(2*v).

Examples

			Table for T(v, m) (with rows v >= 1 and columns m >= 1) begins as follows:
  v=1: 1, 1, 2, 2, 4, 2, 6, 4, 6,  4, 10,  4, 12,  6,  8,  8, ...
  v=2: 1, 2, 3, 3, 5, 6, 7, 6, 8, 10, 11,  9, 13, 14, 15, 12, ...
  v=3: 1, 2, 3, 4, 5, 6, 7, 7, 9, 10, 11, 12, 13, 14, 15, 14, ...
  v=4: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, ...
  v=5: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
  v=6: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
  v=7: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
  ...
Clearly, lim_{v -> infinity} T(v, m) = m.
		

References

  • Paul J. McCarthy, Introduction to Arithmetical Functions, Springer-Verlag, 1986; see pp. 38-40 and 69.

Crossrefs

A000010 (row v = 1 is Euler's phi function), A063659 (row v = 2 is Haviland's function), A254926 (row v = 3).

Programs

  • PARI
    /* Modification of Michel Marcus's program from sequence A254926: */
    T(v, m) = {f = factor(m); for (i=1, #f~, if ((e=f[i, 2])>=v, f[i, 1] = f[i, 1]^e - f[i, 1]^(e-v); f[i, 2]=1); ); factorback(f); }
    /* Print the first 40 terms of each of the first 10 rows: */
    { for (v=1, 10, for (m=1, 40, print1(T(v, m), ", "); ); print(); ); }

Formula

T(v, m) = m * Product_{p prime and p^v|m} (1 - p^(-v)) for v, m >= 1.
T(v, m) = Sum_{n >= 1} mu(n) * [m, n^v] * (m/n^v), where [m, n^v] = 1 when m is a multiple of n^v, and = 0 otherwise. [This is Eq. (53) in Rogel (1900) and Eq. (6.1) in Cohen (1959).]
Dirichlet g.f. for row v: Sum_{m >= 1} T(v, m)/m^s = zeta(s-1)/zeta(v*s) for Re(s) > 1.
Asymptotics: Sum_{m = 1..n} T(v, m) = n^2/(2*zeta(2*v)) + O(n) for v >= 2 and = n^2/(2*zeta(2)) + O(n*log(n)) for v = 1 (for Euler's phi-function).
Analog of Fermat's theorem: if gcd(a, m) = 1 with a >= 1, then m/gcd(a^T(v, m) - 1, m) is v-th-power-free. (For v = 1, this means m/gcd(a^T(v=1, m) - 1, m) = 1.)
T(v, m^v)/m^v = Sum_{d|m} mu(d)/d^v for m, v >= 1. (It generalizes the formula phi(m)/m = Sum_{d|m} mu(d)/d since phi(m) = T(v=1, m).)
Showing 1-9 of 9 results.