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.

A112275 Smallest number greater than n having at least as many divisors as n.

This page as a plain text file.
%I A112275 #13 Dec 15 2021 09:21:17
%S A112275 2,3,4,6,6,8,8,10,10,12,12,18,14,15,16,18,18,20,20,24,22,24,24,30,26,
%T A112275 27,28,30,30,36,32,36,34,35,36,48,38,39,40,42,42,48,44,45,48,48,48,60,
%U A112275 50,52,52,54,54,56,56,60,58,60,60,72,62,63,64,66,66,70,68,70,70,72,72,84
%N A112275 Smallest number greater than n having at least as many divisors as n.
%C A112275 A000005(n) <= A000005(a(n)) and A000005(k) < A000005(n) for n<k<a(n);
%C A112275 A000005(2*k-1) <= A000005(2*k) for 1<=k<=22. - Corrected by _Robert Israel_, Jul 23 2019
%H A112275 Robert Israel, <a href="/A112275/b112275.txt">Table of n, a(n) for n = 1..10000</a>
%p A112275 N:= 1000: # for all terms before the first term > N
%p A112275 taus:= map(numtheory:-tau,[$1..N]):
%p A112275 for n from 1 to N do
%p A112275 found:= false:
%p A112275 for k from n+1 to N while not found do
%p A112275    if taus[k]>=taus[n] then found:= true; A[n]:= k fi
%p A112275 od;
%p A112275 if not found then break fi
%p A112275 od:
%p A112275 seq(A[i],i=1..n-1); # _Robert Israel_, Jul 23 2019
%t A112275 kmax[n_] := 2 n;
%t A112275 a[n_] := Module[{tau = DivisorSigma[0, n], k},
%t A112275      For[k = n + 1, k <= kmax[n], k++,
%t A112275           If[DivisorSigma[0, k] >= tau, Return[k]]];
%t A112275      Print["a(n) = k not found for n = ", n]];
%t A112275 Array[a, 100] (* _Jean-François Alcover_, Dec 15 2021 *)
%Y A112275 Cf. A079427, A112276.
%Y A112275 Cf. A138171 (odd n for which a(n) > n+1).
%K A112275 nonn
%O A112275 1,1
%A A112275 _Reinhard Zumkeller_, Sep 01 2005