cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A050685 Number of nonzero palindromes < 10^n and containing at least one digit '0'.

This page as a plain text file.
%I A050685 #24 Sep 08 2022 08:44:58
%S A050685 0,0,9,18,189,360,2799,5238,36189,67140,435699,804258,5021289,9238320,
%T A050685 56191599,103144878,615724389,1128303900,6641519499,12154735098,
%U A050685 70773675489,129392615880,746963079399,1364533542918,7822667714589
%N A050685 Number of nonzero palindromes < 10^n and containing at least one digit '0'.
%H A050685 G. C. Greubel, <a href="/A050685/b050685.txt">Table of n, a(n) for n = 1..1000</a>
%H A050685 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,19,-19,-90,90).
%F A050685 G.f.: (9*x^2*(x+1))/((1-x)*(1 - 9*x^2)*(1 - 10*x^2)). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 28 2009
%F A050685 From _G. C. Greubel_, Oct 27 2016: (Start)
%F A050685 a(n) = a(n-1) + 19*a(n-2) - 19*a(n-3) - 90*a(n-4) + 90*a(n-5).
%F A050685 a(n) = (1/(4*sqrt(10)))*( 4*sqrt(10)*(1 + (-1)^n)*(10)^(n/2) + 22*(1 - (-1)^n)*(10)^(n/2) + sqrt(10)*(1 + ((-1)^n - 4)*3^(n + 1)) ).
%F A050685 E.g.f.: (1/(4*sqrt(10)))*( sqrt(10)*(3*exp(-3*x) + exp(x) -12*exp(3*x)) + 44*sinh(sqrt(10)*x) + 8*sqrt(10)*cosh(sqrt(10)*x)).
%F A050685 a(2*n) = (1/4)*(1 + 8*(10)^n - 9^(1 + n)), n>=1.
%F A050685 a(2*n+1) = (1/20)*(5 + 22*(10)^(n+1) - 25*9^(n+1)), n>=0. (End)
%e A050685 Up to 10^4 we find 18 numbers -> 101, 202, ..., 909, 1001, 2002, ... and 9009.
%t A050685 LinearRecurrence[{1,19,-19,-90,90},{0,0,9,18,189},25] (* or *) Table[If[OddQ[n], (5 + 22*(10)^((n + 1)/2) - 25*9^((n + 1)/2))/20, (1 + 8*(10)^(n/2) - 9^((n/2) + 1))/4], {n, 1, 10}] (* _G. C. Greubel_, Oct 27 2016 *)
%o A050685 (Magma) [IsOdd(n) select (5+22*(10)^((n+1) div 2)-25*9^((n+1) div 2)) div 20 else (1+8*(10)^(n div 2)-9^((n div 2)+1)) div 4:n in [1..30]]; // _Vincenzo Librandi_, Oct 29 2016
%Y A050685 Cf. A050250, A050684.
%K A050685 nonn,base
%O A050685 1,3
%A A050685 _Patrick De Geest_, Aug 15 1999
%E A050685 More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999
%E A050685 Corrected by _T. D. Noe_, Nov 08 2006