cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A385655 Numbers k >= 0 such that k = digsum(k) + digsum(k+1) + ... + digsum(k+r) for some r >= 0 where digsum(i) is the digital sum of i (A007953).

This page as a plain text file.
%I A385655 #20 Aug 09 2025 10:05:41
%S A385655 0,1,2,3,4,5,6,7,8,9,10,12,17,19,20,22,28,29,34,37,38,46,47,51,56,65,
%T A385655 70,79,88,91,94,95,103,105,106,112,114,118,121,123,130,132,137,141,
%U A385655 150,157,166,175,178,184,192,200,203,205,220,222,235,241,246,260
%N A385655 Numbers k >= 0 such that k = digsum(k) + digsum(k+1) + ... + digsum(k+r) for some r >= 0 where digsum(i) is the digital sum of i (A007953).
%H A385655 Ctibor O. Zizka, <a href="/A385655/a385655.png">Relationship between k and r</a>
%e A385655 For k = 10: 10 = A007953(10) + A007953(11) + A007953(12) + A007953(13) = 10, thus 10 is a term.
%t A385655 q[k_] := Module[{s = 0, m = k}, While[s < k, s += DigitSum[m]; m++]; s == k]; Select[Range[0, 300], q] (* _Amiram Eldar_, Aug 03 2025 *)
%o A385655 (PARI) isok(k) = my(s=sumdigits(k), t=k+1); while (s < k, s+=sumdigits(t); t++); s==k; \\ _Michel Marcus_, Aug 04 2025
%o A385655 (Python)
%o A385655 from itertools import count, islice
%o A385655 def A385655_gen(startvalue=0): # generator of terms >= startvalue
%o A385655     for k in count(max(startvalue,0)):
%o A385655         s, r = 0, k
%o A385655         while s<k:
%o A385655             s += sum(map(int,str(r)))
%o A385655             r += 1
%o A385655         if s==k: yield k
%o A385655 A385655_list = list(islice(A385655_gen(),40)) # _Chai Wah Wu_, Aug 09 2025
%Y A385655 Cf. A007953.
%K A385655 base,nonn
%O A385655 1,3
%A A385655 _Ctibor O. Zizka_, Aug 03 2025