OFFSET
0,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10341
MATHEMATICA
nMax = 122; seq0 = {0}; seq = {1}; K = 1; While[seq != seq0, Print["K = ", K]; NN = K*nMax; Clear[A, B, S]; S[_] = 0; For[n = NN + 1, n <= 2*NN, n++, k = n - DivisorSigma[0, n]; If[k <= NN, S[k] = S[k] + 1; B[k] = n]]; For[n = NN, n >= 3, n--, If[S[n] >= 1, k = n - DivisorSigma[0, n]; S[k] = S[k] + 1; B[k] = n]]; A[0] = 0; A[1] = 2; For[n = 2, True, n++, b = B[A[n - 1]]; If[b > NN || S[b] > 1, Break[]]; A[n] = b]; Clear[a0]; a0[_] = 0; Do[n = x - DivisorSigma[0, x]; a0[n]++, {x, 1, NN}]; a[n_] := a0[A[n]]; seq0 = seq; seq = Table[a[n], {n, 0, nMax}]; K = 2K]; A262891 = seq (* Jean-François Alcover, Nov 16 2016, after Robert Israel for A259934 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 04 2015
STATUS
approved