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.

Showing 1-3 of 3 results.

A227362 Distinct digits of n arranged in decreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 21, 31, 41, 51, 61, 71, 81, 91, 20, 21, 2, 32, 42, 52, 62, 72, 82, 92, 30, 31, 32, 3, 43, 53, 63, 73, 83, 93, 40, 41, 42, 43, 4, 54, 64, 74, 84, 94, 50, 51, 52, 53, 54, 5, 65, 75, 85, 95, 60, 61, 62, 63, 64, 65, 6, 76, 86
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 09 2013

Keywords

Comments

a(n) <= 9876543210; a(a(n)) = a(n);
A055642(a(n)) <= 10;
A055642(a(n)) <= A055642(n), A055642(a(n)) = A055642(n) iff A178788(n) = 1;
a(A109303(n)) < A109303(n); a(A009995(n)) = A009995(n); a(A071589(n)) > A071589(n);
a(n) = A151949(n) + A180410(n).

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a227362 = read . reverse . sort . nub . show :: Integer -> Integer
    
  • Maple
    a:= n-> parse(cat(sort([{convert(n, base, 10)[]}[]], `>`)[])):
    seq(a(n), n=0..68);  # Alois P. Heinz, Sep 21 2022
  • Mathematica
    f[n_] := FromDigits[Reverse@ Union@ IntegerDigits@ n]; f /@ Range[0, 68] (* Michael De Vlieger, Apr 16 2015, corrected by Robert G. Wilson v *)
  • PARI
    a(n) = {if (n == 0, d = [0], d = digits(n)); eval(subst(Pol(vecsort(d,,12)), x, 10));} \\ Michel Marcus, Apr 16 2015
    
  • PARI
    a(n)=fromdigits(vecsort(digits(n),,12)) \\ Charles R Greathouse IV, Apr 16 2015
    
  • Python
    def A227362(n): return int(''.join(sorted(set(str(n)),reverse=True))) # Chai Wah Wu, Nov 23 2022

A071590 Numbers k such that reversal(k) < k.

Original entry on oeis.org

10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 201, 210, 211, 220, 221, 230, 231
Offset: 1

Views

Author

Benoit Cloitre, Jun 01 2002

Keywords

Crossrefs

Cf. A004086 (digit reversal), A071589 (reversal(k) > k), A002113 (reversal(k) = k).
Cf. A161602 (binary reversal(k) < k).

Programs

  • Mathematica
    Select[Range[300], # > FromDigits[Reverse[IntegerDigits[#]]] &] (* T. D. Noe, Mar 14 2012 *)
    Select[Range[300],IntegerReverse[#]<#&] (* Harvey P. Dale, Jan 16 2022 *)
  • PARI
    for(i=2,300,n=(i); s=ceil(log(n)/log(10)); if((sum(i=0,s,10^(s-i-1)*(floor(n/10^i*1.)-10*floor(n/10^(i+1)*1.))))
    				
  • PARI
    is(n) = {fromdigits(Vecrev(digits(n)))David A. Corneth, Apr 07 2021
    
  • Python
    def ok(n): return int(str(n)[::-1]) < n
    print([k for k in range(232) if ok(k)]) # Michael S. Branicky, Oct 20 2021

Extensions

Definition corrected by Harvey P. Dale, Jan 16 2022

A297272 Numbers whose base-10 digits have greater up-variation than down-variation; see Comments.

Original entry on oeis.org

12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 28, 29, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 56, 57, 58, 59, 67, 68, 69, 78, 79, 89, 102, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128
Offset: 1

Views

Author

Clark Kimberling, Jan 16 2018

Keywords

Comments

Suppose that n has base-b digits b(m), b(m-1), ..., b(0). The base-b down-variation of n is the sum DV(n,b) of all d(i)-d(i-1) for which d(i) > d(i-1); the base-b up-variation of n is the sum UV(n,b) of all d(k-1)-d(k) for which d(k) < d(k-1). The total base-b variation of n is the sum TV(n,b) = DV(n,b) + UV(n,b). See the guide at A297330.
Differs from A071589 first at 1011 which is in A071589 but not in here because UV(1011) = DV(1011)=1. - R. J. Mathar, Jan 23 2018

Examples

			198765 in base-10:  1,9,8,7,6,5, having DV = 4, UV = 8, so that 198765 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]];
    x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &];
    b = 10; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}];
    w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]];
    Take[Flatten[Position[w, -1]], 120]   (* A297270 *)
    Take[Flatten[Position[w, 0]], 120]    (* A297271 *)
    Take[Flatten[Position[w, 1]], 120]    (* A297272 *)
Showing 1-3 of 3 results.