

A279610


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


3



1, 12, 234, 4567, 7891011, 111213141516, 16171819202122, 2223242526272829, 293031323334353637, 37383940414243444546, 4647484950515253545556, 565758596061626364656667, 67686970717273747576777879, 7980818283848586878889909192
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

A variant of A053067. The first number of the concatenation a(n) is A152947(n) = (n2)*(n1)/2+1 and the last is (n1)*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 nth row of A122797 when seen as a triangle.  Michel Marcus, Dec 17 2016


LINKS



FORMULA

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


EXAMPLE

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.


MATHEMATICA

Table[FromDigits[Flatten[IntegerDigits /@ Range[(n(n  1))/2 + 1, (n(n + 1))/2 + 1 ]]], {n, 0, 20}]


PROG

(Python)
from __future__ import division
return int(''.join(str(d) for d in range((n1)*(n2)//2+1, n*(n1)//2+2))) # Chai Wah Wu, Dec 17 2016


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



