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.

A381732 Proceeding from left to right, between any two consecutive digits (d_i, d_i+1) of an integer k, write down apart the lacking consecutive digits, in increasing order if d_i d_i+1. If abs(d_i - d_i+1) = 0 or 1 no digit is added. Sequence lists integers k that divide such resulting numbers.

Original entry on oeis.org

27, 737, 909, 1845, 1912, 7078, 27412, 90009, 870129, 990099, 6852899, 9090909, 17388261, 70168376, 70787078, 96096078, 96707298, 162533711, 358006673, 737737737, 1050889491, 2238028254, 3281718034, 4249370147, 9009009009, 11819327599, 12178217823, 13851266943, 18768863945
Offset: 1

Views

Author

Paolo P. Lava, Mar 05 2025

Keywords

Comments

These concatenations are part of the sequence:
'737' with itself, if it is not a multiple of 7;
'7078' with itself, if it is not a multiple of 3.

Examples

			27 is a term since between 2 and 7 we have 3456 and 3456 / 27 = 128;
1845 is a term since between 1 and 8 we have 234567, between 8 and 4 765 and between 4 and 5 no digit to be added and 234567765 / 1845 = 127137.
		

Programs

  • Python
    def f(n):
        s, out = list(map(int, str(n))), 0
        for i in range(len(s)-1):
            dir = 1 if s[i+1] - s[i] >= 0 else -1
            for j in range(s[i]+dir, s[i+1], dir):
                out = 10*out + j
        return out
    def ok(n):
        return (v:=f(n)) and v%n == 0
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Mar 06 2025

Extensions

a(19)-a(29) from Michael S. Branicky, Mar 07 2025