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).

Original entry on oeis.org

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, 70, 79, 88, 91, 94, 95, 103, 105, 106, 112, 114, 118, 121, 123, 130, 132, 137, 141, 150, 157, 166, 175, 178, 184, 192, 200, 203, 205, 220, 222, 235, 241, 246, 260
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 03 2025

Keywords

Examples

			For k = 10: 10 = A007953(10) + A007953(11) + A007953(12) + A007953(13) = 10, thus 10 is a term.
		

Crossrefs

Cf. A007953.

Programs

  • Mathematica
    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 *)
  • PARI
    isok(k) = my(s=sumdigits(k), t=k+1); while (s < k, s+=sumdigits(t); t++); s==k; \\ Michel Marcus, Aug 04 2025
    
  • Python
    from itertools import count, islice
    def A385655_gen(startvalue=0): # generator of terms >= startvalue
        for k in count(max(startvalue,0)):
            s, r = 0, k
            while sA385655_list = list(islice(A385655_gen(),40)) # Chai Wah Wu, Aug 09 2025