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

A371737 Number of quanimous strict integer partitions of n, meaning there is more than one set partition with all equal block-sums.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0, 4, 0, 7, 1, 9, 0, 16, 0, 21, 4, 32, 0, 45, 0, 63, 13, 84, 0, 126, 0, 158, 36, 220, 0, 303, 0, 393, 93, 511, 0, 708, 0, 881, 229, 1156, 0, 1539, 0, 1925, 516, 2445, 0, 3233, 6, 3952, 1134, 5019, 0, 6497
Offset: 0

Views

Author

Gus Wiseman, Apr 14 2024

Keywords

Comments

A finite multiset of numbers is defined to be quanimous iff it can be partitioned into two or more multisets with equal sums. Quanimous partitions are counted by A321452 and ranked by A321454.
Conjecture: (1) Positions of 0's are A327782. (2) Positions of terms > 0 are A368459.

Examples

			The a(0) = 0 through a(14) = 7 strict partitions:
  .  .  .  .  .  .  (321)  .  (431)  .  (532)   .  (642)   .  (743)
                                        (541)      (651)      (752)
                                        (4321)     (5421)     (761)
                                                   (6321)     (5432)
                                                              (6431)
                                                              (6521)
                                                              (7421)
		

Crossrefs

The non-strict "bi-" version is A002219, ranks A357976.
The "bi-" version is A237258, ranks A357854, complement A321142 or A371794.
The non-strict version is A321452, ranks A321454.
The complement is A371736, non-strict A321451, ranks A321453.
The non-strict "bi-" complement is A371795, ranks A371731.
A371783 counts k-quanimous partitions.
A371791 counts biquanimous sets, complement A371792.
A371796 counts quanimous sets, complement A371789.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Length[Select[sps[#], SameQ@@Total/@#&]]>1&]],{n,0,30}]

A368276 Number of nonnegative representations of n = w*x + y*z with max(w, x) < min(y, z) and w <= x <= y <= z.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 2, 3, 5, 4, 3, 6, 4, 4, 5, 9, 4, 7, 5, 9, 6, 7, 4, 11, 11, 7, 7, 11, 7, 13, 7, 10, 9, 10, 9, 19, 9, 9, 10, 17, 9, 17, 8, 14, 14, 13, 7, 21, 17, 14, 13, 17, 10, 20, 13, 22, 14, 15, 10, 26, 14, 13, 18, 28, 15, 22, 13, 19, 17, 25, 12, 33, 15, 18
Offset: 1

Views

Author

Peter Luschny, Dec 19 2023

Keywords

Comments

Number of monotone Bacher representations (A368207) of n. We call a quadruple (w, x, y, z) of nonnegative integers a monotone Bacher representation of n if and only if n = w*x + y*z and w <= x < y <= z.

Examples

			For n = 13, the 4 solutions are (w, x, y, z) = (0, 0, 1, 13), (1, 1, 2, 6), (1, 1, 3, 4), (2, 2, 3, 3).
		

Crossrefs

Programs

  • Julia
    using Nemo
    function A368276(n)
        t(n) = (d for d in divisors(n) if d * d <= n)
        sum(sum(sum(1 for d in t(n - wx) if wx < d * dx; init=0)
                for dx in t(wx)) for wx in 1:div(n, 2); init=sum(t(n)))
    end
    println([A368276(n) for n in 1:74])  # Peter Luschny, Dec 19 2023
  • Mathematica
    t[n_]:=t[n]=Select[Divisors[n],#^2<=n&];
    A368276[n_]:=Total[t[n]]+Sum[Boole[wxA368276,100] (* Paolo Xausa, Jan 02 2024 *)
  • Python
    from itertools import takewhile
    from sympy import divisors
    def A368276(n):
        c = sum(takewhile(lambda x: x**2 <= n, divisors(n)))
        for wx in range(1, (n >> 1) + 1):
            for d1 in divisors(wx):
                if d1**2 > wx:
                    break
                m = n - wx
                c += sum(1
                    for d in takewhile(lambda x: x**2 <= m, divisors(n - wx))
                    if wx < d * d1)
        return c  # Chai Wah Wu, Dec 19 2023
    

A368457 a(n) = 2*(Bacher(n) - sigma(n)) + n + 1 = 2*(A368207(n) - A000203(n)) + n + 1.

Original entry on oeis.org

2, 1, 0, 1, 0, -1, 0, -5, 2, -7, 0, -7, 0, -9, -4, -7, 0, -19, 0, -9, -10, -13, 0, -27, 4, -15, -12, -23, 0, -25, 0, -29, -14, -19, 0, -43, 0, -21, -16, -41, 0, -33, 0, -39, -28, -25, 0, -59, 6, -41, -20, -45, 0, -53, -16, -39, -22, -31, 0, -99, 0, -33, -20
Offset: 1

Views

Author

Peter Luschny, Dec 26 2023

Keywords

Comments

We can use the Bacher numbers A368207 to measure the primeness of a positive integer, similar to how the number of prime factors of an integer does, but based on the number of representations of n as w*x + y*z where max(w, x) < min(y, z).
Bacher's theorem shows that a(n) = 0 if n is an odd prime. Conversely, if a(n) = 0, we cannot conclude that n is prime as the example n = 35 shows, but this is probably the only exception.
Of the first 32,000 terms, approximately 88% are less than 0, 11% are equal to 0, and 1% are greater than 0. A368458 gives the indices for which a(n) is positive, and A368459 those for which a(n) is negative.
It appears that a(p^2) = p - 1 (A006093) for all prime p, following the observation by Knuth that apparently A368207(p^2) = (p^2 + 3*p)/2.

Crossrefs

Programs

  • Julia
    using Nemo
    A368457(n) = 2 * (A368207(n) - divisor_sigma(n, 1)) + n + 1
    println([A368457(n) for n in 1:63])
  • Mathematica
    t[n_]:=t[n]=Select[Divisors[n], #^2<=n&];
    A368207[n_]:=Sum[(1+Boole[d^2A368457[n_]:=2(A368207[n]-DivisorSigma[1,n])+n+1;
    Array[A368457, 100] (* Paolo Xausa, Jan 02 2024 *)

A368458 Numbers k such that 2*(Bacher(k) - sigma(k)) + k + 1 > 0.

Original entry on oeis.org

1, 2, 4, 9, 25, 49, 121, 143, 169, 221, 289, 323, 361, 391, 437, 529, 667, 713, 841, 899, 961, 1073, 1147, 1271, 1333, 1369, 1517, 1591, 1681, 1739, 1763, 1849, 1927, 2021, 2173, 2209, 2279, 2491, 2537, 2773, 2809, 2867, 3127, 3233, 3481, 3551, 3599, 3721, 3763
Offset: 1

Views

Author

Peter Luschny, Dec 26 2023

Keywords

Comments

We can use the Bacher numbers A368207 to measure the primeness of a positive integer, similar to how the number of prime factors of an integer does, but based on the number of representations of n as w*x + y*z with max(w, x) < min(y, z). Taking b(n) = 2*(Bacher(n) - sigma(n)) + n + 1 as the measure, Bacher's theorem shows that b(n) = 0 if n is an odd prime. Conversely, if b(n) = 0, we cannot conclude that n is prime as the example n = 35 shows, but this is probably the only exception.
This sequence gives the integers k for which b(k) is positive, and A368459 provides those for which b(k) is negative.
Apart from the first three terms, all terms are apparently odd semiprimes (A046315); they are odd composite numbers that cannot be divided by smaller composite numbers.

Examples

			To zoom into the internal order of the terms, the sequence can also be written as an irregular triangle (for n >= 3). It starts:
      4;
      9;
     25;
     49;
    121,  143;
    169,  221;
    289,  323;
    361,  391, 437;
    529,  667, 713;
    841,  899;
    961, 1073, 1147, 1271, 1333;
   1369, 1517, 1591;
   1681, 1739, 1763,
   1849, 1927, 2021, 2173;
A row contains the terms between consecutive squares of primes, p^2 included and p'^2 excluded. The first column is the squares of primes A001248. The length of the rows is A368460.
		

Crossrefs

Programs

  • Julia
    using Nemo
    function A368458List(slicenum::Int)
        results = [Int[] for _ in 1:slicenum + 1]
        slicelen = 1000
        Threads.@threads for sl in 1:slicenum
            first = (sl - 1) * slicelen + 1
            last = first + slicelen - 1
            result = results[sl]
            for n in first:2:last
                rem(n, 5) == 0 && continue
                if 2 * (divisor_sigma(n, 1) - A368207(n)) < n + 1
                    push!(result, n)
        end end end
        results[slicenum + 1] = [2, 4, 25]
        sort(reduce(vcat, results))
    end
    print(A368458List(5)) # returns values up to param * 1000
  • SageMath
    from itertools import islice
    def A368207(n):
        def t(n): return (d for d in divisors(n) if d*d <= n)
        def s(d): return 2*d - 1 if d*d == n else 4*d - 2
        def c(y, w, wx): return max(1, 2*((w*w < wx) + (y*y < n - wx)))
        return sum((sum(sum((c(y, w, wx) for y in t(n-wx) if wx < y*w), start=0)
        for w in t(wx)) for wx in range(1, n//2)),
        start=sum(s(d) for d in t(n)))
    def A368457(n): return 2 * (A368207(n) - sigma(n)) + n + 1
    def isA368458(n): return 0 < A368457(n)
    def A368458Gen(n):
        while True:
            if isA368458(n): yield n
            n += 1
    def A368458List(start, size): return list(islice(A368458Gen(start), size))
    print(A368458List(1, 20))
    

Formula

k is a term <=> A368457(k) > 0 <=> 2*(A368207(k) - A000203(k)) + k + 1 > 0.
Showing 1-4 of 4 results.