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 31-40 of 104 results. Next

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}]

A112929 Number of squarefree integers less than the n-th prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 12, 15, 17, 19, 23, 26, 28, 30, 32, 36, 37, 41, 44, 45, 49, 51, 55, 60, 61, 63, 66, 67, 70, 77, 80, 83, 85, 91, 92, 95, 99, 102, 104, 108, 109, 116, 117, 120, 121, 129, 138, 140, 141, 144, 148, 149, 153, 157, 161, 165, 166, 169, 171, 173, 179, 187
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005 and Emeric Deutsch, Oct 14 2005

Keywords

Comments

a(n) = order of n-th term of A112925 among squarefree integers.

Examples

			a(5)=7 because the 5th prime is 11 and the squarefree numbers not exceeding 11 are: 2,3,5,6,7,10,11.
The 5th term of A112925 is 10 and 10 is the 7th squarefree integer (with 1 counted as the first squarefree integer). So a(5) = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from 2 to p do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: nops(B) end: seq(a(m),m=1..75);
    # Or:
    a := n -> nops(select(NumberTheory:-IsSquareFree, [seq(1..ithprime(n)-1)])):
    seq(a(n), n=1..63);  # Peter Luschny, Dec 12 2024
  • Mathematica
    f[n_] := Prime[n] - Sum[ If[ MoebiusMu[k]==0, 1, 0], {k, Prime[n]}] - 1; Table[ f[n], {n, 63}] (* Robert G. Wilson v, Oct 15 2005; syntax corrected by Frank M Jackson, Dec 28 2018 *)
  • PARI
    a(n)={
    my(lim=prime(n)-1,b=sqrtint(lim\2));
    sum(k=1,b,moebius(k)*(lim\k^2))+
    sum(k=b+1,sqrt(lim),moebius(k))
    }; \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    a(n,p=prime(n))=p--; my(s,b=sqrtint(p\2)); forsquarefree(k=1, b, s += p\k[1]^2*moebius(k)); forsquarefree(k=b+1, sqrtint(p), s += moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A112929(n): return (p:=prime(n))-1+sum(mobius(k)*(p//k**2) for k in range(2,isqrt(p)+1)) # Chai Wah Wu, Dec 12 2024

Formula

A005117(a(n)) = A112925(n). - R. J. Mathar, Apr 19 2008
a(n) = A013928(A000040(n)). - Reinhard Zumkeller, Apr 05 2010
a(n) ~ 6/Pi^2 * n log n. - Charles R Greathouse IV, Apr 26 2012

Extensions

More terms from Diana L. Mecum, May 29 2007
Edited by N. J. A. Sloane, Apr 26 2008 at the suggestion of R. J. Mathar

A243343 a(1)=1; thereafter, if n is the k-th squarefree number (i.e., n = A005117(k)), a(n) = 1 + (2*a(k-1)); otherwise, when n is k-th nonsquarefree number (i.e., n = A013929(k)), a(n) = 2*a(k).

Original entry on oeis.org

1, 3, 7, 2, 15, 5, 31, 6, 14, 11, 63, 4, 13, 29, 23, 30, 127, 10, 9, 62, 27, 59, 47, 12, 28, 61, 22, 126, 255, 21, 19, 8, 125, 55, 119, 26, 95, 25, 57, 58, 123, 45, 253, 46, 60, 511, 43, 254, 20, 18, 39, 124, 17, 54, 251, 118, 111, 239, 53, 94, 191, 51, 24, 56
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This is an instance of an "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 (numbers which are squarefree/not squarefree) is entangled with complementary pair odd/even numbers (A005408/A005843).
Thus this shares with permutation A243352 the property that each term of A005117 is mapped bijectively to a unique odd number and likewise each term of A013929 is mapped (bijectively) to a unique even number. However, instead of placing terms into those positions in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself.
Are there any other fixed points than 1, 13, 54, 120, 1389, 3183, ... ?

Crossrefs

Formula

a(1) = 1; thereafter, if A008966(n) = 0 (i.e., n is a term of A013929, not squarefree), a(n) = 2*a(A057627(n)); otherwise a(n) = 2*a(A013928(n+1)-1)+1 (where A057627 and A013928(n+1) give the number of integers <= n divisible/not divisible by a square greater than one).
For all n, A000035(a(n)) = A008966(n) = A008683(n)^2, or equally, a(n) = mu(n) modulo 2. The same property holds for A243352.

A378082 Terms appearing only once in A377783 = least nonsquarefree number > prime(n).

Original entry on oeis.org

12, 16, 18, 20, 24, 40, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 108, 112, 116, 128, 132, 150, 152, 160, 164, 168, 175, 180, 184, 192, 196, 198, 200, 212, 224, 228, 232, 234, 240, 242, 252, 260, 264, 270, 272, 279, 294, 308, 312, 315, 320, 332, 338, 348
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2024

Keywords

Comments

Nonsquarefree numbers k such that if p < q are the two greatest primes < k, there is at least one nonsquarefree number between p and q but all numbers between q and k are squarefree. - Robert Israel, Nov 20 2024

Examples

			The terms together with their prime indices begin:
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   40: {1,1,1,3}
   48: {1,1,1,1,2}
   54: {1,2,2,2}
   60: {1,1,2,3}
   63: {2,2,4}
   68: {1,1,7}
   72: {1,1,1,2,2}
   75: {2,3,3}
   80: {1,1,1,1,3}
   84: {1,1,2,4}
   90: {1,2,2,3}
   98: {1,4,4}
  108: {1,1,2,2,2}
  112: {1,1,1,1,4}
  116: {1,1,10}
  128: {1,1,1,1,1,1,1}
  132: {1,1,2,5}
		

Crossrefs

This is a transformation of A377783 (union A378040, differences A377784).
Note also A377783 restricts A120327 (differences A378039) to the primes.
Terms appearing twice are A378083.
Terms not appearing at all are A378084.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A070321 gives the greatest squarefree number up to n.
A071403(n) = A013928(prime(n)) counts squarefree numbers < prime(n).
A378086(n) = A057627(prime(n)) counts nonsquarefree numbers < prime(n).
Cf. A112926 (diffs A378037), opposite A112925 (diffs A378038).
Cf. A378032 (diffs A378034), restriction of A378033 (diffs A378036).

Programs

  • Maple
    q:= 3: R:= NULL: flag:= false: count:= 0:
    while count < 100 do
      p:= q; q:= nextprime(q);
      for k from p+1 to q-1 do
        found:= false;
        if not numtheory:-issqrfree(k) then
          if flag then
              count:= count+1; R:= R,k
          fi;
          found:= true; break
        fi;
       od;
       flag:= found;
    od:
    R; # Robert Israel, Nov 20 2024
  • Mathematica
    y=Table[NestWhile[#+1&,Prime[n],SquareFreeQ],{n,100}];
    Select[Most[Union[y]],Count[y,#]==1&]

A379316 Positive integers whose prime indices include a unique squarefree number.

Original entry on oeis.org

2, 3, 5, 11, 13, 14, 17, 21, 29, 31, 35, 38, 41, 43, 46, 47, 57, 59, 67, 69, 73, 74, 77, 79, 83, 91, 95, 98, 101, 106, 109, 111, 113, 115, 119, 122, 127, 137, 139, 142, 147, 149, 157, 159, 163, 167, 178, 179, 181, 183, 185, 191, 194, 199, 203, 206, 209, 211
Offset: 1

Views

Author

Gus Wiseman, Dec 29 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 terms together with their prime indices begin:
    2: {1}
    3: {2}
    5: {3}
   11: {5}
   13: {6}
   14: {1,4}
   17: {7}
   21: {2,4}
   29: {10}
   31: {11}
   35: {3,4}
   38: {1,8}
   41: {13}
   43: {14}
   46: {1,9}
		

Crossrefs

For all squarefree parts we have A302478, zeros of A379310.
Positions of 1 in A379306.
For no squarefree parts we have A379307, counted by A114374, strict A256012.
Partitions of this type are 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.
Other counts of prime indices:
- A330944 nonprime, see A000586, A000607, A076610, A330945.
- A379311 prime or 1, see A204389, A320629, A379312-A379315.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000],Length[Select[prix[#],SquareFreeQ]]==1&]

A243346 a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)), where A005117 are squarefree and A013929 are nonsquarefree numbers.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 12, 5, 9, 13, 24, 10, 18, 19, 32, 7, 16, 14, 25, 21, 36, 38, 63, 15, 27, 30, 49, 31, 50, 53, 84, 11, 20, 26, 45, 22, 40, 39, 64, 34, 54, 59, 96, 62, 99, 103, 162, 23, 44, 42, 72, 47, 80, 79, 126, 51, 81, 82, 128, 86, 136, 138, 220, 17, 28, 33, 52, 41, 68, 73, 120
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This permutation entangles complementary pair A005843/A005408 (even/odd numbers) with complementary pair A005117/A013929 (numbers which are squarefree/are not squarefree).

Crossrefs

Formula

a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)).
For all n > 1, A008966(a(n)) = A000035(n+1), or equally, mu(a(n)) + 1 = n modulo 2, where mu is Moebius mu (A008683). [A property shared with a simpler variant A075378].

A378085 First differences of A070321 (greatest squarefree number <= n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 04 2024

Keywords

Examples

			The greatest squarefree number <= 50 is 47, and the greatest squarefree number <= 51 is 51, so a(51) = 4.
		

Crossrefs

Ones are A007674.
Zeros are A013929 - 1.
Twos are A280892.
Positions of first appearances are A020755 - 1 (except first term).
First-differences of A070321.
The nonsquarefree restriction is A378034, differences of A378032.
For nonsquarefree numbers we have A378036, differences of A378033.
The opposite restriction to primes is A378037, differences of A112926.
The restriction to primes is A378038, differences of A112925.
The nonsquarefree opposite is A378039, restriction A377784.
The opposite version is A378087.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.

Programs

  • Mathematica
    Differences[Table[NestWhile[#-1&,n,#>1&&!SquareFreeQ[#]&],{n,100}]]

A100112 If n is the k-th squarefree number then a(n) = k, otherwise a(n) = 0.

Original entry on oeis.org

1, 2, 3, 0, 4, 5, 6, 0, 0, 7, 8, 0, 9, 10, 11, 0, 12, 0, 13, 0, 14, 15, 16, 0, 0, 17, 0, 0, 18, 19, 20, 0, 21, 22, 23, 0, 24, 25, 26, 0, 27, 28, 29, 0, 0, 30, 31, 0, 0, 0, 32, 0, 33, 0, 34, 0, 35, 36, 37, 0, 38, 39, 0, 0, 40, 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 48, 49, 50, 0, 0, 51, 52, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 07 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[LCM[n, k]]^2, {k, 1, n}];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 18 2021, after Benoit Cloitre *)
  • PARI
    a(n)=sum(k=1,n,moebius(lcm(n,k))^2) \\ Benoit Cloitre, Jun 14 2007
    
  • PARI
    first(n)=my(v=vector(n),k); forsquarefree(m=1,n, v[m[1]]=k++); v \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import integer_nthroot, mobius
    def A100112(n):
        b = 0
        k, r = integer_nthroot(n,2)
        a, c = (mobius(k),k-1) if r else (0,k)
        for i in range(1,c+1):
            m, j = mobius(i), i**2
            a += m*(n//j)
            b += m*((n-1)//j)
        return a if a>b else 0 # Chai Wah Wu, May 11 2024

Formula

a(A005117(n)) = n;
a(n) = (A013928(n) + 1)*A008966(n).
a(n) = Sum_{k=1..n} mu(lcm(n,k))^2. - Benoit Cloitre, Jun 14 2007

A362028 a(n) = Sum_{k=1..n} (-1)^(n-k) * mu(k)^2, where mu(k) is the Moebius function.

Original entry on oeis.org

1, 0, 1, -1, 2, -1, 2, -2, 2, -1, 2, -2, 3, -2, 3, -3, 4, -4, 5, -5, 6, -5, 6, -6, 6, -5, 5, -5, 6, -5, 6, -6, 7, -6, 7, -7, 8, -7, 8, -8, 9, -8, 9, -9, 9, -8, 9, -9, 9, -9, 10, -10, 11, -11, 12, -12, 13, -12, 13, -13, 14, -13, 13, -13, 14, -13, 14, -14, 15, -14, 15, -15, 16, -15, 15, -15, 16, -15, 16, -16, 16, -15, 16, -16, 17
Offset: 1

Views

Author

Seiichi Manyama, Apr 05 2023

Keywords

Crossrefs

Programs

  • Mathematica
    With[{m = 100}, -(-1)^Range[m] * Accumulate[Array[(-1)^(# + 1) * MoebiusMu[#]^2 &, m]]] (* Amiram Eldar, Mar 05 2024 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(n-k)*moebius(k)^2);
    
  • PARI
    lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1)*moebius(k)^2; print1((-1)^(k+1)*s, ", "))}; \\ Amiram Eldar, Mar 05 2024

Formula

G.f.: (Sum_{k>=1} mu(k)^2 * x^k) / (1 + x).
a(n) = -a(n-1) + A008966(n) for n > 1.
abs(a(n)) = (2/Pi^2) * n + O(R(n)), where R(n) = x^(1/2)*exp(-c * log(n)^(3/5) / log(log(n))^(1/5)) and c is a positive constant, unconditionally, or x^(11/35+eps) assuming the Riemann hypothesis (Tóth, 2017). - Amiram Eldar, Mar 05 2024

A060431 Number of cubefree numbers <= n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 34, 35, 36, 37, 38, 39, 40, 41, 41, 42, 43, 44, 45, 46, 46, 47, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 61
Offset: 1

Views

Author

Vladeta Jovovic, Apr 06 2001

Keywords

References

  • I. M. Vinogradov, Elements of the Theory of Numbers,(in Russian), Moscow, 1981, p. 36.

Crossrefs

Programs

  • Haskell
    a060431 n = a060431_list !! (n-1)
    a060431_list = scanl1 (+) a212793_list -- Reinhard Zumkeller, May 27 2012
    
  • Magma
    [&+[MoebiusMu(d)*Floor(n div d^3):d in [1..n]]:n in [1..75]]; // Marius A. Burtea, Oct 02 2019
    
  • PARI
    a(n)=sum(k=1,n,moebius(k)*floor(n/k^3)) \\ Benoit Cloitre, Jun 13 2007
    
  • PARI
    for (n=1, 500, a=sum(k=1, n, moebius(k)*floor(n/k^3)); write("b060431.txt", n, " ", a)) \\ Harry J. Smith, Jul 05 2009
    
  • PARI
    a(n)=my(s); forsquarefree(k=1,sqrtnint(n,3), s+=n\k[1]^3*moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import mobius, integer_nthroot
    def A060431(n): return sum(mobius(k)*(n//k**3) for k in range(1, integer_nthroot(n,3)[0]+1)) # Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{d>=1} mu(d)*floor(n/d^3), mu(d) = Moebius function A008683.
a(n) is asymptotic to (1/zeta(3))*n, see A088453. - Benoit Cloitre, Jun 13 2007
a(n) = Sum_{k = 1..n} A212793(k). - Reinhard Zumkeller, May 27 2012
Previous Showing 31-40 of 104 results. Next