login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Values of k for which A374966(k) = 0.
2

%I #13 Aug 01 2024 09:18:44

%S 0,3,9,15,21,22,30,33,46,47,51,60,63,69,70,72,90,97,98,105,123,125,

%T 129,142,147,153,159,180,182,183,195,199,213,214,219,222,253,259,261,

%U 262,270,276,287,297,298,300,309,321,327,330,342,369,370,375,381,385,393,401,402,429,430,431,432,441

%N Values of k for which A374966(k) = 0.

%C It seems that this sequence grows linearly but this is unproven.

%H Michael De Vlieger, <a href="/A375060/b375060.txt">Table of n, a(n) for n = 1..10000</a>

%F A374966(a(n)) = 0.

%F a(n) ~ c*n, empirically, with c = 7.42...

%e 21 is a term; A374966(11) = 21 and by the defintion of A374966, A374966(21) = 0.

%t nn = 2^20; c[_] := False; j = 0; c[0] = True; {j}~Join~Reap[Do[If[c[n], k = 0; Sow[n], k = j + n]; Set[{c[k], j}, {True, k}], {n, nn}] ][[-1, 1]] (* _Michael De Vlieger_, Jul 29 2024 *)

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o seen, an = {0}, 0

%o for n in count(1):

%o if an == 0: yield n-1

%o an = 0 if n in seen else an + n

%o seen.add(an)

%o print(list(islice(agen(), 64))) # _Michael S. Branicky_, Jul 29 2024

%Y Cf. A374966.

%K nonn,easy

%O 1,2

%A _Bryle Morga_, Jul 29 2024