[go: up one dir, main page]

login
A077692
Smallest triangular number which begins with the concatenation of first n natural numbers.
3
1, 120, 123256, 1234806, 123457041, 12345625545, 12345671807241, 123456781852386, 123456789378124021, 12345678910482682485, 123456789101100044904153, 1234567891011124675039766878
OFFSET
1,2
EXAMPLE
a(4) = 12342996, begins with 1234.
MATHEMATICA
t=x={1}; i=4; Do[x=Append[x, n]; While[Take[IntegerDigits[y=i*(i+1)/2], Length[x]]!=x, i++]; AppendTo[t, y], {n, 2, 7}]; t (* Jayanta Basu, May 22 2013 *)
PROG
(PARI) {rT(m) = ceil((sqrt(8*m+1)-1)/2)} {len10(m) = ceil(log(m+1)/log(10))} {T(n) = (n*(n+1))/2} m=0; for(n=1, 20, m=m*10^len10(n)+n; for(k=0, 10^6, t=rT(m*10^k); if(T(t)<(m+1)*10^k, print1(" ", T(t)); break))) (Alekseyev)
CROSSREFS
Sequence in context: A159735 A157879 A008978 * A322917 A184127 A068296
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 18 2002
EXTENSIONS
Corrected and extended by Max Alekseyev, Feb 15 2005
STATUS
approved