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.

A276509 Numbers k in base 10 such that the digits of 2 + k are the digits of 2k written in reverse order.

Original entry on oeis.org

2, 47, 497, 4997, 49997, 499997, 4999997, 49999997, 499999997, 4999999997, 49999999997, 499999999997, 4999999999997, 49999999999997, 499999999999997, 4999999999999997, 49999999999999997, 499999999999999997, 4999999999999999997, 49999999999999999997, 499999999999999999997
Offset: 1

Views

Author

Keywords

Examples

			47 is in the sequence because 47 + 2 = 49 and 47*2 = 94.
497 is in the sequence because 497 + 2 = 499 and 497*2 = 994.
		

Programs

  • Magma
    [5*10^(n-1)-3: n in [1..25]]; // Vincenzo Librandi, Sep 09 2016
  • Mathematica
    Select[Range[10^6], IntegerDigits[# + 2] == Reverse@ IntegerDigits[2 #] &] (* or *)
    Table[5 (10^(n - 1)) - 3, {n, 22}] (* or *)
    CoefficientList[Series[x(2 + 25 x)/(1 - 11 x + 10 x^2), {x, 0, 21}], x] (* or *)
    {2}~Join~Table[FromDigits@ Join[{4}, ConstantArray[9, {n - 2}], {7}], {n, 2, 22}] (* Michael De Vlieger, Sep 06 2016 *)
  • PARI
    isok(n) = digits(n+2) == Vecrev(digits(2*n)); \\ Michel Marcus, Sep 07 2016
    

Formula

a(n) = 5 * 10^(n - 1) - 3. - Peter Bala, Sep 06 2016
G.f.: x*(2 + 25*x)/(1 - 11*x + 10*x^2). - Michael De Vlieger, Sep 06 2016
E.g.f.: (exp(10*x) - 6*exp(x) + 5)/2. - Stefano Spezia, Mar 04 2023