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.

A381135 Numbers of the form d_1 d_2 d_3 ... where the sum of their digits multiplied by their digit positions is equal to their number of digits.

Original entry on oeis.org

1, 20, 110, 300, 1010, 2100, 4000, 10010, 12000, 20100, 31000, 50000, 100010, 111000, 200100, 220000, 301000, 410000, 600000, 1000010, 1020000, 1101000, 1300000, 2000100, 2110000, 3001000, 3200000, 4010000, 5100000, 7000000, 10000010, 10110000, 11001000, 12100000
Offset: 1

Views

Author

Leo Crabbe, Feb 14 2025

Keywords

Comments

The digits for these numbers are 1-indexed.
Numbers k such that A156207(k) = A055642(k).

Examples

			301000 is a member of this sequence because it has 3*1 + 1*3 = 6 digits.
		

Crossrefs

Programs

  • PARI
    isok(k) = my(d=digits(k)); sum(i=1, #d, i*d[i]) == #d; \\ Michel Marcus, Feb 17 2025
  • Python
    def ok(n): return sum(int(d)*(i+1) for i, d in enumerate(str(n))) == len(str(n))
    
  • Python
    # see linked program for a different algorithm
    from itertools import count, islice
    from sympy.utilities.iterables import partitions
    def agen(): # generator of terms
        for d in count(1): yield from sorted(int("".join(str(p[k]) if k in p else "0" for k in range(1, d+1))) for p in partitions(d, m=d, k=d) if max(p.values()) < 10 if 1 in p and p[1] != 0)
    print(list(islice(agen(), 34))) # Michael S. Branicky, Feb 19 2025
    

Extensions

More terms from Michel Marcus, Feb 17 2025