login
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

%I #7 Nov 30 2025 21:44:01

%S 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,

%T 105,117,127,139,151,164,177,191,204,218,230,245,258,273,287,303,317,

%U 333,347,363,377,393,407,423,437,453,467,483,497,513,527,543,557,573,587,603,617,633,647,663

%N 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.

%C Partial sums of A390938 = number of new entries inserted at iteration n.

%F a(n) = Sum_{k=0..n} A390938(k).

%e 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.

%e See A390939 for more examples.

%o (Python)

%o def A390937(n):

%o if not hasattr(A := A390937, 'terms'): A.terms=[1]

%o while len(A.terms) <= n:

%o A.terms += [A.terms[-1] + A390938(len(A.terms))]

%o return A.terms[n]

%Y Cf. A390938 (first differences), A390939 (main entry for all related sequences).

%K nonn

%O 0,3

%A _M. F. Hasler_, Nov 24 2025