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

A262992 Sum of the squarefree numbers among the partition parts of n into two parts.

Original entry on oeis.org

0, 2, 3, 8, 6, 14, 17, 24, 24, 29, 34, 51, 45, 65, 72, 87, 87, 104, 104, 133, 123, 155, 166, 189, 189, 202, 215, 229, 215, 259, 274, 305, 305, 355, 372, 407, 407, 463, 482, 521, 521, 583, 604, 669, 647, 670, 693, 740, 740, 740, 740, 817, 791, 844, 844, 899
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 06 2015

Keywords

Examples

			a(3)=3; there is one partition of 3 into two parts: (2,1). The sum of the squarefree parts of this partition is 2+1=3, so a(3)=3.
a(5)=6; there are two partitions of 5 into two parts: (4,1) and (3,2). The sum of the squarefree parts of these partitions is 3+2+1=6, so a(5)=6.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A262992:=n->add(i*mobius(i)^2 + (n-i)*mobius(n-i)^2, i=1..floor(n/2)): seq(A262992(n), n=1..100);
  • Mathematica
    Table[Sum[i*MoebiusMu[i]^2 + (n - i)*MoebiusMu[n - i]^2, {i, Floor[n/2]}], {n, 100}]
  • PARI
    vector(100, n, sum(k=1, n\2, k*moebius(k)^2 + (n-k)*moebius(n-k)^2)) \\ Altug Alkan, Oct 07 2015
    
  • PARI
    a(n)=my(s, k2, m=n-1); forsquarefree(k=1, sqrtint(m), k2=k[1]^2; s+= k2*binomial(m\k2+1, 2)*moebius(k)); s + (n%4==2 && issquarefree(n/2))*n/2 \\ Charles R Greathouse IV, Jan 13 2018

Formula

a(n) = Sum_{i=1..floor(n/2)} i*mu(i)^2 + (n-i)*mu(n-i)^2, where mu is the Möebius function (A008683).
a(n) = A262870(n) + A262871(n).

A294101 Number of partitions of n into two parts such that one is squarefree and the other is nonsquarefree.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 0, 2, 3, 3, 1, 2, 4, 4, 1, 3, 4, 6, 2, 5, 5, 7, 2, 6, 7, 7, 4, 7, 9, 9, 4, 8, 8, 10, 1, 9, 11, 11, 4, 10, 12, 10, 4, 9, 14, 14, 5, 11, 15, 17, 5, 12, 13, 19, 8, 14, 14, 18, 8, 15, 17, 17, 9, 17, 19, 19, 7, 18, 18, 22, 3, 19, 19, 21, 8
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 22 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/2] - Sum[KroneckerDelta[MoebiusMu[k]^2, MoebiusMu[n - k]^2], {k, Floor[n/2]}], {n, 80}]

Formula

a(n) = floor(n/2) - Sum_{i=1..floor(n/2)} [mu(i)^2 = mu(n-i)^2], where [] is the Iverson bracket.
From Wesley Ivan Hurt, Jul 16 2025: (Start)
a(n) = A294232(n) + A294233(n).
a(n) = A262991(n) - 2*A071068(n). (End)

A347648 Number of partitions of n into at most 2 squarefree parts.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 4, 4, 5, 5, 4, 4, 6, 5, 6, 5, 7, 5, 6, 5, 7, 6, 6, 6, 8, 7, 8, 7, 11, 8, 8, 8, 11, 9, 9, 10, 13, 10, 9, 9, 13, 10, 8, 8, 14, 11, 10, 8, 13, 11, 12, 10, 15, 12, 12, 11, 15, 12, 12, 12, 18, 13, 14, 12, 21, 14, 15, 13
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 09 2021

Keywords

Crossrefs

A285718 a(1) = 0, and for n > 1, a(n) = the least squarefree number x such that n-x is also squarefree.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 3, 5, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 3, 6, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1
Offset: 1

Views

Author

Antti Karttunen, May 02 2017

Keywords

Comments

For any n > 1 there is at least one decomposition of n as a sum of two squarefree numbers (cf. A071068 and the Mathematics Stack Exchange link). Of all pairs (x,y) of positive squarefree numbers for which x <= y and x+y = n, sequences A285718 and A285719 give the unique pair for which the difference y-x is the largest possible.
Question: Are there arbitrarily large terms in this sequence?

Examples

			For n=51 we see that 50 (2*5*5), 49 (7*7) and 48 (2^4 * 3) are all nonsquarefree (A013929). 47 (a prime) is squarefree, but 51 - 47 = 4 is not. On the other hand, both 46 (2*23) and 5 are squarefree numbers, thus a(51) = 5.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, 0, x = 1; While[Nand[SquareFreeQ@ x, SquareFreeQ[n - x]], x++]; x], {n, 120}] (* Michael De Vlieger, May 03 2017 *)
  • Python
    from sympy.ntheory.factor_ import core
    def issquarefree(n): return core(n) == n
    def a285718(n):
        if n==1: return 0
        x = 1
        while True:
            if issquarefree(x) and issquarefree(n - x):return x
            else: x+=1
    print([a285718(n) for n in range(1, 121)]) # Indranil Ghosh, May 02 2017
  • Scheme
    (define (A285718 n) (if (= 1 n) 0 (let loop ((k 1)) (if (not (zero? (A008683 (- n (A005117 k))))) (A005117 k) (loop (+ 1 k))))))
    

Formula

a(n) = n - A285719(n).

A285719 a(1) = 1, and for n > 1, a(n) = the largest squarefree number k such that n-k is also squarefree.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 02 2017

Keywords

Comments

For any n > 1 there is at least one decomposition of n as a sum of two squarefree numbers (cf. A071068 and the Mathematics Stack Exchange link). Of all pairs (x,y) of positive squarefree numbers for which x <= y and x+y = n, sequences A285718 and A285719 give the unique pair for which the difference y-x is the largest possible.
Note: a(n+1) differs from A070321(n) for the first time at n=50, with a(51) = 46, while A070321(50) = 47.

Examples

			For n=51 we see that 50 (2*5*5), 49 (7*7) and 48 (2^4 * 3) are all nonsquarefree (A013929). 47 (a prime) is squarefree, but 51 - 47 = 4 is not. On the other hand, both 46 (2*23) and 5 are squarefree numbers, thus a(51) = 46.
		

Crossrefs

Programs

  • Mathematica
    lsfn[n_]:=Module[{k=n-1},While[!SquareFreeQ[k]||!SquareFreeQ[n-k],k--];k]; Join[{1},Array[ lsfn,100,2]] (* Harvey P. Dale, Apr 27 2023 *)
  • Python
    from sympy.ntheory.factor_ import core
    def issquarefree(n): return core(n) == n
    def a285718(n):
        if n==1: return 0
        x = 1
        while True:
            if issquarefree(x) and issquarefree(n - x):return x
            else: x+=1
    def a285719(n): return n - a285718(n)
    print([a285719(n) for n in range(1, 121)]) # Indranil Ghosh, May 02 2017
  • Scheme
    (define (A285719 n) (- n (A285718 n)))
    (define (A285719 n) (if (= 1 n) n (let loop ((k (A013928 n))) (if (not (zero? (A008683 (- n (A005117 k))))) (A005117 k) (loop (- k 1))))))
    

Formula

a(n) = n - A285718(n).

A307726 Number of partitions of n into 2 prime powers (not including 1).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 24 2019

Keywords

Examples

			a(10) = 3 because we have [8, 2], [7, 3] and [5, 5].
		

Crossrefs

Programs

  • Maple
    # note that this requires A246655 to be pre-computed
    f:= proc(n, k, pmax) option remember;
      local t, p, j;
      if n = 0 then return `if`(k=0, 1, 0) fi;
      if k = 0 then return 0 fi;
      if n > k*pmax then return 0 fi;
      t:= 0:
      for p in A246655 do
        if p > pmax then return t fi;
        t:= t + add(procname(n-j*p, k-j, min(p-1, n-j*p)), j=1..min(k, floor(n/p)))
      od;
      t
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 29 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {2}], _?(AllTrue[#, PrimePowerQ] &)] &, 101, 0]

Formula

a(n) = [x^n y^2] Product_{k>=1} 1/(1 - y*x^A246655(k)).

A280829 Number of partitions of n into two squarefree semiprimes.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jan 08 2017

Keywords

Examples

			a(20) = 2; there are 2 partitions of 20 into two squarefree semiprimes: (14,6) and (10,10).
		

Crossrefs

Programs

  • Maple
    with(numtheory): A280829:=n->add(floor(bigomega(i)*mobius(i)^2/2)*floor(2*mobius(i)^2/bigomega(i))*floor(bigomega(n-i)*mobius(i)^2/2)*floor(2*mobius(n-i)^2/bigomega(n-i)), i=2..floor(n/2)): seq(A280829(n), n=1..100);
  • Mathematica
    Table[Sum[Floor[PrimeOmega[i] MoebiusMu[i]^2 / 2] Floor[2 MoebiusMu[i]^2 / PrimeOmega[i]] Floor[PrimeOmega[n - i] MoebiusMu[i]^2 / 2] Floor[2 MoebiusMu[n - i]^2 / PrimeOmega[n - i]], {i, 2, Floor[n/2]}], {n, 1, 90}] (* Indranil Ghosh, Mar 10 2017, translated from Maple code *)
  • PARI
    for(n=1, 90, print1(sum(i=2, floor(n/2), floor(bigomega(i) * moebius(i)^2 / 2) * floor(2 * moebius(i)^2 / bigomega(i)) * floor(bigomega(n - i) * moebius(i)^2 / 2) * floor(2 * moebius(n - i)^2 / bigomega(n - i))),", ")) \\ Indranil Ghosh, Mar 10 2017

Formula

a(n) = Sum_{k=1..floor(n/2)} c(k) * c(n-k), where c = A280710.

A307815 Number of partitions of n into 3 squarefree parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 3, 5, 4, 5, 5, 7, 7, 9, 8, 11, 11, 13, 11, 15, 14, 18, 15, 20, 19, 23, 20, 24, 24, 27, 24, 30, 29, 34, 30, 37, 36, 42, 36, 45, 44, 50, 44, 54, 54, 59, 52, 62, 63, 68, 57, 69, 70, 78, 65, 78, 78, 88, 74, 86, 87, 98, 84, 98, 98, 107, 93, 109, 108, 120, 102, 124, 123
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 30 2019

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0$3], `if`(i<1, 0, b(n, i-1)+
          `if`(numtheory[issqrfree](i), [0, b(n-i, min(i, n-i))[1..3][]], 0)))
        end:
    a:= n-> b(n$2)[4]:
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 30 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {3}], _?(AllTrue[#, SquareFreeQ] &)] &, 75, 0]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, {1, 0, 0, 0}, If[i < 1, {0, 0, 0, 0}, b[n, i - 1] + If[SquareFreeQ[i], {0, Sequence @@ b[n - i, Min[i, n - i]][[1 ;; 3]]}, {0, 0, 0, 0}]]];
    a[n_] := b[n, n][[4]];
    a /@ Range[0, 80] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)

Formula

a(n) = [x^n y^3] Product_{k>=1} 1/(1 - mu(k)^2*y*x^k).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} mu(i)^2 * mu(k)^2 * mu(n-i-k)^2, where mu is the Mobius function. - Wesley Ivan Hurt, May 09 2019

A261927 Sum of the larger parts of the partitions of n into two squarefree parts.

Original entry on oeis.org

0, 1, 2, 5, 3, 8, 11, 18, 13, 12, 16, 34, 28, 31, 37, 63, 50, 56, 44, 88, 59, 83, 73, 129, 93, 91, 100, 138, 105, 103, 123, 195, 151, 173, 169, 303, 201, 199, 219, 345, 255, 256, 298, 442, 341, 274, 289, 482, 380, 294, 255, 525, 401, 410, 270, 539, 422, 487
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 02 2015

Keywords

Examples

			a(4) = 5. There are two partitions of 4 into two squarefree parts: (3, 1) and (2, 2). The sum of the larger parts of these partitions is 3 + 2 = 5.
a(5) = 3. There is only one partition of 5 into two squarefree parts: (3, 2). The larger part is 3, thus a(5) = 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A261987:=n->add((n-i)*mobius(i)^2*mobius(n-i)^2, i=1..floor(n/2)): seq(A261987(n), n=1..70);
  • Mathematica
    Table[Sum[(n - i) MoebiusMu[i]^2 * MoebiusMu[n - i]^2, {i, Floor[n/2]}], {n, 70}]
    Table[Total[Select[IntegerPartitions[n,{2}],AllTrue[#,SquareFreeQ]&][[All,1]]],{n,60}] (* Harvey P. Dale, Apr 26 2022 *)

Formula

a(n) = Sum_{i = 1..floor(n/2)} ((n - i) * mu(i)^2 * mu(n - i)^2), where mu is the Möbius function (A008683).
a(n) = A262351(n) - A261985(n).

A285720 Number of ways to write n as a sum of two unordered squarefree numbers so that their addition in base-2 does not produce carries.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Abs[MoebiusMu[i] MoebiusMu[n - i]] Boole[BitXor[i, n - i] == n], {i, Floor[n/2]}], {n, 120}] (* Michael De Vlieger, May 03 2017 *)
  • Python
    from sympy import mobius
    def a003987(n, i): return i^(n - i) == n
    def a(n): return sum([abs(mobius(i)*mobius(n - i))*(1*a003987(n, i)) for i in range(1, n//2 + 1)])
    print([a(n) for n in range(1,121)]) # Indranil Ghosh, May 02 2017
  • Scheme
    (define (A285720 n) (let loop ((k (A013928 n)) (s 0)) (if (or (zero? k) (< (A005117 k) (- n (A005117 k)))) s (loop (- k 1) (+ s (if (and (= 1 (A008966 (- n (A005117 k)))) (zero? (A004198bi (A005117 k) (- n (A005117 k))))) 1 0)))))) ;; Where A004198bi implements bitwise-AND (A004198).
    

Formula

a(n) = Sum_{i=1..floor(n/2)} abs(mu(i)*mu(n-i))*[A003987(i,n-i) == n]. (Here [] is Iverson bracket, giving in this case 1 only if (i XOR (n-i)) is equal to n, and 0 otherwise. mu is Moebius mu function, A008683.)
a(n) <= A071068(n).
a(n) <= A088512(n).
Previous Showing 11-20 of 24 results. Next