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

A008966 a(n) = 1 if n is squarefree, otherwise 0.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
The infinite lower triangular matrix with A008966 on the main diagonal and the rest zeros is the square of triangle A143255. - Gary W. Adamson, Aug 02 2008

Crossrefs

Cf. A005117, A008836 (Dirichlet inverse), A013928 (partial sums).
Parity of A002033.
Cf. A082020 (Dgf at s=2), A157289 (Dgf at s=3), A157290 (Dgf at s=4).

Programs

  • Haskell
    a008966 = abs . a008683
    -- Reinhard Zumkeller, Dec 13 2015, Dec 15 2014, May 27 2012, Jan 25 2012
    
  • Magma
    [ Abs(MoebiusMu(n)) : n in [1..100]];
    
  • Maple
    A008966 := proc(n) if numtheory[issqrfree](n) then 1 ; else 0 ; end if; end proc: # R. J. Mathar, Mar 14 2011
  • Mathematica
    A008966[n_] := Abs[MoebiusMu[n]]; Table[A008966[n], {n, 100}] (* Enrique Pérez Herrero, Apr 15 2010 *)
    Table[If[SquareFreeQ[n],1,0],{n,100}] (* or *) Boole[SquareFreeQ/@ Range[ 100]] (* Harvey P. Dale, Feb 28 2015 *)
  • MuPAD
    func(abs(numlib::moebius(n)), n):
    
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1+X))[n]
    
  • PARI
    a(n)=issquarefree(n) \\ Michel Marcus, Feb 22 2015
    
  • Python
    from sympy import factorint
    def A008966(n): return int(max(factorint(n).values(),default=1)==1) # Chai Wah Wu, Apr 05 2023

Formula

Dirichlet g.f.: zeta(s)/zeta(2s).
a(n) = abs(mu(n)), where mu is the Moebius function (A008683).
a(n) = 0^(bigomega(n) - omega(n)), where bigomega(n) and omega(n) are the numbers of prime factors of n with and without repetition (A001222, A001221, A046660). - Reinhard Zumkeller, Apr 05 2003
Multiplicative with p^e -> 0^(e - 1), p prime and e > 0. - Reinhard Zumkeller, Jul 15 2003
a(n) = 0^(A046951(n) - 1). - Reinhard Zumkeller, May 20 2007
a(n) = 1 - A107078(n). - Reinhard Zumkeller, Oct 03 2008
a(n) = floor(rad(n)/n), where rad() is A007947. - Enrique Pérez Herrero, Nov 13 2009
A175046(n) = a(n)*A073311(n). - Reinhard Zumkeller, Apr 05 2010
a(n) = floor(A000005(n^2)/A007425(n)). - Enrique Pérez Herrero, Apr 15 2010
a(A005117(n)) = 1; a(A013929(n)) = 0; a(n) = A013928(n + 1) - A013928(n). - Reinhard Zumkeller, Jul 05 2010
a(n) * A112526(n) = A063524(n). - Reinhard Zumkeller, Sep 16 2011
a(n) = mu(n) * lambda(n) = A008836(n) * A008683(n). - Enrique Pérez Herrero, Nov 29 2013
a(n) = Sum_{d|n} 2^omega(d)*mu(n/d). - Geoffrey Critzer, Feb 22 2015
a(n) = A085357(A156552(n)). - Antti Karttunen, Mar 06 2017
Limit_{n->oo} (1/n)*Sum_{j=1..n} a(j) = 6/Pi^2. - Andres Cicuttin, Aug 13 2017
a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^bigomega(n/d) * a(d). - Ilya Gutkovskiy, Mar 10 2021

Extensions

Deleted an unclear comment. - N. J. A. Sloane, May 30 2021

A073576 Number of partitions of n into squarefree parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 12, 16, 21, 28, 36, 47, 60, 76, 96, 120, 150, 185, 228, 280, 342, 416, 504, 608, 731, 877, 1048, 1249, 1484, 1759, 2079, 2452, 2885, 3387, 3968, 4640, 5413, 6304, 7328, 8504, 9852, 11395, 13159, 15172, 17468, 20082, 23056, 26434, 30267
Offset: 0

Views

Author

Vladeta Jovovic, Aug 27 2002

Keywords

Comments

Euler transform of the absolute values of A008683. - Tilman Neumann, Dec 13 2008
Euler transform of A008966. - Vaclav Kotesovec, Mar 31 2018

Crossrefs

Cf. A058647.
Cf. A087188.
Cf. A225244.
Cf. A114374.

Programs

  • Haskell
    a073576 = p a005117_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Jun 01 2015
    
  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
          abs(mobius(d)), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 05 2015
  • Mathematica
    Table[Length[Select[Boole /@ Thread /@ SquareFreeQ /@ IntegerPartitions[n], FreeQ[#, 0] &]], {n, 48}] (* Jayanta Basu, Jul 02 2013 *)
    a[n_] := a[n] = If[n==0, 1, Sum[Sum[d*Abs[MoebiusMu[d]], {d, Divisors[j]}] * a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Oct 10 2015, after Alois P. Heinz *)
    nmax = 60; CoefficientList[Series[Exp[Sum[Sum[Abs[MoebiusMu[k]] * x^(j*k) / j, {k, 1, Floor[nmax/j] + 1}], {j, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Mar 31 2018 *)
  • Python
    from functools import lru_cache
    from sympy import mobius, divisors
    @lru_cache(maxsize=None)
    def A073576(n): return sum(sum(d*abs(mobius(d)) for d in divisors(i, generator=True))*A073576(n-i) for i in range(1,n+1))//n if n else 1 # Chai Wah Wu, Aug 23 2024

Formula

G.f.: 1/Product_{k>0} (1-x^A005117(k)).
a(n) = 1/n*Sum_{k=1..n} A048250(k)*a(n-k).
a(n) = A000041(n) - A114374(n) - A117395(n), n>0. - Reinhard Zumkeller, Mar 11 2006
G.f.: 1 + Sum_{i>=1} mu(i)^2*x^i / Product_{j=1..i} (1 - mu(j)^2*x^j). - Ilya Gutkovskiy, Jun 05 2017
a(n) ~ exp(2*sqrt(n)) / (4*Pi^(3/2)*n^(1/4)). - Vaclav Kotesovec, Mar 24 2018

A256012 Number of partitions of n into distinct parts that are not squarefree.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 2, 1, 1, 0, 3, 2, 1, 0, 4, 3, 1, 2, 5, 4, 2, 2, 6, 5, 3, 2, 9, 7, 4, 4, 11, 8, 5, 5, 13, 13, 7, 7, 17, 17, 9, 9, 22, 20, 15, 12, 27, 26, 19, 15, 33, 33, 23, 23, 41, 41, 30, 29, 49, 51, 39, 35, 65, 63, 50, 47, 79
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 01 2015

Keywords

Comments

Conjecture: a(n) > 0 for n > 23.

Examples

			First nonsquarefree numbers: 4,8,9,12,16,18,20,24,25,27,28, ...  hence
a(20) = #{20, 16+4, 12+8} = 3;
a(21) = #{12+9, 9+8+4} = 2;
a(22) = #{18+4} = 1;
a(23) = #{ } = 0;
a(24) = #{24, 20+4, 16+8, 12+8+4} = 4;
a(25) = #{25, 16+9, 12+9+4} = 3.
		

Crossrefs

Programs

  • Haskell
    a256012 = p a013929_list where
       p _      0 = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
  • Maple
    with(numtheory):
    b:= proc(n, i) option remember;
          `if`(i*(i+1)/2n or issqrfree(i), 0, b(n-i, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 02 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[i*(i+1)/2n || SquareFreeQ[i], 0, b[n-i, i-1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 22 2015, after Alois P. Heinz *)

Formula

G.f.: Product_{k>=1} (1 + x^k)/(1 + mu(k)^2*x^k), where mu(k) is the Moebius function (A008683). - Ilya Gutkovskiy, Dec 30 2016

A379308 Number of integer partitions of n with a unique squarefree part.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 2, 2, 0, 3, 5, 5, 1, 6, 9, 9, 2, 10, 14, 18, 6, 18, 24, 30, 11, 28, 39, 47, 24, 48, 63, 76, 41, 74, 95, 118, 65, 120, 149, 181, 107, 181, 221, 266, 169, 266, 335, 398, 262, 394, 487, 578, 391, 578, 697, 844, 592, 834, 997, 1198, 867
Offset: 0

Views

Author

Gus Wiseman, Dec 26 2024

Keywords

Examples

			The a(1) = 1 through a(11) = 5 partitions:
  (1)  (2)  (3)  .  (5)    (6)    (7)    .  (5,4)    (10)     (11)
                    (4,1)  (4,2)  (4,3)     (8,1)    (6,4)    (7,4)
                                            (4,4,1)  (8,2)    (8,3)
                                                     (9,1)    (9,2)
                                                     (4,4,2)  (4,4,3)
		

Crossrefs

If all parts are squarefree we have A073576 (strict A087188), ranks A302478.
If no parts are squarefree we have A114374 (strict A256012), ranks A379307.
For composite instead of squarefree we have A379302 (strict A379303), ranks A379301.
For prime instead of squarefree we have A379304, (strict A379305), ranks A331915.
The strict case is A379309.
For old prime instead of squarefree we have A379314, (strict A379315), ranks A379312.
Ranked by A379316, positions of 1 in A379306.
A000041 counts integer partitions, strict A000009.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A377038 gives k-th differences of squarefree numbers.
A379310 counts nonsquarefree prime indices.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[#,_?SquareFreeQ]==1&]],{n,0,30}]

A379309 Number of strict integer partitions of n with a unique squarefree part.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 2, 2, 0, 2, 4, 4, 1, 4, 7, 7, 2, 6, 8, 11, 4, 9, 13, 17, 7, 13, 20, 22, 13, 20, 29, 33, 21, 29, 40, 47, 27, 41, 56, 64, 42, 59, 77, 85, 60, 74, 104, 115, 83, 101, 141, 155, 113, 138, 179, 206, 156, 183, 236, 272, 212, 239, 309, 343, 282, 315
Offset: 0

Views

Author

Gus Wiseman, Dec 27 2024

Keywords

Examples

			The a(9) = 2 through a(15) = 7 partitions:
  (5,4)  (10)   (11)   (9,3)  (13)     (14)     (15)
  (8,1)  (6,4)  (7,4)         (8,5)    (8,6)    (8,7)
         (8,2)  (8,3)         (12,1)   (9,5)    (9,6)
         (9,1)  (9,2)         (8,4,1)  (10,4)   (11,4)
                                       (12,2)   (12,3)
                                       (8,4,2)  (8,4,3)
                                       (9,4,1)  (9,4,2)
		

Crossrefs

If all parts are squarefree we have A087188, non-strict A073576 (ranks A302478).
If no parts are squarefree we have A256012, non-strict A114374 (ranks A379307).
For composite instead of squarefree we have A379303, non-strict A379302 (ranks A379301).
For prime instead of squarefree we have A379305, non-strict A379304 (ranks A331915).
The non-strict version is A379308, ranks A379316.
For old prime instead of squarefree we have A379315, non-strict A379314 (ranks A379312).
Ranked by A379316 /\ A005117 = squarefree positions of 1 in A379306.
A000041 counts integer partitions, strict A000009.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A377038 gives k-th differences of squarefree numbers.
A379310 counts nonsquarefree prime indices.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Count[#,_?SquareFreeQ]==1&]],{n,0,30}]
  • PARI
    lista(nn) = my(r=1, s=0); for(k=1, nn, if(issquarefree(k), s+=x^k, r*=1+x^k)); concat(0, Vec(r*s+O(x^(1+nn)))); \\ Jinyuan Wang, Feb 21 2025

Extensions

More terms from Jinyuan Wang, Feb 21 2025

A225245 Number of partitions of n into distinct squarefree divisors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 05 2013

Keywords

Comments

a(n) <= A033630(n);
a(n) = A033630(n) iff n is squarefree: a(A005117(n)) = A033630(A005117(n));
a(A225353(n)) = 0; a(A225354(n)) > 0.

Examples

			a(2*3)     = a(6)  = #{6, 3+2+1} = 2;
a(2*2*3)   = a(12) = #{6+3+2+1} = 1;
a(2*3*5)   = a(30) = #{30, 15+10+5, 15+10+3+2, 15+6+5+3+1} = 4;
a(2*2*3*5) = a(60) = #{30+15+10+5, 30+15+10+3+2, 30+15+6+5+3+1} = 3;
a(2*3*7)   = a(42) = #{42, 21+14+7, 21+14+6+1} = 3;
a(2*2*3*7) = a(84) = #{42+21+14+7, 42+21+14+6+1} = 2.
		

Crossrefs

Programs

  • Haskell
    a225245 n = p (a206778_row n) n where
       p _      0 = 1
       p []     _ = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
  • Mathematica
    a[n_] := If[n == 0, 1, Coefficient[Product[If[MoebiusMu[d] != 0, 1+x^d, 1], {d, Divisors[n]}], x, n]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 08 2021, after Ilya Gutkovskiy *)

Formula

a(n) = [x^n] Product_{d|n, mu(d) != 0} (1 + x^d), where mu() is the Moebius function (A008683). - Ilya Gutkovskiy, Jul 26 2017

A379310 Number of nonsquarefree prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 27 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 39 are {2,6}, so a(39) = 0.
The prime indices of 70 are {1,3,4}, so a(70) = 1.
The prime indices of 98 are {1,4,4}, so a(98) = 2.
The prime indices of 294 are {1,2,4,4}, a(294) = 2.
The prime indices of 1911 are {2,4,4,6}, so a(1911) = 2.
The prime indices of 2548 are {1,1,4,4,6}, so a(2548) = 2.
		

Crossrefs

Positions of first appearances are A000420.
Positions of zero are A302478, counted by A073576 (strict A087188).
No squarefree parts: A379307, counted by A114374 (strict A256012).
One squarefree part: A379316, counted by A379308 (strict A379309).
A000040 lists the primes, differences A001223.
A005117 lists the squarefree numbers, differences A076259.
A008966 is the characteristic function for the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A061398 counts squarefree numbers between primes, zeros A068360.
A377038 gives k-th differences of squarefree numbers.
Other counts of prime indices:
- A330944 nonprime, see A000586, A000607, A076610, A330945.
- A379311 old prime, see A204389, A320629, A379312-A379315.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[prix[n],Not@*SquareFreeQ]],{n,100}]

Formula

Totally additive with a(prime(k)) = A107078(k) = 1 - A008966(k).

A307835 Number of partitions of n into 3 distinct squarefree parts.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 2, 2, 3, 5, 4, 4, 5, 9, 8, 8, 9, 12, 11, 11, 12, 16, 15, 15, 17, 21, 19, 18, 20, 25, 24, 22, 28, 33, 32, 28, 33, 40, 37, 35, 40, 50, 47, 42, 48, 58, 56, 48, 56, 65, 66, 57, 63, 73, 73, 65, 70, 82, 80, 74, 81, 92, 90, 80, 92, 102, 102, 88, 104, 116, 116
Offset: 0

Views

Author

Ilya Gutkovskiy, May 01 2019

Keywords

Examples

			a(15) = 4 because we have [11, 3, 1], [10, 3, 2], [7, 6, 2] and [7, 5, 3].
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n, {3}], _?(And[UnsameQ @@ #, AllTrue[#, SquareFreeQ[#] &]] &)], {n, 0, 75}]

Formula

a(n) = [x^n y^3] Product_{k>=1} (1 + mu(k)^2*y*x^k).

A331846 Number of compositions (ordered partitions) of n into distinct squarefree parts.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 9, 5, 12, 16, 21, 41, 42, 49, 59, 79, 130, 231, 230, 295, 226, 495, 609, 699, 1472, 1042, 1377, 2308, 2982, 3425, 3879, 4877, 7156, 7189, 13531, 14797, 13570, 19551, 27667, 30327, 36382, 47519, 60783, 70561, 78330, 136988, 121659, 174851
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(7) = 5 because we have [7], [6, 1], [5, 2], [2, 5] and [1, 6].
		

Crossrefs

A239509 Number of partitions of n into distinct nonprime squarefree numbers, cf. A000469.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 3, 3, 1, 1, 2, 2, 2, 2, 2, 3, 4, 4, 3, 2, 4, 7, 6, 4, 5, 6, 6, 7, 7, 6, 8, 10, 9, 9, 10, 10, 12, 13, 12, 13, 15, 16, 18, 18, 16, 17, 21, 23, 23, 23, 25, 28, 29, 29, 31, 34, 37, 41, 40, 38, 42, 46
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 21 2014

Keywords

Examples

			a(30) = #{30, 15+14+1, 14+10+6} = 3;
a(31) = #{30+1, 21+10, 15+10+6, 14+10+6+1} = 4;
a(32) = #{26+6, 22+10, 21+10+1, 15+10+6+1} = 4;
a(33) = #{33, 26+6+1, 22+10+1} = 3;
a(34) = #{34, 33+1} = 2;
a(35) = #{35, 34+1, 21+14, 15+14+6} = 4;
a(36) = #{35+1, 30+6, 26+10, 22+14, 21+15, 21+14+1, 15+14+6+1} = 7.
		

Crossrefs

Programs

  • Haskell
    a239509 = p a000469_list where
       p _      0 = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
  • Maple
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 b(n$2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 02 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[i*(i+1)/2Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)
Showing 1-10 of 24 results. Next