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.

A052008 a(n) = 'n with digits sorted in ascending order' + 'n with digits sorted in descending order'.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 66, 77, 88, 99, 110, 121
Offset: 0

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Comments

a(n) = A004185(n) + A004186(n). - Reinhard Zumkeller, Jun 07 2015

Examples

			E.g., n = 19 -> 19 + 91 = 110.
		

Crossrefs

Cf. A052009; different from A056964.

Programs

  • Haskell
    a052008 n = a004185 n + a004186 n  -- Reinhard Zumkeller, Jun 07 2015
    
  • Mathematica
    f[n_]:=Module[{sidn=Sort[IntegerDigits[n]]},FromDigits[sidn]+ FromDigits[ Reverse[sidn]]]; Array[f,70,0] (* Harvey P. Dale, Nov 13 2011 *)
  • PARI
    for(n=0,100,D=digits(n);R=Vecrev(D);print1(sum(i=1,#D,10^(i-1)*(D[i]+R[i])),", ")) \\ Derek Orr, Feb 26 2017