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.

A138793 a(n) = concatenation of reversed digits of natural numbers from n down to 1.

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 1987654321, 1101987654321, 211101987654321, 31211101987654321, 4131211101987654321, 514131211101987654321, 61514131211101987654321, 7161514131211101987654321
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008, Apr 04 2008

Keywords

Comments

Note that leading zeros are not omitted when writing down digits in reversed order. So 10 reversed becomes 01. - N. J. A. Sloane, Jan 23 2017

Crossrefs

Programs

  • Magma
    [Seqint(&cat[Reverse(Intseq(k)): k in [1..n]]): n in [1..16]]; // Bruno Berselli, May 27 2011
    
  • Maple
    read(transforms): A138793 := proc(n) return digrev(parse(cat($(1..n)))): end: seq(A138793(n),n=1..17); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, p], {n, 1, 61}]; b (* Artur Jasinski, Mar 30 2008 *)
    lst = {}; Table[FromDigits[Reverse[lst = Join[lst, IntegerDigits[n]]]], {n, 1, 15}] (* Robert Price, Mar 22 2015 *)
  • PARI
    a(n) = my(s = ""); forstep (k=n,1,-1, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); eval(s); \\ Michel Marcus, Jan 28 2017