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.

Showing 1-3 of 3 results.

A362551 a(0)=0. For each digit d in the sequence, append the smallest unused integer such that its last digit equals d.

Original entry on oeis.org

0, 10, 1, 20, 11, 2, 30, 21, 31, 12, 3, 40, 22, 41, 13, 51, 61, 32, 23, 4, 50, 42, 52, 14, 71, 81, 33, 5, 91, 6, 101, 43, 62, 72, 53, 24, 15, 60, 34, 82, 25, 92, 111, 44, 7, 121, 8, 131, 63, 73, 35, 9, 141, 16, 151, 70, 161, 54, 83, 26, 102, 17, 112, 45, 93
Offset: 0

Views

Author

Gavin Lupo, Apr 24 2023

Keywords

Comments

This sequence is a permutation of the nonnegative integers.

Examples

			a(0) =  0
a(1) = 10 (d=0 from a(0)=0, smallest integer other than 0 that ends with 0).
a(2) =  1 (d=1 from a(1)=10, smallest integer that ends with a 1).
a(3) = 20 (d=0 from a(1)=10, smallest integer other than 0 and 10 that ends with 0).
a(4) = 11 (d=1 from a(2)=1, smallest integer other than 1 that ends with 1).
a(5) =  2 (d=2 from a(3)=20, smallest integer that ends with 2).
a(6) = 30 (d=0 from a(3)=20, smallest integer other than 0, 10, and 20 that ends with 0).
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s, lastd = "0", [(k for k in count(i, 10)) for i in range(10)]
        for n in count(0):
            an = next(lastd[int(s[0])])
            s = s[1:] + str(an)
            yield an
    print(list(islice(agen(), 65))) # Michael S. Branicky, Apr 25 2023

A362896 a(0)=2. For n>0, let d = n-th digit in the sequence thus far. a(n) = a(n-1) + d if d is even. Otherwise, a(n) = a(n-1) - d.

Original entry on oeis.org

2, 4, 8, 16, 15, 21, 20, 15, 17, 16, 18, 18, 17, 12, 11, 4, 3, 9, 8, 16, 15, 23, 22, 15, 14, 16, 15, 14, 18, 15, 6, 14, 13, 19, 18, 13, 15, 12, 14, 16, 15, 10, 9, 13, 12, 18, 17, 12, 11, 15, 14, 22, 21, 16, 22, 21, 25, 24, 21, 20, 11, 10, 18, 17, 14, 13, 8, 7
Offset: 0

Views

Author

Gavin Lupo, May 09 2023

Keywords

Comments

"-" signs on negative values are ignored when determining the n-th digit.

Examples

			a(0) =  2.
a(1) =  4. 1st digit is 2, which is even. 2 + 2 = 4.
a(2) =  8. 2nd digit is 4, which is even. 4 + 4 = 8.
a(3) = 16. 3rd digit is 8, which is even. 8 + 8 = 16.
a(4) = 15. 4th digit is 1, which is odd.  16 - 1 = 15.
a(5) = 21. 5th digit is 6, which is even. 15 + 6 = 21.
		

Crossrefs

Programs

  • Python
    a = [2]
    split = []
    for i in range(100):
        split += [int(j) for j in str(abs(a[i]))]
        if split[i] % 2 == 0:
            a.append((a[i] + split[i]))
        else:
            a.append((a[i] - split[i]))
    print(a)

A384632 a(0)=0. For each digit d in the sequence, let a(n) equal the smallest unused integer which has at least d divisors.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 5, 7, 16, 24, 8, 18, 9, 10, 30, 11, 36, 48, 13, 14, 15, 17, 19, 20, 21, 28, 22, 40, 23, 25, 26, 27, 29, 32, 31, 42, 33, 60, 34, 35, 37, 38, 39, 54, 41, 43, 44, 45, 46, 49, 47, 50, 51, 52, 53, 56, 55, 72, 57, 58, 62, 59, 63, 61, 64, 65
Offset: 0

Views

Author

Gavin Lupo, Jun 05 2025

Keywords

Examples

			a(0) = 0.
a(1) = Smallest unused integer with at least 0 divisors = 1.
a(2) = Smallest unused integer with at least 1 divisor = 2.
a(3) = Smallest unused integer with at least 2 divisors = 3.
a(4) = Smallest unused integer with at least 3 divisors = 4.
a(5) = Smallest unused integer with at least 4 divisors = 6.
a(6) = Smallest unused integer with at least 6 divisors = 12.
a(7) = Smallest unused integer with at least 1 divisor = 5.
a(8) = Smallest unused integer with at least 2 divisors = 7.
		

Crossrefs

Programs

  • Python
    from sympy import divisor_count
    a = [0]
    for n in range(100):
        if a[n] >= 10:
            split = [int(d) for d in str(a[n])]
        else:
            split = [a[n]]
        for s in split:
            num = 1
            while True:
                if divisor_count(num) >= s and num not in a:
                    a.append(num)
                    break
                num += 1
    print(a)
Showing 1-3 of 3 results.