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.

A035333 Concatenation of two or more consecutive positive integers.

This page as a plain text file.
%I A035333 #21 Dec 23 2021 07:40:23
%S A035333 12,23,34,45,56,67,78,89,123,234,345,456,567,678,789,910,1011,1112,
%T A035333 1213,1234,1314,1415,1516,1617,1718,1819,1920,2021,2122,2223,2324,
%U A035333 2345,2425,2526,2627,2728,2829,2930,3031,3132,3233,3334,3435,3456,3536,3637,3738
%N A035333 Concatenation of two or more consecutive positive integers.
%H A035333 Paul Tek, <a href="/A035333/b035333.txt">Table of n, a(n) for n = 1..10000</a>
%o A035333 (Python)
%o A035333 import heapq
%o A035333 from itertools import islice
%o A035333 def agen():
%o A035333     c = 12
%o A035333     h = [(c, 1, 2)]
%o A035333     nextcount = 3
%o A035333     while True:
%o A035333         (v, s, l) = heapq.heappop(h)
%o A035333         yield v
%o A035333         if v >= c:
%o A035333             c = int(str(c) + str(nextcount))
%o A035333             heapq.heappush(h, (c, 1, nextcount))
%o A035333             nextcount += 1
%o A035333         l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
%o A035333         heapq.heappush(h, (v, s, l))
%o A035333 print(list(islice(agen(), 47))) # _Michael S. Branicky_, Dec 23 2021
%Y A035333 For concatenations of exactly k consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).
%Y A035333 See also A007908 for concatenation of 1 through n.
%Y A035333 For primes see A052087.
%Y A035333 All of A007908, A052087, A053067, A279610 are subsequences.
%K A035333 easy,nonn,base
%O A035333 1,1
%A A035333 _Erich Friedman_
%E A035333 Edited by _Charles R Greathouse IV_, Apr 28 2010
%E A035333 Corrected by _Paul Tek_, Jun 08 2013