A368088 Index of smallest pentagonal number with n digits.
1, 3, 9, 26, 82, 259, 817, 2583, 8166, 25821, 81650, 258200, 816497, 2581990, 8164966, 25819890, 81649659, 258198890, 816496582, 2581988898, 8164965810, 25819888975, 81649658093, 258198889748, 816496580928, 2581988897472, 8164965809278, 25819888974717, 81649658092773
Offset: 1
Examples
a(4) = 26 as the 26th pentagonal number is 26*(3*26-1)/2 = 1001 which has 4 digits (while the 25th is 925 which is only 3).
Crossrefs
Programs
-
Mathematica
a[n_] := Ceiling[(Sqrt[24*10^(n-1) + 1] + 1)/6]; Array[a, 40] (* Amiram Eldar, Dec 30 2023 *)
-
PARI
a(n) = 1 + (sqrtint(24*10^(n-1)) + 1)\6 \\ Andrew Howroyd, Dec 30 2023
Formula
a(n) = ceiling((sqrt(24*10^(n-1) + 1) + 1)/6).
Comments