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

A007947 Largest squarefree number dividing n: the squarefree kernel of n, rad(n), radical of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 6, 13, 14, 15, 2, 17, 6, 19, 10, 21, 22, 23, 6, 5, 26, 3, 14, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 10, 41, 42, 43, 22, 15, 46, 47, 6, 7, 10, 51, 26, 53, 6, 55, 14, 57, 58, 59, 30, 61, 62, 21, 2, 65, 66, 67, 34, 69, 70, 71, 6, 73, 74, 15, 38, 77, 78
Offset: 1

Views

Author

R. Muller, Mar 15 1996

Keywords

Comments

Multiplicative with a(p^e) = p.
Product of the distinct prime factors of n.
a(k)=k for k=squarefree numbers A005117. - Lekraj Beedassy, Sep 05 2006
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), b*c = A019554(n) = "outer square root" of n, and a(n) = lcm(a(b),c). Unless n is biquadrateful (A046101), a(n) = lcm(b,c). [Edited by Jeppe Stig Nielsen, Oct 10 2021, and Andrey Zabolotskiy, Feb 12 2025]
a(n) = A128651(A129132(n-1) + 2) for n > 1. - Reinhard Zumkeller, Mar 30 2007
Also the least common multiple of the prime factors of n. - Peter Luschny, Mar 22 2011
The Mobius transform of the sequence generates the sequence of absolute values of A097945. - R. J. Mathar, Apr 04 2011
Appears to be the period length of k^n mod n. For example, n^12 mod 12 has period 6, repeating 1,4,9,4,1,0, so a(12)= 6. - Gary Detlefs, Apr 14 2013
a(n) differs from A014963(n) when n is a term of A024619. - Eric Desbiaux, Mar 24 2014
a(n) is also the smallest base (also termed radix) for which the representation of 1/n is of finite length. For example a(12) = 6 and 1/12 in base 6 is 0.03, which is of finite length. - Lee A. Newberg, Jul 27 2016
a(n) is also the divisor k of n such that d(k) = 2^omega(n). a(n) is also the smallest divisor u of n such that n divides u^n. - Juri-Stepan Gerasimov, Apr 06 2017

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 2*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 2*x^8 + 3*x^9 + ... - _Michael Somos_, Jul 15 2018
		

Crossrefs

See A007913, A062953, A000188, A019554, A003557, A066503, A087207 for other properties related to square and squarefree divisors of n.
More general factorization-related properties, specific to n: A020639, A028234, A020500, A010051, A284318, A000005, A001221, A005361, A034444, A014963, A128651, A267116.
Range of values is A005117.
Bisections: A099984, A099985.
Sequences about numbers that have the same squarefree kernel: A065642, array A284311 (A284457).
A003961, A059896 are used to express relationship between terms of this sequence.

Programs

  • Haskell
    a007947 = product . a027748_row  -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    [ &*PrimeDivisors(n): n in [1..100] ]; // Klaus Brockhaus, Dec 04 2008
    
  • Maple
    with(numtheory); A007947 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul(t1[i][1],i=1..nops(t1)); end;
    A007947 := n -> ilcm(op(numtheory[factorset](n))):
    seq(A007947(i),i=1..69); # Peter Luschny, Mar 22 2011
    A:= n -> convert(numtheory:-factorset(n),`*`):
    seq(A(n),n=1..100); # Robert Israel, Aug 10 2014
    seq(NumberTheory:-Radical(n), n = 1..78); # Peter Luschny, Jul 20 2021
  • Mathematica
    rad[n_] := Times @@ (First@# & /@ FactorInteger@ n); Array[rad, 78] (* Robert G. Wilson v, Aug 29 2012 *)
    Table[Last[Select[Divisors[n],SquareFreeQ]],{n,100}] (* Harvey P. Dale, Jul 14 2014 *)
    a[ n_] := If[ n < 1, 0, Sum[ EulerPhi[d] Abs @ MoebiusMu[d], {d, Divisors[ n]}]]; (* Michael Somos, Jul 15 2018 *)
    Table[Product[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    a(n) = factorback(factorint(n)[,1]); \\ Andrew Lelechenko, May 09 2014
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + p*X - X)/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from sympy import primefactors, prod
    def a(n): return 1 if n < 2 else prod(primefactors(n))
    [a(n) for n in range(1, 51)]  # Indranil Ghosh, Apr 16 2017
    
  • Sage
    def A007947(n): return mul(p for p in prime_divisors(n))
    [A007947(n) for n in (1..60)] # Peter Luschny, Mar 07 2017
    
  • Scheme
    (define (A007947 n) (if (= 1 n) n (* (A020639 n) (A007947 (A028234 n))))) ;; ;; Needs also code from A020639 and A028234. - Antti Karttunen, Jun 18 2017

Formula

If n = Product_j (p_j^k_j) where p_j are distinct primes, then a(n) = Product_j (p_j).
a(n) = Product_{k=1..A001221(n)} A027748(n,k). - Reinhard Zumkeller, Aug 27 2011
Dirichlet g.f.: zeta(s)*Product_{primes p} (1+p^(1-s)-p^(-s)). - R. J. Mathar, Jan 21 2012
a(n) = Sum_{d|n} phi(d) * mu(d)^2 = Sum_{d|n} |A097945(d)|. - Enrique Pérez Herrero, Apr 23 2012
a(n) = Product_{d|n} d^moebius(n/d) (see Billal link). - Michel Marcus, Jan 06 2015
a(n) = n/( Sum_{k=1..n} (floor(k^n/n)-floor((k^n - 1)/n)) ) = e^(Sum_{k=2..n} (floor(n/k) - floor((n-1)/k))*A010051(k)*M(k)) where M(n) is the Mangoldt function. - Anthony Browne, Jun 17 2016
a(n) = n/A003557(n). - Juri-Stepan Gerasimov, Apr 07 2017
G.f.: Sum_{k>=1} phi(k)*mu(k)^2*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 11 2017
From Antti Karttunen, Jun 18 2017: (Start)
a(1) = 1; for n > 1, a(n) = A020639(n) * a(A028234(n)).
a(n) = A019565(A087207(n)). (End)
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 + p^(1-2*s) - p^(2-2*s) - p^(-s)). - Vaclav Kotesovec, Dec 18 2019
From Peter Munn, Jan 01 2020: (Start)
a(A059896(n,k)) = A059896(a(n), a(k)).
a(A003961(n)) = A003961(a(n)).
a(n^2) = a(n).
a(A225546(n)) = A019565(A267116(n)). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = A065463/2. - Vaclav Kotesovec, Jun 24 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} mu(n/gcd(n,k))^2.
a(n) = Sum_{k=1..n} mu(gcd(n,k))^2*phi(gcd(n,k))/phi(n/gcd(n,k)).
For n>1, Sum_{k=1..n} a(gcd(n,k))*mu(a(gcd(n,k)))*phi(gcd(n,k))/gcd(n,k) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*mu(a(n/gcd(n,k)))*phi(gcd(n,k))*gcd(n,k) = 0. (End)
a(n) = (-1)^omega(n) * Sum_{d|n} mu(d)*psi(d), where omega = A001221 and psi = A001615. - Ridouane Oudra, Aug 01 2025

Extensions

More terms from several people including David W. Wilson
Definition expanded by Jonathan Sondow, Apr 26 2013

A143658 Number of squarefree integers not exceeding 2^n.

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 39, 78, 157, 314, 624, 1245, 2491, 4982, 9962, 19920, 39844, 79688, 159360, 318725, 637461, 1274918, 2549834, 5099650, 10199301, 20398664, 40797327, 81594626, 163189197, 326378284, 652756722, 1305513583, 2611027094
Offset: 0

Views

Author

M. F. Hasler, Aug 28 2008

Keywords

Comments

Except for the first 2 terms, it would not make a difference to replace "not exceeding" by "less than": that sequence would start 0,1,3,6,11,20,39,78,...

Examples

			a(4) = 11 since there are the 11 squarefree integers {1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15} not exceeding 2^4=16.
		

Crossrefs

Programs

  • Mathematica
    c = 0; k = 1; lst = {1}; Do[ While[k <= 2^n, If[ SquareFreeQ@k, c++ ]; k++ ]; AppendTo[lst, c], {n, 27}] (* Robert G. Wilson v, Aug 31 2008 *)
  • PARI
    print1(s=1);for(p=1,20,print1(", ",s+=sum(k=2^(p-1)+1, 2^p, issquarefree(k))))
    
  • PARI
    a(n)=sum(d=1,sqrtint(n=2^n),moebius(d)*n\d^2) \\ Charles R Greathouse IV, Nov 14 2012
    
  • PARI
    a(n)=my(s); forsquarefree(d=1,sqrtint(n=2^n), s += n\d[1]^2*moebius(d)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A143658(n):
        m = 1<Chai Wah Wu, Jun 01 2024

Formula

a(n) = Sum for i = 1 to 2^(n/2) of A008683(i)*floor(2^n/i^2). - Gerard P. Michon, Apr 30 2009
The limit of a(n)/2^n is 6/Pi^2. - Gerard P. Michon, Apr 30 2009

Extensions

5 more terms from Robert G. Wilson v, Aug 31 2008
More terms from Alexis Olson (AlexisOlson(AT)gmail.com), Nov 08 2008

A071172 Number of squarefree integers <= 10^n.

Original entry on oeis.org

1, 7, 61, 608, 6083, 60794, 607926, 6079291, 60792694, 607927124, 6079270942, 60792710280, 607927102274, 6079271018294, 60792710185947, 607927101854103, 6079271018540405, 60792710185403794, 607927101854022750, 6079271018540280875, 60792710185402613302, 607927101854026645617
Offset: 0

Views

Author

Robert G. Wilson v, Jun 10 2002

Keywords

Comments

The limit of a(n)/10^n is 6/Pi^2 (see A059956). - Gerard P. Michon, Apr 30 2009

Crossrefs

Apart from first two terms, same as A053462.
Binary counterpart is A143658. - Gerard P. Michon, Apr 30 2009

Programs

  • Mathematica
    f[n_] := Sum[ MoebiusMu[i]Floor[n/i^2], {i, Sqrt@ n}]; Table[ f[10^n], {n, 0, 14}] (* Robert G. Wilson v, Aug 04 2012 *)
  • PARI
    a(n)=sum(d=1,sqrtint(n=10^n),moebius(d)*n\d^2) \\ Charles R Greathouse IV, Nov 14 2012
    
  • PARI
    a(n)=my(s); forsquarefree(d=1,sqrtint(n=10^n), s += n\d[1]^2 * moebius(d)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A071172(n): return sum(mobius(k)*(10**n//k**2) for k in range(1,isqrt(10**n)+1)) # Chai Wah Wu, May 10 2024

Formula

a(n) = Sum_{i=1..10^(n/2)} A008683(i)*floor(10^n/i^2). - Gerard P. Michon, Apr 30 2009

Extensions

Extended by Eric W. Weisstein, Sep 14 2003
3 more terms from Jud McCranie, Sep 01 2005
4 more terms from Gerard P. Michon, Apr 30 2009

A324318 Number of terms in A324315 (squarefree integers m > 1 such that if prime p divides m, then the sum of the base p digits of m is at least p) less than 10^n.

Original entry on oeis.org

0, 0, 2, 57, 636, 7048, 75150, 801931, 8350039, 86361487
Offset: 1

Views

Author

Keywords

Comments

The number of squarefree integers less than 10^n is 0, 6, 61, 608, 6083, 60794, 607926, 6079291, 60792694, 607927124, ... (see A053462).

Examples

			There are two terms of A324315 less than 10^3, namely, 231 and 561, so a(3) = 2.
		

Crossrefs

A160113 Number of cubefree integers not exceeding 2^n.

Original entry on oeis.org

1, 2, 4, 7, 14, 27, 54, 107, 214, 427, 854, 1706, 3410, 6815, 13629, 27259, 54521, 109042, 218080, 436158, 872318, 1744638, 3489278, 6978546, 13957092, 27914186, 55828364, 111656716, 223313428, 446626866, 893253744, 1786507472, 3573014938, 7146029910, 14292059832
Offset: 0

Views

Author

Gerard P. Michon, May 02 2009

Keywords

Comments

An alternate definition specifying "less than 2^n" would yield the same sequence except for the first 3 terms: 0,1,3,7,14,27,54,107, etc. (since powers of 2 beyond 8 are not cubefree).
The limit of a(n)/2^n is the inverse of Apery's constant, 1/zeta(3) [see A088453].

Examples

			a(0)=1 because there is just one cubefree integer (1) not exceeding 2^0 = 1.
a(3)=7 because 1,2,3,4,5,6,7 are cubefree but 8 is not.
		

Crossrefs

Cf. A004709 (cubefree numbers), A160112 (decimal counterpart for cubefree integers), A143658 (binary counterpart for squarefree integers), A071172 & A053462 (decimal counterpart for squarefree integers).
Cf. A060431.

Programs

  • Haskell
    a160113 = a060431 . (2 ^)  -- Reinhard Zumkeller, Jul 27 2015
    
  • Mathematica
    a[n_] := Sum[ MoebiusMu[i]*Floor[2^n/i^3], {i, 1, 2^(n/3)}]; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Dec 20 2011, from formula *)
    Module[{nn=20,mu},mu=Table[If[Max[FactorInteger[n][[All,2]]]<3,1,0],{n,2^nn}];Table[Total[Take[mu,2^k]],{k,0,nn}]] (* The program generates the first 20 terms of the sequence. To get more, increase the value (constant) for nn, but the program may take a long time to run. *) (* Harvey P. Dale, Aug 13 2021 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A160113(n): return sum(mobius(k)*((1<Chai Wah Wu, Aug 06 2024
    
  • Python
    from bitarray import bitarray
    from sympy import integer_nthroot
    def A160113(n): # faster program
        q = 1<Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{i=1..2^(n/3)} A008683(i)*floor(2^n/i^3).

A160112 Number of cubefree integers not exceeding 10^n.

Original entry on oeis.org

1, 9, 85, 833, 8319, 83190, 831910, 8319081, 83190727, 831907372, 8319073719, 83190737244, 831907372522, 8319073725828, 83190737258105, 831907372580692, 8319073725807178, 83190737258070643, 831907372580707771
Offset: 0

Views

Author

Gerard P. Michon, May 02 2009, May 06 2009

Keywords

Comments

An alternate definition specifying "less than 10^n" would yield the same sequence except for the first 3 terms: 0, 8, 84, 833, 8319, etc. (since powers of 10 beyond 1000 are not cubefree anyhow).
The limit of a(n)/10^n is the inverse of Apery's constant, 1/zeta(3), whose digits are given by A088453.

Examples

			a(0)=1 because 1 <= 10^0 is not a multiple of the cube of a prime.
a(1)=9 because the 9 numbers 1,2,3,4,5,6,7,9,10 are cubefree; 8 is not.
a(2)=85 because there are 85 cubefree integers equal to 100 or less.
a(3)=833 because there are 833 cubefree integers below 1000 (which is not cubefree itself).
		

Crossrefs

A004709 (cubefree numbers). A088453 (limit of the string of digits). A160113 (binary counterpart for cubefree integers). A071172 & A053462 (decimal counterpart for squarefree integers). A143658 (binary counterpart for squarefree integers).

Programs

  • Maple
    with(numtheory): A160112:=n->add(mobius(i)*floor(10^n/(i^3)), i=1..10^n): (1,9,85,seq(A160112(n), n=3..5)); # Wesley Ivan Hurt, Aug 01 2015
  • Mathematica
    Table[ Sum[ MoebiusMu[x]*Floor[10^n/(x^3)], {x, 10^(n/3)}], {n, 0, 18}] (* Robert G. Wilson v, May 27 2009 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A160112(n): return sum(mobius(k)*(10**n//k**3) for k in range(1, integer_nthroot(10**n,3)[0]+1)) # Chai Wah Wu, Aug 06 2024
    
  • Python
    from bitarray import bitarray
    from sympy import integer_nthroot
    def A160112(n): # faster program
        q = 10**n
        m = integer_nthroot(q,3)[0]+1
        a, b = bitarray(m), bitarray(m)
        a[1], p, i, c = 1, 2, 4, q-sum(q//k**3 for k in range(2,m))
        while i < m:
            j = 2
            while i < m:
                if j==p:
                    c -= (b[i]^1 if a[i] else -1)*(q//i**3)
                    j, a[i], b[i] = 0, 1, 1
                else:
                    t1, t2 = a[i], b[i]
                    if (t1&t2)^1:
                        a[i], b[i] = (t1^1)&t2, ((t1^1)&t2)^1
                        c += (t2 if t1 else 2)*(q//i**3) if (t1^1)&t2 else (t2-2 if t1 else 0)*(q//i**3)
                i += p
                j += 1
            p += 1
            while a[p]|b[p]:
                p += 1
            i = p<<1
        return c # Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{i=1..floor(10^(n/3))} A008683(i)*floor(10^n/i^3).

A063035 Number of integers m <= 10^n that contain a square factor (i.e., belong to A013929).

Original entry on oeis.org

3, 39, 392, 3917, 39206, 392074, 3920709, 39207306, 392072876, 3920729058, 39207289720, 392072897726, 3920728981706, 39207289814053, 392072898145897, 3920728981459595
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2001

Keywords

Comments

Note that "containing a square factor" (A013929) is different from "squareful" (A001694).

Crossrefs

For the complementary counts see A053462 and A071172.

Programs

  • Mathematica
    f[n_] := Sum[-MoebiusMu[i]Floor[n/i^2], {i, 2, Sqrt@ n}]; Table[ f[10^n], {n, 0, 14}]
  • PARI
    { default(realprecision, 50); for (n=1, 100, t=10^n - 1; a=10^n - sum(k=1, sqrt(t), moebius(k)*floor(t/k^2)); write("b063035.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 16 2009
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A063035(n): return (m:=10**n)-sum(mobius(k)*(m//k**2) for k in range(1,isqrt(m)+1)) # Chai Wah Wu, Jul 20 2024

Formula

Limit_{n->oo} a(n)/10^n = A229099. - Robert G. Wilson v, Aug 12 2014
a(n) = 10^n - A071172(n). - Amiram Eldar, Mar 10 2024

Extensions

More terms from Harry J. Smith, Aug 16 2009
Edited (with a more precise definition and a new value for a(1)) by N. J. A. Sloane, Aug 06 2012. As a result of this change, the programs probably now give the wrong value for a(1). The source of the trouble was the ambiguous meaning of squareful - the official definition of squareful is A001694.

A124580 Where A124579 has two successive identical values.

Original entry on oeis.org

1, 9, 15, 31, 36, 40, 47, 165, 237, 330, 354, 357, 365, 402, 406, 421, 426, 794, 797, 813, 885, 894, 897, 905, 914, 1257, 1281, 1290, 1298, 1301, 1337, 1522, 1526, 1545, 1842, 1865, 2094, 2098, 2118, 2121, 2137, 2569, 3598, 4602, 4609, 4621, 4629, 4726, 4729
Offset: 1

Views

Author

Robert G. Wilson v, Nov 05 2006, Nov 12 2006

Keywords

Comments

Except for a(2), a(5) & a(6) none of these duplicates involve zeros.

Examples

			Interval 10^n . # of -1 ...# of 0 . # of 1 # of terms
............0.........0.........0.........1........1
............1.........4.........3.........3........1
............2........30........39........31........5
............3.......303.......392.......305.......18
............4......3053......3917......3030.......57
............5.....30421.....39206.....30373......189
............6....303857....392074....304069......636
............7...3039127...3920709...3040164.....1176
............8..30395383..39207306..30397311.....4621
............9.303963673.392072876.303963451....15952
		

Crossrefs

Cf. A124579, Column 2 = A063035, Column 1 + Column 3 = A053462.

Programs

  • Mathematica
    p = q = y = z = a = 0; s = {}; Do[ q = Switch[ MoebiusMu@n, -1, y++, 0, z++, 1, a++ ]; If[p == q, AppendTo[s, n - 1]]; p = q, {n, 5000}]; s
Showing 1-8 of 8 results.