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.

Previous Showing 31-40 of 40 results.

A032553 Arrange digits of cubes in ascending order.

Original entry on oeis.org

0, 1, 8, 27, 46, 125, 126, 334, 125, 279, 1, 1133, 1278, 1279, 2447, 3357, 469, 1349, 2358, 5689, 8, 1269, 1468, 11267, 12348, 12556, 15677, 13689, 12259, 23489, 27, 12799, 23678, 33579, 3349, 24578, 45666, 3556, 24578, 13599, 46
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1998

Keywords

Examples

			Leading zeros discarded (e.g., 40^3 = 64000 = 00046 becomes 46).
		

Crossrefs

Programs

A032554 Arrange digits of cubes in descending order.

Original entry on oeis.org

0, 1, 8, 72, 64, 521, 621, 433, 521, 972, 1000, 3311, 8721, 9721, 7442, 7533, 9640, 9431, 8532, 9865, 8000, 9621, 86410, 76211, 84321, 65521, 77651, 98631, 95221, 98432, 72000, 99721, 87632, 97533, 94330, 87542, 66654, 65530, 87542, 99531
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1998

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,i;
      L:= sort(convert(n^3,base,10));
      add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 12 2020
  • Mathematica
    Table[FromDigits[Sort[IntegerDigits[n^3],Greater]],{n,0,40}] (* Harvey P. Dale, Nov 14 2021 *)

Formula

a(n) = A004186(A000578(n)). - Michel Marcus, Mar 12 2020

A096089 Let f(n) = largest number formed using digits of n, g(n) = smallest number formed using digits of n; then a(n) = floor(f(n)/g(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 2, 2, 3, 3, 4, 4, 4, 10, 1, 1, 1, 1, 2, 2, 2, 2, 3, 10, 2, 1, 1, 1, 1, 1, 1, 2, 2, 10, 2, 1, 1, 1, 1, 1, 1, 1, 1, 10, 3, 2, 1, 1, 1, 1, 1, 1, 1, 10, 3, 2, 1, 1, 1, 1, 1, 1, 1, 10, 4, 2, 1, 1, 1, 1, 1, 1, 1, 10, 4, 2, 2, 1, 1, 1, 1, 1, 1, 10, 4, 3, 2, 1, 1, 1, 1, 1, 1, 100, 10, 17, 23, 29, 34
Offset: 1

Views

Author

Amarnath Murthy, Jun 22 2004

Keywords

Examples

			a(12324) = floor(43221/12234) = 3.
a(1098) = floor(9810/0189) = 51.
		

Crossrefs

Programs

  • Maple
    A096089 := proc(n)
        floor( A004186(n)/A004185(n)) ;
    end proc: # R. J. Mathar, Jul 26 2015
  • PARI
    a(n) = d = digits(n); fromdigits(vecsort(d, , 4)) \ fromdigits(vecsort(d))

Extensions

More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Jul 19 2004
a(1)..a(9) prepended by David A. Corneth, Jan 21 2019

A108782 Difference between n and the largest number with the same digit set as n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 27, 36, 45, 54, 63, 72, 0, 0, 0, 9, 18, 27, 36, 45, 54, 63, 0, 0, 0, 0, 9, 18, 27, 36, 45, 54, 0, 0, 0, 0, 0, 9, 18, 27, 36, 45, 0, 0, 0, 0, 0, 0, 9, 18, 27, 36, 0, 0, 0, 0, 0, 0, 0, 9, 18, 27, 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0
Offset: 0

Views

Author

Zak Seidov, Jun 29 2005

Keywords

Crossrefs

Programs

  • Mathematica
    FromDigits[Sort[IntegerDigits[n], Greater]] - n (Rob Pratt)
    Table[Max[FromDigits/@ Permutations[IntegerDigits[n]]]-n, {n, 150}]

Formula

a(n) = A004186(n) - n. - Seiichi Manyama, Sep 25 2018

Extensions

a(0)=0 prepended by Seiichi Manyama, Sep 25 2018

A194233 Smallest number greater than n with exactly the same digits as n in decimal representation, a(n)=10*n if no such number exists.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 21, 31, 41, 51, 61, 71, 81, 91, 200, 210, 220, 32, 42, 52, 62, 72, 82, 92, 300, 310, 320, 330, 43, 53, 63, 73, 83, 93, 400, 410, 420, 430, 440, 54, 64, 74, 84, 94, 500, 510, 520, 530, 540, 550, 65, 75, 85, 95
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 19 2011

Keywords

Comments

A004186(a(n)) = A004186(n) or A004186(a(n)) = 10*A004186(n).

Programs

  • Haskell
    import Data.List (find); import Data.Maybe (fromMaybe)
    a194233 n =
       fromMaybe (10*n) $ find (== a004186 n) $ map a004186 [n+1..10*n]

A211655 Down-sortable primes: Primes that are also primes after digits are sorted into decreasing order.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 31, 37, 41, 43, 53, 61, 71, 73, 79, 83, 97, 113, 131, 149, 157, 163, 167, 179, 181, 191, 197, 199, 211, 241, 251, 281, 311, 313, 331, 337, 347, 359, 373, 389, 419, 421, 431, 433, 443, 461, 463, 491, 521, 541, 563, 571, 593, 613, 617, 631, 641, 643, 653
Offset: 1

Views

Author

Francis J. McDonnell, Apr 17 2012

Keywords

Comments

All 1- and 2-digit reversible primes (A007500) are trivially in this sequence. No primes from A056709 are in this sequence. Clearly all absolute primes (A003459) are sortable primes but not all sortable primes are absolute primes. - Alonso del Arte, Oct 08 2013

Examples

			131 is prime and after sorting its digits into nonincreasing order we obtain 311, which is prime.
163 is in the sequence because its digits sorted in decreasing order give 631, which is prime. (Note that this is not a reversible prime, since 361 = 19^2.)
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200]], PrimeQ[FromDigits[-Sort[-IntegerDigits[#]]]] &] (* T. D. Noe, Apr 17 2012 *)

A351988 In the factorial base expansion of n, arrange digits in decreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 8, 9, 14, 15, 12, 14, 14, 15, 16, 17, 18, 20, 20, 21, 22, 23, 24, 30, 30, 32, 54, 56, 30, 32, 32, 33, 56, 57, 54, 56, 56, 57, 62, 63, 78, 80, 80, 81, 86, 87, 48, 54, 54, 56, 60, 62, 54, 56, 56, 57, 62, 63, 60, 62, 62, 63, 64, 65, 84, 86
Offset: 0

Views

Author

Rémy Sigrist, Feb 27 2022

Keywords

Comments

This sequence is to factorial base what A004186 is to decimal base.

Examples

			For n = 1664:
- the factorial base expansion of 1664 is "214110",
- arranging these digits in decreasing order gives "421110",
- so a(1664) = 4*6! + 2*5! + 1*4! + 1*3! + 1*2! + 0*1! = 3152.
		

Crossrefs

Cf. A004186 (decimal analog), A073138 (binary analog), A108731, A319651 (ternary analog), A351987.

Programs

  • Mathematica
    max = 5; b = MixedRadix[Range[max, 2, -1]]; a[n_] := FromDigits[Sort[IntegerDigits[n, b], Greater], b]; Array[a, max!, 0] (* Amiram Eldar, Feb 28 2022 *)
  • PARI
    a(n) = { my (dd=[]); for (r=2, oo, if (n==0, dd = vecsort(dd); return (sum(k=1, #dd, dd[k]*k!)), dd = concat(dd, n%r); n\=r)) }

Formula

a(a(n)) = a(n).
a(n) >= n with equality iff n belongs to A351987.

A371653 Numbers k such that the number formed by putting the digits of k in descending order is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 14, 16, 17, 31, 34, 35, 37, 38, 41, 43, 53, 61, 71, 73, 79, 83, 97, 112, 113, 118, 119, 121, 124, 125, 128, 131, 133, 134, 136, 142, 143, 145, 146, 149, 152, 154, 157, 163, 164, 166, 167, 175, 176, 179, 181, 182, 188, 191, 194, 197, 199
Offset: 1

Views

Author

César Eliud Lozada, Apr 01 2024

Keywords

Comments

Numbers k such that A004186(k) is prime. - Robert Israel, Apr 01 2024
If N is a term then all numbers with the same digits as N are terms too.

Examples

			142 is a term because its digits in decreasing order form 421 and this is prime.
		

Crossrefs

Programs

  • Maple
    dd:= proc(n) local L,i;
       L:= sort(convert(n,base,10));
       add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    select(isprime @ dd, [$1..1000]); # Robert Israel, Apr 01 2024
  • Mathematica
    Select[Range[500], PrimeQ[FromDigits[ReverseSort[IntegerDigits[#]]]] &]
  • Python
    from sympy import isprime
    def ok(n): return isprime(int("".join(sorted(str(n), reverse=True))))
    print([k for k in range(200) if ok(k)]) # Michael S. Branicky, Apr 01 2024
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    def A371653_gen(): # generator of terms
        for l in count(1):
            xlist = []
            for p in combinations_with_replacement('987654321',l):
                if isprime(int(''.join(p))):
                    xlist.extend(int(''.join(d)) for d in multiset_permutations(p))
            yield from sorted(xlist)
    A371653_list = list(islice(A371653_gen(),30)) # Chai Wah Wu, Apr 10 2024

A337925 Digits of n rearranged to be the smallest number with the fewest possible prime factors, counted with multiplicity. Terms retain the same number of digits as n, i.e. leading digits may not be zero.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 13, 41, 15, 61, 17, 18, 19, 20, 21, 22, 23, 42, 25, 26, 27, 82, 29, 30, 13, 23, 33, 43, 53, 63, 37, 83, 39, 40, 41, 42, 43, 44, 45, 46, 47, 84, 49, 50, 15, 25, 53, 45, 55, 65, 57, 58, 59, 60, 61, 26, 63, 46, 65, 66, 67, 86, 69, 70, 17, 27, 37, 47, 57, 67, 77
Offset: 1

Views

Author

Roderick Kimball, Sep 30 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = FromDigits /@ Select[Permutations @ IntegerDigits[n], First[#] > 0 &]}, o = PrimeOmega[p]; Min[p[[Position[o, Min[o]] // Flatten]]]]; Array[a, 100] (* Amiram Eldar, Oct 19 2020 *)
  • PARI
    a(n) = {my(d = digits(n), v = select(x->#(digits(x))==#d, vector((#d)!, i, fromdigits(vector(#d, k, d[numtoperm(#d, i-1)[k]])))), b = vecmin(vector(#v, k, bigomega(v[k])))); vecmin(select(x->(bigomega(x)==b), v));} \\ Michel Marcus, Oct 19 2020

Formula

a(a(n)) = a(n). - Rémy Sigrist, Oct 22 2020

A273003 Arrange the base 10 digits of the n-th Fibonacci number in descending order.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 31, 21, 43, 55, 98, 441, 332, 773, 610, 987, 9751, 8542, 8411, 7665, 96410, 77111, 87652, 86643, 75520, 933211, 986411, 873111, 954221, 843200, 9664321, 9873210, 8755432, 8877520, 9765422, 95433210, 87754211, 99886310, 98665432
Offset: 0

Views

Author

Alonso del Arte, May 12 2016

Keywords

Comments

Conjecture: the largest Fibonacci number F(n) with its base 10 digits already sorted in descending order is F(16) = 987.

Examples

			a(7) = 31 because F(7) = 13, so the digits in descending order become 31.
a(8) = 21 = F(8), the digits are already in descending order.
		

Crossrefs

Programs

  • Mathematica
    FromDigits[Reverse[Sort[IntegerDigits[#]]]]&/@Fibonacci[Range[0,50]] (* Harvey P. Dale, Sep 16 2016 *)
  • PARI
    a(n)=fromdigits(vecsort(digits(fibonacci(n)),,4)) \\ Charles R Greathouse IV, May 15 2016

Formula

a(n) = A004186(A000045(n)). - Michel Marcus, May 15 2016

Extensions

Corrected and extended by Harvey P. Dale, Sep 16 2016
Previous Showing 31-40 of 40 results.