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.

A279610 a(n) = concatenate n consecutive integers, starting with the last number of the previous batch.

Original entry on oeis.org

1, 12, 234, 4567, 7891011, 111213141516, 16171819202122, 2223242526272829, 293031323334353637, 37383940414243444546, 4647484950515253545556, 565758596061626364656667, 67686970717273747576777879, 7980818283848586878889909192
Offset: 1

Views

Author

José de Jesús Camacho Medina, Dec 09 2016, and Paolo Iachia, Dec 15 2016

Keywords

Comments

A variant of A053067. The first number of the concatenation a(n) is A152947(n) = (n-2)*(n-1)/2+1 and the last is (n-1)*n/2+1.
The fourth term, 4567, is a prime. When is the next prime, if there is another? - N. J. A. Sloane, Dec 16 2016
a(n) is the concatenation of the terms of the n-th row of A122797 when seen as a triangle. - Michel Marcus, Dec 17 2016

Examples

			a(4) is the concatenation of 4 numbers beginning with the last number (4) that was used to build a(3), so a(4) = 4 5 6 7 = 4567. Then a(5) is the concatenation of 5 numbers beginning with the last number of a(4), which is 7, so a(5) = 7 8 9 10 11 = 7891011. And so on.
For n = 3, n^2/2 - n/2 + 1 = 4; a(3) = 4 + 3*10^1 + 2*10^(1+1) = 234.
		

Crossrefs

A subsequence of A035333. For primes in latter, see A052087.

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits /@ Range[(n(n - 1))/2 + 1, (n(n + 1))/2 + 1 ]]], {n, 0, 20}]
  • Python
    from _future_ import division
    def A279610(n):
        return int(''.join(str(d) for d in range((n-1)*(n-2)//2+1,n*(n-1)//2+2))) # Chai Wah Wu, Dec 17 2016

Formula

a(n) = n^2/2 - n/2 + 1 + Sum{k=1..n-1} ((n^2/2 - n/2 + 1 - k)*10^Sum{j=0..k-1} (floor(1+log_10(n^2/2 - n/2 + 1 - j)))).