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.

User: Matthew McMullen

Matthew McMullen's wiki page.

Matthew McMullen has authored 3 sequences.

A374958 Median, as a function of n, of the probability mass function s(k-1,n-1)/k!, where k>=n and s(a,b) denotes the unsigned Stirling number of the first kind.

Original entry on oeis.org

2, 7, 21, 57, 157, 430, 1173, 3199, 8717
Offset: 2

Author

Matthew McMullen, Aug 05 2024

Keywords

Comments

This probability mass function occurs in the statistics of records, specifically, it is the probability that the n-th record is set on the k-th race.
The ratio of successive terms seems to be converging to e.

References

  • M. Ahsanullah and V. B. Nevzorov, Records via Probability Theory, Atlantis Press, 2015.

Crossrefs

Cf. A094638.

Programs

  • Mathematica
    Solve[Sum[Abs[StirlingS1[k-1,n-1]]/k!,{k,n,x}]>=.5 && x>=n, x, Integers]
  • PARI
    a(n)=my(s=0); for(x=n, oo, s+=abs(stirling(x-1,n-1,1))/x!; if(2*s >= 1, return(x))) \\ Andrew Howroyd, Aug 09 2024

Extensions

a(9)-a(10) from Sean A. Irvine, Aug 26 2024

A268631 Number of ordered pairs (a,b) of positive integers less than n with the property that n divides ab.

Original entry on oeis.org

0, 0, 0, 1, 0, 4, 0, 5, 4, 8, 0, 17, 0, 12, 16, 17, 0, 28, 0, 33, 24, 20, 0, 53, 16, 24, 28, 49, 0, 76, 0, 49, 40, 32, 48, 97, 0, 36, 48, 101, 0, 112, 0, 81, 100, 44, 0, 145, 36, 96, 64, 97, 0, 136, 80, 149, 72, 56, 0, 241, 0, 60, 148, 129, 96, 184, 0, 129, 88, 212
Offset: 1

Author

Matthew McMullen, Feb 09 2016

Keywords

Comments

a(n)=0 iff n is prime or 1. a(n) is odd iff n is a multiple of 4.

Examples

			For n=10 the a(10)=8 ordered pairs are (2,5), (5,2), (4,5), (5,4), (5,6), (6,5), (5,8), and (8,5).
		

Crossrefs

Cf. A006579.

Programs

  • Mathematica
    a[n_] := Sum[Sum[1, {i, Divisors[n*k]}] - 2*Sum[1, {i, TakeWhile[Divisors[n*k], # <= k &]}], {k, 1, n - 1}]
  • PARI
    a(n) = sum(k=1, n-1, sumdiv(n*k, d, (d > k) && (d < n))); \\ Michel Marcus, Feb 09 2016
    
  • Python
    from math import prod
    from sympy import factorint
    def A268631(n): return 1 - 2*n + prod(p**(e-1)*((p-1)*e+p) for p, e in factorint(n).items()) # Chai Wah Wu, May 15 2022

Formula

a(n) = Sum_{k=1..n-1} (number of divisors of nk that are between k and n, exclusive).
a(n) = Sum_{k=1..n-1} (number of divisors of nk - 2*(number of divisors of nk that are <= k)).
a(n) = A006579(n) - (n-1). - Michel Marcus, Feb 09 2016
a(p^k) = (p(k-1)-k)*p^(k-1)+1 for prime p. - Chai Wah Wu, May 15 2022

A154429 a(n) is the least k such that the greedy algorithm (for Egyptian fractions) on 4k/(24n+1) terminates in at most three steps.

Original entry on oeis.org

2, 2, 2, 5, 3, 4, 13, 2, 2, 7, 5, 51, 4, 4, 5, 2, 3, 5, 5, 7, 5, 6, 2, 5, 11, 4, 3, 5, 5, 2, 2, 7, 4, 5, 29, 2, 2, 2, 5, 8, 4, 11, 2, 2, 6, 4, 11, 5, 3, 11, 2, 5, 5, 5, 7, 4, 37, 2, 3, 3, 4, 7, 5, 5, 2, 2, 17, 5, 5, 54, 2, 2, 2, 5, 7, 4, 11, 2, 2, 6, 5, 3, 4, 5, 10, 2, 7, 5, 5, 7, 5, 12, 2, 3, 10, 4, 7, 5, 5, 2
Offset: 1

Author

Matthew McMullen (mmcmullen(AT)otterbein.edu), Jan 09 2009

Keywords

Examples

			For n=3, the Greedy Algorithm gives 8/73=1/10+1/105+1/15330
		

References

  • J. Steuding, Diophantine Analysis, Chapman & Hall/CRC, 2005, pp. 39-40, 50.

Programs

  • Mathematica
    GreedyPart[q_Integer] := 0;
    GreedyPart[Rational[1, y_]] := 0;
    GreedyPart[q_Rational] := q - If[q < 0 || q > 1, Floor[q], Rational[1, 1 + Quotient[1, q]]];
    SubtractShifted[l_] := Drop[l, -2] - Take[l, {2, -2}];
    EgyptGreedy[q_] := SubtractShifted[FixedPointList[GreedyPart, q]];
    terms := 200;
    For[i = 25, i <= 24*terms + 1, i = i + 24,k = 2;While[Length[EgyptGreedy[4k/i]]> 3, k++ ];Print[k]]

Extensions

More terms from Seiichi Manyama, Sep 21 2022