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.

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))).