OFFSET
1,2
COMMENTS
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.
FORMULA
a(n) = ceiling((sqrt(24*10^(n-1) + 1) + 1)/6).
EXAMPLE
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).
MATHEMATICA
a[n_] := Ceiling[(Sqrt[24*10^(n-1) + 1] + 1)/6]; Array[a, 40] (* Amiram Eldar, Dec 30 2023 *)
PROG
(PARI) a(n) = 1 + (sqrtint(24*10^(n-1)) + 1)\6 \\ Andrew Howroyd, Dec 30 2023
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Kelvin Voskuijl, Dec 17 2023
STATUS
approved