login
A390937
Number of entries in the map T after the n-th iteration, when initially T[1] = 1 is the only entry, and in subsequent iterations, T[v] := k + (T[v] if defined else 0) for each key-value pair (k, v) in the map.
2
1, 1, 2, 2, 3, 3, 4, 5, 7, 8, 12, 14, 17, 19, 23, 26, 29, 35, 40, 46, 50, 59, 67, 76, 86, 96, 105, 117, 127, 139, 151, 164, 177, 191, 204, 218, 230, 245, 258, 273, 287, 303, 317, 333, 347, 363, 377, 393, 407, 423, 437, 453, 467, 483, 497, 513, 527, 543, 557, 573, 587, 603, 617, 633, 647, 663
OFFSET
0,3
COMMENTS
Partial sums of A390938 = number of new entries inserted at iteration n.
FORMULA
a(n) = Sum_{k=0..n} A390938(k).
EXAMPLE
At the 8th iteration, two new entries T[16] and T[12] are inserted in addition to the five existing entries T[k = 1, 2, 4, 8 and 10]. Hence a(8) = 5 + 2 = 7.
See A390939 for more examples.
PROG
(Python)
def A390937(n):
if not hasattr(A := A390937, 'terms'): A.terms=[1]
while len(A.terms) <= n:
A.terms += [A.terms[-1] + A390938(len(A.terms))]
return A.terms[n]
CROSSREFS
Cf. A390938 (first differences), A390939 (main entry for all related sequences).
Sequence in context: A367399 A113788 A018243 * A127207 A173513 A367693
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 24 2025
STATUS
approved