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

A023900 Dirichlet inverse of Euler totient function (A000010).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also called reciprocity balance of n.
Apart from different signs, same as Sum_{d divides n} core(d)*mu(n/d), where core(d) (A007913) is the squarefree part of d. - Benoit Cloitre, Apr 06 2002
Main diagonal of A191898. - Mats Granvik, Jun 19 2011

Examples

			x - x^2 - 2*x^3 - x^4 - 4*x^5 + 2*x^6 - 6*x^7 - x^8 - 2*x^9 + 4*x^10 - ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 37.
  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc. Boston, MA, 1976, p. 125.

Crossrefs

Moebius transform is A055615.
Cf. A027748, A173557 (gives the absolute values), A295876.
Cf. A253905 (Dgf at s=3).

Programs

  • Haskell
    a023900 1 = 1
    a023900 n = product $ map (1 -) $ a027748_row n
    -- Reinhard Zumkeller, Jun 01 2015
    
  • Maple
    A023900 := n -> mul(1-i,i=numtheory[factorset](n)); # Peter Luschny, Oct 26 2010
  • Mathematica
    a[ n_] := If[ n < 1, 0, Sum[ d MoebiusMu @ d, { d, Divisors[n]}]] (* Michael Somos, Jul 18 2011 *)
    Array[ Function[ n, 1/Plus @@ Map[ #*MoebiusMu[ # ]/EulerPhi[ # ]&, Divisors[ n ] ] ], 90 ]
    nmax = 81; Drop[ CoefficientList[ Series[ Sum[ MoebiusMu[k] k x^k/(1 - x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ] (* Stuart Clary, Apr 15 2006 *)
    t[n_, 1] = 1; t[1, k_] = 1; t[n_, k_] :=  t[n, k] = If[n < k, If[n > 1 && k > 1, Sum[-t[k - i, n], {i, 1, n - 1}], 0], If[n > 1 && k > 1, Sum[-t[n - i, k], {i, 1, k - 1}], 0]]; Table[t[n, n], {n, 36}] (* Mats Granvik, Robert G. Wilson v, Jun 25 2011 *)
    Table[DivisorSum[m, # MoebiusMu[#] &], {m, 90}] (* Jan Mangaldan, Mar 15 2013 *)
    f[p_, e_] := (1 - p); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 14 2020 *)
  • PARI
    {a(n) = direuler( p=2, n, (1 - p*X) / (1 - X))[n]}
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, d * moebius(d)))} /* Michael Somos, Jul 18 2011 */
    
  • PARI
    a(n)=sumdivmult(n,d, d*moebius(d)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from sympy import divisors, mobius
    def a(n): return sum([d*mobius(d) for d in divisors(n)]) # Indranil Ghosh, Apr 29 2017
    
  • Python
    from math import prod
    from sympy import primefactors
    def A023900(n): return prod(1-p for p in primefactors(n)) # Chai Wah Wu, Sep 08 2023
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A023900 n) (if (= 1 n) 1 (* (- 1 (A020639 n)) (A023900 (A028234 n))))) ;; Antti Karttunen, Nov 28 2017

Formula

a(n) = Sum_{ d divides n } d*mu(d) = Product_{p|n} (1-p).
a(n) = 1 / (Sum_{ d divides n } mu(d)*d/phi(d)).
Dirichlet g.f.: zeta(s)/zeta(s-1). - Michael Somos, Jun 04 2000
a(n+1) = det(n+1)/det(n) where det(n) is the determinant of the n X n matrix M_(i, j) = i/gcd(i, j) = lcm(i, j)/j. - Benoit Cloitre, Aug 19 2003
a(n) = phi(n)*moebius(A007947(n))*A007947(n)/n. Logarithmic g.f.: Sum_{n >= 1} a(n)*x^n/n = log(F(x)) where F(x) is the g.f. of A117209 and satisfies: 1/(1-x) = Product_{n >= 1} F(x^n). - Paul D. Hanna, Mar 03 2006
G.f.: A(x) = Sum_{k >= 1} mu(k) k x^k/(1 - x^k) where mu(k) is the Moebius (Mobius) function, A008683. - Stuart Clary, Apr 15 2006
G.f.: A(x) is x times the logarithmic derivative of A117209(x). - Stuart Clary, Apr 15 2006
Row sums of triangle A134842. - Gary W. Adamson, Nov 12 2007
G.f.: x/(1-x) = Sum_{n >= 1} a(n)*x^n/(1-x^n)^2. - Paul D. Hanna, Aug 16 2008
a(n) = phi(rad(n)) *(-1)^omega(n) = A000010(A007947(n)) *(-1)^A001221(n). - Enrique Pérez Herrero, Aug 24 2010
a(n) = Product_{i = 2..n} (1-i)^( (pi(i)-pi(i-1)) * floor( (cos(n*Pi/i))^2 ) ), where pi = A000720, Pi = A000796. - Wesley Ivan Hurt, May 24 2013
a(n) = -limit of zeta(s)*(Sum_{d divides n} moebius(d)/exp(d)^(s-1)) as s->1 for n>1. - Mats Granvik, Jul 31 2013
a(n) = Sum_{d divides n} mu(d)*rad(d), where rad is A007947. - Enrique Pérez Herrero, May 29 2014
Conjecture for n>1: Let n = 2^(A007814(n))*m = 2^(ruler(n))*odd_part(n), where m = A000265(n), then a(n) = (-1)^(m=n)*(0+Sum_{i=1..m and gcd(i,m)=1} (4*min(i,m-i)-m)) = (-1)^(m1} (4*min(i,m-i)-m)). - I. V. Serov, May 02 2017
a(n) = (-1)^A001221(n) * A173557(n). - R. J. Mathar, Nov 02 2017
a(1) = 1; for n > 1, a(n) = (1-A020639(n)) * a(A028234(n)), because multiplicative with a(p^e) = (1-p). - Antti Karttunen, Nov 28 2017
a(n) = 1 - Sum_{d|n, d > 1} d*a(n/d). - Ilya Gutkovskiy, Apr 26 2019
From Richard L. Ollerton, May 07 2021: (Start)
For n>1, Sum_{k=1..n} a(gcd(n,k)) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)) = 0. (End)
a(n) = rad(n)*(-1)^omega(n)*phi(n)/n = A062953(n)*A000010(n)/n. - Amrit Awasthi, Jan 30 2022
a(n) = mu(n)*phi(n) = A008683(n)*A000010(n) whenever n is squarefree. - Amrit Awasthi, Feb 03 2022
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} core(d)*mu(d). Cf. Comment by Benoit Cloitre, dated Apr 06 2002.
a(n) = Sum_{d|n, e|n} n/gcd(d, e) * mu(n/d) * mu(n/e) (the sum is a multiplicative function of n by Tóth, and takes the value 1 - p for n = p^e, a prime power). (End)
From Peter Bala, Feb 01 2024: (Start)
G.f. Sum_{n >= 1} (2*n-1)*moebius(2*n-1)*x^(2*n-1)/(1 + x^(2n-1)).
a(n) = (-1)^(n+1) * Sum_{d divides n, d odd} d*moebius(d). (End)

A306633 Decimal expansion of zeta(2)/zeta(3).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 02 2019

Keywords

Comments

Equals the asymptotic mean of the unitary abundancy index, lim_{n->oo} (1/n) * Sum{k=1..n} usigma(k)/k, where usigma(k) is the sum of the unitary divisors of k (A034448).
From Amiram Eldar, May 12 2023: (Start)
Equals the asymptotic mean of the abundancy index of the squarefree numbers (A005117).
In general, the asymptotic mean of the abundancy index of the k-free numbers (numbers that are not divisible by a k-th power other than 1) is zeta(2)/zeta(k+1) (Jakimczuk and Lalín, 2022). (End)

Examples

			1.3684327776202058757367658539847919411308139146524...
		

Crossrefs

Cf. A000010, A001615, A002117, A005117, A013661 (asymptotic mean of sigma(k)/k), A034448, A065463, A253905, A322887.

Programs

  • Mathematica
    RealDigits[Zeta[2]/Zeta[3],10, 100][[1]]
  • PARI
    zeta(2)/zeta(3) \\ Michel Marcus, Mar 04 2019

Formula

Equals A013661/A002117 = 1/A253905.
Equals Sum_{k>=1} phi(k)/k^3, where phi is the Euler totient function (A000010). - Amiram Eldar, Jun 23 2020
Equals Product_{p prime} (1 + 1/(p*(p+1))). - Amiram Eldar, Aug 10 2020
Equals Sum_{k>=1} mu(k)^2/(k*psi(k)) (the sum of reciprocals of the squarefree numbers multiplied by their Dedekind psi function values, A001615). - Amiram Eldar, Aug 18 2020

A060800 a(n) = p^2 + p + 1 where p runs through the primes.

Original entry on oeis.org

7, 13, 31, 57, 133, 183, 307, 381, 553, 871, 993, 1407, 1723, 1893, 2257, 2863, 3541, 3783, 4557, 5113, 5403, 6321, 6973, 8011, 9507, 10303, 10713, 11557, 11991, 12883, 16257, 17293, 18907, 19461, 22351, 22953, 24807, 26733, 28057, 30103, 32221
Offset: 1

Views

Author

Jason Earls, Apr 27 2001

Keywords

Comments

Terms are divisible by 3 iff p is of the form 6*m+1 (A002476). - Michel Marcus, Jan 15 2017

Examples

			a(3) = 31 because 5^2 + 5 + 1 = 31.
		

Crossrefs

Programs

  • Magma
    [p^2+p+1: p in PrimesUpTo(200)]; // Vincenzo Librandi, Mar 20 2014
  • Maple
    A060800:= n -> map (p -> p^(2)+p+1, ithprime(n)):
    seq (A060800(n), n=1..41); # Jani Melik, Jan 25 2011
  • Mathematica
    #^2 + # + 1&/@Prime[Range[200]] (* Vincenzo Librandi, Mar 20 2014 *)
  • PARI
    { n=0; forprime (p=2, prime(1000), write("b060800.txt", n++, " ", p^2 + p + 1); ) } \\ Harry J. Smith, Jul 13 2009
    

Formula

a(n) = A036690(n) + 1.
a(n) = 1 + A008864(n)*A000040(n) = (A030078(n) - 1)/A006093(n). - Reinhard Zumkeller, Aug 06 2007
a(n) = sigma(prime(n)^2) = A000203(A000040(n)^2). - Zak Seidov, Feb 13 2016
a(n) = A000203(A001248(n)). - Michel Marcus, Feb 15 2016
Product_{n>=1} (1 - 1/a(n)) = zeta(3)/zeta(2) (A253905). - Amiram Eldar, Nov 07 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 03 2001

A059269 Numbers m for which the number of divisors, tau(m), is divisible by 3.

Original entry on oeis.org

4, 9, 12, 18, 20, 25, 28, 32, 36, 44, 45, 49, 50, 52, 60, 63, 68, 72, 75, 76, 84, 90, 92, 96, 98, 99, 100, 108, 116, 117, 121, 124, 126, 132, 140, 144, 147, 148, 150, 153, 156, 160, 164, 169, 171, 172, 175, 180, 188, 196, 198, 200, 204, 207, 212, 220, 224, 225, 228
Offset: 1

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Jan 24 2001

Keywords

Comments

tau(n) is divisible by 3 iff at least one prime in the prime factorization of n has exponent of the form 3*m + 2. This sequence is an extension of the sequence A038109 in which the numbers has at least one prime with exponent 2 (the case of m = 0 here ) in their prime factorization.
The union of A211337 and A211338 is the complementary sequence to this one. - Douglas Latimer, Apr 12 2012
Numbers whose cubefree part (A050985) is not squarefree (A005117). - Amiram Eldar, Mar 09 2021

Examples

			a(7) = 28 is a term because the number of divisors of 28, d(28) = 6, is divisible by 3.
		

Crossrefs

Characteristic function: A353470.

Programs

  • Maple
    with(numtheory): for n from 1 to 1000 do if tau(n) mod 3 = 0 then printf(`%d,`,n) fi: od:
  • Mathematica
    Select[Range[230], Divisible[DivisorSigma[0, #], 3] &] (* Amiram Eldar, Jul 26 2020 *)
  • PARI
    is(n)=vecmax(factor(n)[,2]%3)==2 \\ Charles R Greathouse IV, Apr 10 2012
    
  • PARI
    is(n)=numdiv(n)%3==0 \\ Charles R Greathouse IV, Sep 18 2015

Formula

Conjecture: a(n) ~ k*n where k = 1/(1 - Product(1 - (p-1)/(p^(3*i)))) = 3.743455... where p ranges over the primes and i ranges over the positive integers. - Charles R Greathouse IV, Apr 13 2012
The asymptotic density of this sequence is 1 - zeta(3)/zeta(2) = 1 - 6*zeta(3)/Pi^2 = 0.2692370305... (Sathe, 1945). Therefore, the above conjecture, a(n) ~ k*n, is true, but k = 1/(1-6*zeta(3)/Pi^2) = 3.7141993349... - Amiram Eldar, Jul 26 2020
A001248 UNION A030515 UNION A030627 UNION A030630 UNION A030633 UNION A030636 UNION ... - R. J. Mathar, May 05 2023

Extensions

More terms from James Sellers, Jan 24 2001

A072905 a(n) is the least k > n such that k*n is a square.

Original entry on oeis.org

4, 8, 12, 9, 20, 24, 28, 18, 16, 40, 44, 27, 52, 56, 60, 25, 68, 32, 76, 45, 84, 88, 92, 54, 36, 104, 48, 63, 116, 120, 124, 50, 132, 136, 140, 49, 148, 152, 156, 90, 164, 168, 172, 99, 80, 184, 188, 75, 64, 72, 204, 117, 212, 96, 220, 126, 228, 232, 236, 135, 244, 248
Offset: 1

Views

Author

Benoit Cloitre, Aug 10 2002

Keywords

Comments

From Peter Kagey, Jun 22 2015: (Start)
a(n) is a bijection from the positive integers to A013929 (numbers that are not squarefree). Proof:
(1) Injection: Suppose that b
(2) Surjection: Given some number k in A013929, a(A007913(k)*(A000188(k)-1)^2.) = k (End)

Examples

			12 is the smallest integer > 3 such that 3*12 = 6^2 is a perfect square, hence a(3) = 12.
		

Crossrefs

Programs

  • Haskell
    a072905 n = head [k | k <- [n + 1 ..], a010052 (k * n) == 1]
    -- Reinhard Zumkeller, Feb 07 2015
    
  • Maple
    f:= proc(n) local F,f,x,y;
         F:= ifactors(n)[2];
         x:= mul(`if`(f[2]::odd,f[1],1),f=F);
         y:= mul(f[1]^floor(f[2]/2),f=F);
         x*(y+1)^2
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 23 2015
  • Mathematica
    a[n_] := For[k = n+1, True, k++, If[IntegerQ[Sqrt[k*n]], Return[k]]]; Array[a, 100] (* Jean-François Alcover, Jan 26 2018 *)
  • PARI
    a(n)=if(n<0,0,s=n+1; while(issquare(s*n)==0,s++); s)
    
  • PARI
    a(n)=my(c=core(n)); (sqrtint(n/c)+1)^2*c \\ Charles R Greathouse IV, Jun 23 2015
    
  • Ruby
    def a(n)
      k = Math.sqrt(n).to_i
      k -= 1 until n % k**2 == 0
      n + 2*n/k + n/(k**2)
    end # Peter Kagey, Jul 27 2015

Formula

a(n) = n + A067722(n). - Peter Kagey, Feb 05 2015
a(n) = A007913(n)*(A000188(n)+1)^2. - Peter Kagey, Feb 06 2015
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = 1 + 2*zeta(3)/zeta(2) + Pi^2/15 = 3.11949956554216757204... . - Amiram Eldar, Feb 17 2024

A029939 a(n) = Sum_{d|n} phi(d)^2.

Original entry on oeis.org

1, 2, 5, 6, 17, 10, 37, 22, 41, 34, 101, 30, 145, 74, 85, 86, 257, 82, 325, 102, 185, 202, 485, 110, 417, 290, 365, 222, 785, 170, 901, 342, 505, 514, 629, 246, 1297, 650, 725, 374, 1601, 370, 1765, 606, 697, 970, 2117, 430, 1801, 834, 1285, 870, 2705, 730, 1717, 814, 1625
Offset: 1

Keywords

Comments

Equals the inverse Mobius transform (A051731) of A127473. - Gary W. Adamson, Aug 20 2008
Number of (i,j) in {1,2,...,n}^2 such that gcd(n,i) = gcd(n,j). - Benoit Cloitre, Dec 31 2020

Crossrefs

Programs

  • Maple
    with(numtheory): A029939 := proc(n) local i,j; j := 0; for i in divisors(n) do j := j+phi(i)^2; od; j; end;
    # alternative
    N:= 1000: # to get a(1)..a(N)
    A:= Vector(N,1):
    for d from 2 to N do
      pd:= numtheory:-phi(d)^2;
      md:= [seq(i,i=d..N,d)];
      A[md]:= map(`+`,A[md],pd);
    od:
    seq(A[i],i=1..N); # Robert Israel, May 30 2016
  • Mathematica
    Table[Total[EulerPhi[Divisors[n]]^2],{n,60}] (* Harvey P. Dale, Feb 04 2017 *)
    f[p_, e_] := (p^(2*e)*(p-1)+2)/(p+1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)^2); \\ Michel Marcus, Jan 17 2017

Formula

Multiplicative with a(p^e) = (p^(2*e)*(p-1)+2)/(p+1). - Vladeta Jovovic, Nov 19 2001
G.f.: Sum_{k>=1} phi(k)^2*x^k/(1 - x^k), where phi(k) is the Euler totient function (A000010). - Ilya Gutkovskiy, Jan 16 2017
a(n) = Sum_{k=1..n} phi(n/gcd(n, k)). - Ridouane Oudra, Nov 28 2019
Sum_{k>=1} 1/a(k) = 2.3943802654751092440350752246012273573942903149891228695146514601814537713... - Vaclav Kotesovec, Sep 20 2020
Sum_{k=1..n} a(k) ~ c * n^3, where c = (zeta(3)/(3*zeta(2))) * Product_{p prime} (1 - 1/(p*(p+1))) = A253905 * A065463 / 3 = 0.171593... . - Amiram Eldar, Oct 25 2022

A351265 Sum of the squares of the squarefree divisors of n.

Original entry on oeis.org

1, 5, 10, 5, 26, 50, 50, 5, 10, 130, 122, 50, 170, 250, 260, 5, 290, 50, 362, 130, 500, 610, 530, 50, 26, 850, 10, 250, 842, 1300, 962, 5, 1220, 1450, 1300, 50, 1370, 1810, 1700, 130, 1682, 2500, 1850, 610, 260, 2650, 2210, 50, 50, 130, 2900, 850, 2810, 50, 3172, 250, 3620
Offset: 1

Author

Wesley Ivan Hurt, Feb 05 2022

Keywords

Comments

Inverse Möbius transform of n^2 * mu(n)^2. - Wesley Ivan Hurt, Jun 08 2023

Examples

			a(6) = 50; a(6) = Sum_{d|6} d^2 * mu(d)^2 = 1^2*1 + 2^2*1 + 3^2*1 + 6^2*1 = 50.
		

Crossrefs

Sum of the k-th powers of the squarefree divisors of n for k=0..10: A034444 (k=0), A048250 (k=1), this sequence (k=2), A351266 (k=3), A351267 (k=4), A351268 (k=5), A351269 (k=6), A351270 (k=7), A351271 (k=8), A351272 (k=9), A351273 (k=10).

Programs

  • Mathematica
    a[1] = 1; a[n_] := Times @@ (1 + FactorInteger[n][[;; , 1]]^2); Array[a, 100] (* Amiram Eldar, Feb 06 2022 *)
    Table[Total[Select[Divisors[n],SquareFreeQ]^2],{n,80}] (* Harvey P. Dale, Dec 26 2024 *)
  • PARI
    a(n) = sumdiv(n, d, if (issquarefree(d), d^2)); \\ Michel Marcus, Feb 06 2022

Formula

a(n) = Sum_{d|n} d^2 * mu(d)^2.
a(n) = abs(A328639(n)).
G.f.: Sum_{k>=1} mu(k)^2 * k^2 * x^k / (1 - x^k). - Ilya Gutkovskiy, Feb 06 2022
Multiplicative with a(p^e) = 1 + p^2. - Amiram Eldar, Feb 06 2022
Sum_{k=1..n} a(k) ~ c * n^3, where c = zeta(3)/(3*zeta(2)) = A253905 / 3 = 0.243587... . - Amiram Eldar, Nov 10 2022
Dirichlet g.f.: zeta(s)*zeta(s-2)/zeta(2s-4). - Michael Shamos, Aug 05 2023

A368712 The maximal exponent in the prime factorization of the cubefree numbers.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1
Offset: 1

Author

Amiram Eldar, Jan 04 2024

Keywords

Comments

The asymptotic density of occurrences of 1 is zeta(3)/zeta(2) = 0.730762... (A253905), and the asymptotic density of occurrences of 2 is 1 - zeta(3)/zeta(2) = 0.269237... .

Crossrefs

Programs

  • Mathematica
    s[n_] := If[n == 1, 0, Max @@ Last /@ FactorInteger[n]]; s /@ Select[Range[100], Max[FactorInteger[#][[;; , 2]]] < 3 &]
    (* or *)
    f[n_] := Module[{e = Max @@ FactorInteger[n][[;; , 2]]}, If[e < 3, e, Nothing]]; f[1] = 0; Array[f, 100]
  • PARI
    lista(kmax) = {my(e); print1(0, ", "); for(k = 2, kmax, e = vecmax(factor(k)[,2]); if(e < 3, print1(e, ", ")));}
    
  • Python
    from sympy import mobius, integer_nthroot, factorint
    def A368712(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return max(factorint(m).values(),default=0) # Chai Wah Wu, Aug 12 2024

Formula

a(n) = A051903(A004709(n)).
a(n) = 2 - A008966(A004709(n)) for n >= 2.
Except for n = 1, a(n) = 1 or 2.
a(n) = 1 if and only if A004709(n) is squarefree (A005117).
a(n) = 2 if and only if A004709(n) > 1 and is nonsquarefree (A013929), i.e., A004709(n) is in A067259.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - zeta(3)/zeta(2) = 2 - A253905 = 1.269237030598... .

A371188 Indices of the squarefree numbers in the sequence of cubefree numbers.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 23, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 40, 41, 44, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 59, 60, 61, 62, 63, 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, 79, 80, 81, 82, 86, 87, 88, 89, 90, 91
Offset: 1

Author

Amiram Eldar, Mar 14 2024

Keywords

Comments

The asymptotic density of this sequence is zeta(3)/zeta(2) = 0.730762... (A253905).

Examples

			The first 5 cubefree numbers are 1, 2, 3, 4, and 5. The 1st, 2nd, 3rd, and 5th, 1, 2, 3, and 5, are squarefree. Therefore, the first 4 terms of this sequence are 1, 2, 3, and 5.
		

Crossrefs

Programs

  • Mathematica
    freeQ[n_, k_] := AllTrue[FactorInteger[n], Last[#] < k &]; Position[Select[Range[200], freeQ[#, 3] &], _?(freeQ[#1, 2] &), Heads -> False] // Flatten
  • PARI
    isfree(n, k) = n == 1 || vecmax(factor(n)[, 2]) < k;
    lista(kmax) = {my(c = 0); for(k = 1, kmax, if(isfree(k, 3), c++; if(isfree(k, 2), print1(c, ", "))));}

Formula

A004709(a(n)) = A005117(n).
a(n) ~ c * n, where c = zeta(2)/zeta(3) = 1.368432... (A306633).

A336590 Numbers k such that k/A008834(k) is squarefree, where A008834(k) is the largest cube dividing k.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88
Offset: 1

Author

Amiram Eldar, Jul 26 2020

Keywords

Comments

Numbers such that none of the exponents in their prime factorization is of the form 3*m + 2.
Cohen (1962) proved that for a given number k >= 2 the asymptotic density of numbers whose exponents in their prime factorization are of the forms k*m or k*m + 1 only is zeta(k)/zeta(2). In this sequence k = 3, and therefore its asymptotic density is zeta(3)/zeta(2) = 6*zeta(3)/Pi^2 = 0.7307629694... (A253905).
Also, numbers k whose number of divisors, A000005(k), is not divisible by 3, i.e., complement of A059269.

Examples

			6 is a term since 6 = 2^1 * 3^1 and 1 is not of the form 3*m + 2.
9 is not a term since 9 = 3^2 and 2 is of the form 3*m + 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Max[Mod[FactorInteger[#][[;;,2]], 3]] < 2 &]
Showing 1-10 of 17 results. Next