%I #72 Jan 01 2024 08:01:47
%S 1,3,9,26,82,259,817,2583,8166,25821,81650,258200,816497,2581990,
%T 8164966,25819890,81649659,258198890,816496582,2581988898,8164965810,
%U 25819888975,81649658093,258198889748,816496580928,2581988897472,8164965809278,25819888974717,81649658092773
%N Index of smallest pentagonal number with n digits.
%C The digits of the odd- and even-indexed terms converge to those in the decimal expansions of sqrt(2/3) and sqrt(20/3), respectively.
%F a(n) = ceiling((sqrt(24*10^(n-1) + 1) + 1)/6).
%e 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).
%t a[n_] := Ceiling[(Sqrt[24*10^(n-1) + 1] + 1)/6]; Array[a, 40] (* _Amiram Eldar_, Dec 30 2023 *)
%o (PARI) a(n) = 1 + (sqrtint(24*10^(n-1)) + 1)\6 \\ _Andrew Howroyd_, Dec 30 2023
%Y Cf. A000326, A180447.
%Y Cf. A068092 (for triangular numbers), A017936 (for squares).
%Y Cf. A157697 (square root of 2/3), A020772 (square root of 20/3)
%K nonn,easy,base
%O 1,2
%A _Kelvin Voskuijl_, Dec 17 2023