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.

A232730 Number of n-digit numbers that yield an (n+1)-digit number after Reverse and Add.

Original entry on oeis.org

5, 45, 495, 4905, 49500, 494550, 4950000, 49495500, 495000000, 4949955000, 49500000000, 494999550000, 4950000000000, 49499995500000, 495000000000000, 4949999955000000, 49500000000000000, 494999999550000000, 4950000000000000000, 49499999995500000000
Offset: 1

Views

Author

Lars Blomberg, Nov 29 2013

Keywords

Comments

A232729(n) + a(n) = 9*10^(n-1).

Examples

			There are 5 1-digit numbers (5,6,7,8,9) that yield a 2-digit number (10,12,14,16,18), so a(1)=5.
		

Crossrefs

Programs

  • Maple
    a[1]:=5: t[0]:= 0: t[1]:= 5:
    for n from 2 to 50 do
    a[n]:= 45*10^(n-2) + 9*t[n-2];
    t[n]:= a[n] + t[n-2];
    od:
    seq(a[n],n=1..50); # Robert Israel, Apr 21 2016
  • Mathematica
    LinearRecurrence[{10,10,-100},{5,45,495,4905},20] (* Harvey P. Dale, Feb 29 2024 *)
  • PARI
    Vec(5*x*(1+x)*(1-x)^2 / ((1-10*x)*(1-10*x^2)) + O(x^30)) \\ Colin Barker, Mar 20 2017

Formula

a(1) = 5, a(3) = 495, a(2*k+1) = 100*a(2*k-1), k > 1.
a(2) = 45, a(4) = 4905, a(2*k) = 110*a(2*k-2) - 1000*a(2*k-4), k > 2.
G.f. = 5*x*(1+x)*(1-x)^2 / ((1-10*x)*(1-10*x^2)). - M. F. Hasler, Nov 30 2013
From Colin Barker, Mar 20 2017: (Start)
a(n) = -45*(10^(n/2-2) - 11*10^(n-3)) for n>2 even.
a(n) = 99*2^(n-3)*5^(n-2) for n>2 odd.
a(n) = 10*a(n-1) + 10*a(n-2) - 100*a(n-3) for n>4. (End)
E.g.f.: (99*cosh(10*x) - 90*cosh(sqrt(10)*x) + 99*sinh(10*x) + 10*x - 9)/200. - Stefano Spezia, Oct 27 2022

Extensions

G.f. corrected and empirical formulas proved by Robert Israel, Apr 21 2016