OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..100
Eric Weisstein's World of Mathematics, Triangular Number
Index entries for linear recurrences with constant coefficients, signature (0,10).
FORMULA
From Bernard Schott, Mar 04 2019: (Start)
for n odd >= 5, a(n) = 2 * 10^((n+1)/2),
for n even >= 6, a(n) = 10^((n+2)/2).
(End)
From Colin Barker, Mar 25 2020: (Start)
G.f.: x^2*(24 + 200*x + 535*x^2 + 2250*x^4) / (1 - 10*x^2).
a(n) = 10*a(n-2) for n>4.
(End)
EXAMPLE
From Bernard Schott, Mar 04 2019: (Start)
a(2) = 24: T(24) = 300 which contains exactly two 0's.
a(6) = 10000: T(10000) = 50005000 which contains exactly six 0's.
a(7) = 20000: T(20000) = 200010000 which contains exactly seven 0's.
(End)
MATHEMATICA
nsmall = Table[Infinity, 20];
For[i = 0, i <= 10^6, i++, p = PolygonalNumber[i];
n0 = Count[IntegerDigits[p], 0];
If[nsmall[[n0]] > i, nsmall[[n0]] = i]];
ReplaceAll[nsmall, Infinity -> "?"] (* Robert Price, Mar 22 2020 *)
LinearRecurrence[{0, 10}, {0, 24, 200, 775, 2000, 10000}, 30] (* Harvey P. Dale, Jul 26 2024 *)
PROG
(PARI) Vec(x^2*(24 + 200*x + 535*x^2 + 2250*x^4) / (1 - 10*x^2) + O(x^30)) \\ Colin Barker, Mar 25 2020
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Mar 15 1999
EXTENSIONS
a(16)-a(19) from Lars Blomberg, May 13 2011
a(20)-a(26) from Chai Wah Wu, Mar 04 2019
STATUS
approved