login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077507 Largest n-digit triangular number beginning with n. 1

%I #9 Jan 28 2021 10:14:05

%S 1,28,378,4950,59685,699153,7998000,89987820,999961560,1099969156,

%T 11999870821,129999769851,1399999074540,14999999588925,

%U 159999994275696,1699999973850921,17999999979109470,189999999508759300,1999999999000000000,20999999994116393253

%N Largest n-digit triangular number beginning with n.

%o (Python)

%o from sympy import integer_nthroot

%o def a(n):

%o target = 2 * int(str(n) + '9'*(n-len(str(n))))

%o r, exact = integer_nthroot(target, 2)

%o while (r-1)*r//2 <= target//2: r += 1

%o return (r-2)*(r-1)//2

%o print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, Jan 28 2021

%Y Cf. A000217, A077506 (smallest).

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Nov 08 2002

%E More terms from _Sascha Kurz_, Jan 04 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)