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.

A037487 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,2.

Original entry on oeis.org

1, 12, 121, 1212, 12121, 121212, 1212121, 12121212, 121212121, 1212121212, 12121212121, 121212121212, 1212121212121, 12121212121212, 121212121212121, 1212121212121212, 12121212121212121, 121212121212121212, 1212121212121212121, 12121212121212121212
Offset: 1

Views

Author

Keywords

Comments

See A037610 for a general formula. - Hieronymus Fischer, Jan 03 2013
(Smoothly undulating palindromic) primes in this sequence are listed in A092696(n) = (4*10^A062209(n)-7)/33. - M. F. Hasler, Jul 30 2015

Crossrefs

Cf. A037610.

Programs

  • Mathematica
    Table[FromDigits[PadRight[{},n,{1,2}]],{n,20}] (* or *) LinearRecurrence[ {10,1,-10},{1,12,121},20] (* Harvey P. Dale, Jun 21 2016 *)
  • PARI
    A037487(n)=10^n*4\33  \\ - M. F. Hasler, Jan 13 2013
    
  • PARI
    Vec(x*(2*x+1)/((x-1)*(x+1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Apr 30 2014

Formula

a(n) = floor((4/33)*10^n). - Hieronymus Fischer, Jan 03 2013
a(n) = 10*a(n-1)+a(n-2)-10*a(n-3). G.f.: x*(2*x+1) / ((x-1)*(x+1)*(10*x-1)). - Colin Barker, Apr 30 2014