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.

A053067 a(n) is the concatenation of next n numbers (omit leading 0's).

Original entry on oeis.org

1, 23, 456, 78910, 1112131415, 161718192021, 22232425262728, 2930313233343536, 373839404142434445, 46474849505152535455, 5657585960616263646566, 676869707172737475767778, 79808182838485868788899091, 9293949596979899100101102103104105, 106107108109110111112113114115116117118119120
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

Concatenation of the integers from A000124(n-1) up to and including A000217(n). - R. J. Mathar, Aug 30 2013
The second term is a prime. When is the next prime, if there is another? - N. J. A. Sloane, Dec 16 2016

References

  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press 2000.

Crossrefs

A subsequence of A035333. For primes in latter, see A052087.
See A279610 for a variant.

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@Range[(n(n-1))/2+1,(n(n+1))/2]]],{n,20}] (* Harvey P. Dale, Jan 23 2016 *)
  • PARI
    a(n) = my(s = ""); for (i=n*(n-1)/2 + 1, n*(n+1)/2, s = concat(s, Str(i));); eval(s); \\ Michel Marcus, Aug 11 2017
    
  • Python
    def a(n): return int("".join(map(str, range((n-1)*n//2+1, n*(n+1)//2+1))))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Jan 23 2021

Extensions

More terms from James Sellers, Feb 28 2000
More terms from Michel Marcus, Aug 11 2017

A035333 Concatenation of two or more consecutive positive integers.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 123, 234, 345, 456, 567, 678, 789, 910, 1011, 1112, 1213, 1234, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2345, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3456, 3536, 3637, 3738
Offset: 1

Views

Author

Keywords

Crossrefs

For concatenations of exactly k consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).
See also A007908 for concatenation of 1 through n.
For primes see A052087.
All of A007908, A052087, A053067, A279610 are subsequences.

Programs

  • Python
    import heapq
    from itertools import islice
    def agen():
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield v
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 47))) # Michael S. Branicky, Dec 23 2021

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
Corrected by Paul Tek, Jun 08 2013
Showing 1-2 of 2 results.