OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..124340
MATHEMATICA
a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; Table[k = 3 n;
While[a@ k >= a@ n, k--]; k, {n, 96}] (* Michael De Vlieger, Oct 13 2015 *)
PROG
(PARI)
allocatemem((2^31)+(2^30));
uplim2 = 36756720; \\ = A002182(53).
uplim3 = 32432400; \\ = A002182(52). Really just some Ad Hoc value smaller than above.
v155043 = vector(uplim1);
v155043[1] = 1; v155043[2] = 1;
for(i=3, uplim1, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%1048576), print1(i, ", ")));
A155043 = n -> if(!n, n, v155043[n]);
maxlen = 0; for(i=1, uplim2, len = v155043[i]; vother[len] = i; maxlen = max(maxlen, len); if(!(i%1048576), print1(i, ", "))); \\ First it will be A262503.
print("uplim2=", uplim2, " uplim3=", uplim3, " maxlen=", maxlen);
\\ Then we convert it to A263082:
m = 0; for(i=1, maxlen, m = max(m, vother[i]); vother[i] = m; if(!(i%1048576), print1(i, ", ")));
A263082 = n -> if(!n, n, vother[n]);
\\ Finally we can compute A263077:
for(i=1, uplim3, write("b263077.txt", i, " ", A263077(i)); );
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 09 2015
STATUS
approved