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.

A338021 Number of partitions of n into two parts (s,t) such that s <= t and t | s*n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Oct 06 2020

Keywords

Examples

			a(6) = 2; The partitions of 6 into 2 parts are (1,5), (2,4) and (3,3). Since 4 | 2*6 = 12 and 3 | 3*6 = 18, we have two such partitions.
		

Crossrefs

Cf. also A337101, A338117.

Programs

Formula

a(n) = Sum_{i=1..floor(n/2)} (1 - ceiling(n*i/(n-i)) + floor(n*i/(n-i))).

Extensions

Data section extended up to 105 terms by Antti Karttunen, Dec 12 2021

A337945 Numbers m with a solution (s,t,k) such that s^2 + t^2 = k*m, s + t = m, 1 <= s <= t and 1 <= k <= m - 1.

Original entry on oeis.org

2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 25, 26, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 45, 46, 48, 49, 50, 52, 54, 56, 58, 60, 62, 63, 64, 66, 68, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 99, 100, 102, 104, 106, 108, 110, 112, 114, 116, 117, 118, 120
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 01 2020

Keywords

Examples

			8 is in the sequence since it has the solutions (s,t,k) = (4,4,4) and (2,6,5) such that s^2 + t^2 = k*m, s + t = m, 1 <= s <= t and 1 <= k <= m - 1.
9 is in the sequence since it has the solution (s,t,k) = (3,6,5) such that s^2 + t^2 = k*m, s + t = m, 1 <= s <= t and 1 <= k <= m - 1.
		

Crossrefs

Programs

  • Maple
    # Quite inefficient compared to the conjectured formula.
    KD := (n, k) -> Physics:-KroneckerDelta[n, k]:
    S := k -> local i, j; add(add(KD((i^2 + (k - i)^2)/j , k), j = 1..k-1),
    i = 1..floor(k/2)): select(k -> S(k) > 0, [seq(k, k = 1..40)]); # Peter Luschny, Jun 08 2023
  • Mathematica
    Table[If[Sum[Sum[KroneckerDelta[(i^2 + (n - i)^2)/k, n], {k, n - 1}], {i, Floor[n/2]}] > 0, n, {}], {n, 120}] // Flatten

Formula

k is a term <=> Sum_{i=1..floor(k/2)} Sum_{j=1..k-1} KroneckerDelta((i^2 + (k - i)^2)/j, k) > 0.
Conjecture: k is a term <=> k * Clausen(k, 1) <> 2 * Clausen(k, 0), (Clausen = A160014). In other words: k is in this sequence iff it is not an odd squarefree number. - Peter Luschny, Jun 08 2023

A338117 Number of partitions of n into two parts (s,t) such that (t-s) | n, where s < t.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Oct 10 2020

Keywords

Comments

Apparently a(n) = A320111(n) - 1. - Hugo Pfoertner, Oct 30 2020
The above observation is true, which can be seen from the formula A320111(2n) = A000005(n), A320111(2n+1) = A000005(2n+1). For odd numbers, the difference (t-s) may range over all the divisors of n except the n itself, and for even numbers the difference (t-s) [which is always even] may range only over the even divisors of n, except the n itself. Note that A000005(2n) = A000005(n) + A001227(n). - Antti Karttunen, Dec 12 2021

Examples

			a(8) = 2; The partitions of 8 into two parts (s,t) such that s < t are (7,1), (6,2), (5,3) and (4,4). Only the partitions (6,2) and (5,3) have (6-2) | 8 and (5-3) | 8, so a(8) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(1 - Ceiling[n/(n - 2 i)] + Floor[n/(n - 2 i)]), {i, Floor[(n - 1)/2]}], {n, 100}]
  • PARI
    for(n=1,85,my(j=0);forpart(x=n,if(#x==2,if(x[2]!=x[1]&&!(n%(x[2]-x[1])),j++)));print1(j,", ")) \\ Hugo Pfoertner, Oct 30 2020
    
  • PARI
    A338117(n) = sum(s=1,(n-1)\2,!(n%(n-(2*s)))); \\ Antti Karttunen, Dec 12 2021

Formula

a(n) = Sum_{i=1..floor((n-1)/2)} (1 - ceiling(n/(n-2*i)) + floor(n/(n-2*i))).

A337102 Number of partitions of n into two positive integer parts (s,t), s<=t, such that the harmonic mean of the smallest and largest part is not an integer.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 2, 3, 4, 5, 5, 6, 6, 7, 6, 8, 6, 9, 9, 10, 10, 11, 10, 10, 12, 12, 13, 14, 14, 15, 12, 16, 16, 17, 15, 18, 18, 19, 18, 20, 20, 21, 21, 21, 22, 23, 22, 21, 20, 25, 25, 26, 24, 27, 26, 28, 28, 29, 29, 30, 30, 30, 28, 32, 32, 33, 33, 34, 34, 35, 30, 36, 36, 35, 37, 38, 38
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 15 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Ceiling[2*i*(n - i)/n] - Floor[2*i*(n - i)/n], {i, Floor[n/2]}], {n, 100}]

Formula

a(n) = Sum_{i=1..floor(n/2)} (ceiling(2*i*(n-i)/n) - floor(2*i*(n-i)/n)).
a(n) = A004526(n) - A337101(n).
Showing 1-4 of 4 results.