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.

A078258 a(n) = numerator(N), where N = 0.123...n (concatenation of 1 to n after decimal point).

Original entry on oeis.org

1, 3, 123, 617, 2469, 1929, 1234567, 6172839, 123456789, 1234567891, 1234567891011, 15432098637639, 12345678910111213, 617283945505560657, 24691357820222426283, 3086419727527803285379, 1234567891011121314151617, 61728394550556065707580859, 12345678910111213141516171819
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Examples

			a(4) = 617 = smallest integer multiple of 0.1234, 617 = 5000*(0.1234).
		

Crossrefs

Cf. A058183, A078257 (denominators).

Programs

  • PARI
    a(n) = {my(s = ""); for (k=1, n, s = concat(s, Str(k))); numerator(eval(s)/10^(#s));} \\ Michel Marcus, Jan 15 2019
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        num, den, pow = 0, 1, 0
        for n in count(1):
            sn = str(n)
            num = num*10**len(sn) + n
            den *= 10**len(sn)
            pow += len(sn)
            nr, c2, c5 = num, pow, pow
            while nr%2 == 0 and c2 > 0: nr //= 2; c2 -= 1
            while nr%5 == 0 and c5 > 0: nr //= 5; c5 -= 1
            yield nr
    print(list(islice(agen(), 19))) # Michael S. Branicky, Nov 30 2022

Formula

a(n) = numerator(Sum_{k=1..n} k/10^A058183(k)). - Stefano Spezia, Nov 30 2022. (This is simply a restatement of the definition.)

Extensions

More terms from Sascha Kurz, Jan 04 2003
More terms from Michel Marcus, Jan 15 2019