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-2 of 2 results.

A104759 Concatenation of digits of natural numbers from n down to 1.

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 1987654321, 1987654321, 101987654321, 1101987654321, 11101987654321, 211101987654321, 1211101987654321, 31211101987654321, 131211101987654321, 4131211101987654321, 14131211101987654321, 514131211101987654321
Offset: 1

Views

Author

Alexandre Wajnberg & Juliette Bruyndonckx, Apr 23 2005

Keywords

Examples

			a(11) = a(10) because no number may begin with 0.
a(9)= [123456789]101112131415...=987654321
a(10)=[1234567891]01112131415...=1987654321
a(11)=[12345678910]1112131415...=01987654321=1987654321
a(12)=[123456789101]112131415...=101987654321
a(13)=[1234567891011]12131415...=1101987654321
a(14)=[12345678910111]2131415...=11101987654321
a(15)=[123456789101112]131415...=211101987654321
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{t = Reverse@ Flatten@ IntegerDigits@ Range@ n, k}, Reap@ For[k = 1, k <= Length@ t, k++, Sow[FromDigits@ Take[t, -k]]] // Flatten // Rest]; f@ 14 (* Michael De Vlieger, Mar 23 2015 *)
    lst = {}; Do[lst = Join[lst, IntegerDigits[n]], {n, 1, 100}]; Table[FromDigits[Reverse[lst[[Range[1, n]]]]], {n, 1, Length[lst]}] (* Robert Price, Mar 24 2015 *)

Formula

a(n) = A138793(n) mod 10^(n-1). - R. J. Mathar, Sep 17 2011

A060555 String together the first n numbers in an order which minimizes the result.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 10123456789, 1011123456789, 101111223456789, 10111121323456789, 1011112131423456789, 101111213141523456789, 10111121314151623456789
Offset: 1

Views

Author

Henry Bottomley, Apr 02 2001

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        slst = []
        for n in count(1):
            s, least, argleast = str(n), ":", None
            for i in range(len(slst)+1):
                t = "".join(slst[:i]) + s + "".join(slst[i:])
                if t < least: least, argleast = t, i
            slst.insert(argleast, s)
            yield int("".join(slst))
    print(list(islice(agen(), 16))) # Michael S. Branicky, Nov 29 2022

Extensions

Incorrect comment removed by Sean A. Irvine, Nov 30 2022
Showing 1-2 of 2 results.