Ruud H.G. van Tol on Mon, 25 May 2026 18:38:47 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

numdiv records



oeis:A00218 lists numdiv-records:

first(nn)= {
  my(n=0, r=0, s=1, t);
  vector
  ( nn
  , i
  , while( (t=numdiv(n+=s)) <= r, );
    2==s || n<10 || s=2;
    r=t
  );
}

How to do this more efficiently?

https://oeis.org/A002183 has a b-file of 10k values,
but first(60) already takes over a minute.

See also https://wwwhomes.uni-bielefeld.de/achim/HCN/

-- Ruud