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-4 of 4 results.

A096092 Numbers whose digits can be permuted to get a proper divisor.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 105, 108, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 405, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500
Offset: 1

Views

Author

Amarnath Murthy, Jun 22 2004

Keywords

Comments

Every multiple of 10 is in the sequence.

Examples

			105 is in the sequence because 015 is a permutation of the digits as well as a proper divisor.
		

Crossrefs

Cf. A096093.

Programs

  • Mathematica
    a = {}; For[n = 1, n < 1000, n++, b = Permutations[IntegerDigits[n]]; For[i = 1, i < Length[b] + 1, i++, If[IntegerQ[n/FromDigits[b[[i]]]], If[Not[FromDigits[b[[i]]] == n], AppendTo[a, n]]]]]; Union[a, a]
    Select[Range[500],AnyTrue[#/(Rest[FromDigits/@Permutations[ IntegerDigits[ #]]]),IntegerQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 04 2018 *)

Extensions

Edited and extended by Stefan Steinerberger, Jul 14 2007

A245680 Numbers x whose digits can be permuted to produce a multiple of x.

Original entry on oeis.org

1035, 1089, 1359, 1386, 1782, 2178, 2475, 10035, 10089, 10350, 10449, 10890, 10899, 10989, 11688, 11883, 12375, 12903, 13029, 13359, 13449, 13590, 13599, 13659, 13860, 13986, 14085, 14247, 14724, 14859, 15192, 16782, 17604, 17802, 17820, 17832, 17982, 18027
Offset: 1

Views

Author

Paolo P. Lava, Jul 29 2014

Keywords

Comments

A008919 is a subset of this sequence.
Every element of the sequence is divisible by 3. - Emmanuel Vantieghem, Oct 27 2015
It is an obvious fact that if a(n) is the n-th term of the sequence, then a(n)*(10^k) is also a member of the sequence for all k > 0. - Altug Alkan, Nov 01 2015

Examples

			A permutation of 1782 is 7128 and 7128 / 1782 = 4.
A permutation of 11688 is 81816 and 81816 / 11688 = 7.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a, b, c, i, j, k, n, t; for n from 1 to q do a:=n; b:=[];
    while a>0 do b:=[a mod 10, op(b)]; a:=trunc(a/10); od;
    t:=0; for i from 2 to 9 do a:=i*n; c:=[];
    while a>0 do c:=[a mod 10, op(c)]; a:=trunc(a/10); od;
    if sort(b)=sort(c) then print(n); break; fi; od; od; end: P(10^6);
    # Alternative:
    N:= 100: # to get the first N entries
    count:= 0:
    for x from 10 while count < N do
      M:= 10^(ilog10(x)+1)-1;
      L:= sort(convert(x,base,10));
      for i from 2 to floor(M/x) do
        Lp:= sort(convert(i*x,base,10));
        if Lp = L then
          count:= count+1;
          A[count]:= x;
          break;
        fi
       od
    od:
    seq(A[i],i=1..count); # Robert Israel, Jul 29 2014
  • Mathematica
    fQ[n_] := AnyTrue[Rest[FromDigits /@ Permutations[IntegerDigits@ n]], Divisible[#, n] &]; Select[Range@ 20000, fQ] (* Michael De Vlieger, Oct 27 2015, Version 10 *)
  • PARI
    for(n=1,10^8,d=vecsort(digits(n));p=0;for(k=2,9,dd=vecsort(digits(n*k));if(d==dd,p++;break));if(p>0,print1(n,", "))) \\ quicker program Derek Orr, Jul 29 2014
  • Python
    import itertools
    from itertools import permutations
    for n in range(1,10**5):
      plist = list(permutations(str(n)))
      for i in plist:
        num = ''
        for j in range(len(i)):
          num += i[j]
        if int(num)%n==0 and int(num)/n > 1:
          print(n,end=', ') # Derek Orr, Jul 29 2014
    

A245682 Numbers x whose digits can be permuted to produce more than a single multiple of x.

Original entry on oeis.org

123876, 142857, 153846, 230769, 285714, 1028574, 1218753, 1238760, 1239876, 1246878, 1294857, 1402857, 1420785, 1425897, 1428507, 1428570, 1428597, 1428705, 1429857, 1485792, 1492857, 1538460, 1539846, 1570284, 1584297, 2300769, 2307690, 2307699, 2309769, 2857014, 2857140, 2859714, 2985714, 10028574, 10178649
Offset: 1

Views

Author

Paolo P. Lava, Jul 29 2014

Keywords

Comments

It is a subset of A245680.
If x < 10^d is in the sequence, then so are x*10^j*(1+10^d+...+10^k*d) for all nonnegative integers j and k. - Robert Israel, Jul 29 2014

Examples

			Two permutations of 123876 are 371628, 867132  and  371628 / 123876 = 3, 867132  / 123876 = 7.
Five permutations of 142857 are 285714, 428571, 571428, 714285, 857142 and 285714 / 142857 = 2, 428571 / 142857 = 3, 571428 / 142857 = 4, 714285 / 142857 = 5, 857142 / 142857 = 6.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,c,i,j,k,n,t; for n from 1 to q do a:=n; b:=[];
    while a>0 do b:=[a mod 10,op(b)]; a:=trunc(a/10); od;
    t:=0; for i from 2 to 9 do a:=i*n; c:=[];
    while a>0 do c:=[a mod 10,op(c)]; a:=trunc(a/10); od;
    if sort(b)=sort(c) then t:=t+1; fi; if t>1 then print(n); break;
    fi; od; od; end: P(10^10);
    # Alternative
    N:= 10: # get a(1) to a(N)
    count:= 0:
    for x from 10 while count < N do
      M:= 10^(ilog10(x)+1)-1;
      L:= sort(convert(x,base,10));
      mults:= 0;
      for i from 2 to floor(M/x) do
        Lp:= sort(convert(i*x,base,10));
        if Lp = L then
          mults:= mults+1;
          if mults = 2 then
            count:= count+1;
            A[count]:= x;
            print(x);
            break;
          fi
        fi
       od
    od:
    seq(A[i],i=1..count); # Robert Israel, Jul 29 2014
  • PARI
    for(n=1,10^8,d=vecsort(digits(n));p=0;for(k=2,9,dd=vecsort(digits(n*k));if(d==dd,p++));if(p>1,print1(n,", "))) \\ faster program Derek Orr, Jul 29 2014
  • Python
    import itertools
    from itertools import permutations
    for n in range(1,10**8):
      plist = list(permutations(str(n)))
      count = 0
      lst = []
      for i in plist:
        num = ''
        for j in range(len(i)):
          num += i[j]
        if int(num)%n==0 and int(num)/n > 1:
          if int(num) not in lst:
            lst.append(int(num))
            count += 1
      if count > 1:
        print(n,end=', ') # Derek Orr, Jul 29 2014
    

Extensions

a(7) to a(10) from Robert Israel, Jul 29 2014
a(11) - a(35) from Derek Orr, Jul 29 2014

A386501 Numbers k divisible by A004719(k), excluding trivial cases.

Original entry on oeis.org

105, 108, 405, 1001, 1005, 1008, 1020, 2002, 2025, 2040, 2050, 3003, 3060, 4004, 4005, 4080, 5005, 6006, 6075, 7007, 7050, 8008, 9009, 10005, 10008, 10020, 10032, 10065, 10098, 10101, 10125, 10206, 10250, 16005, 19008, 20007, 20025, 20040, 20050
Offset: 1

Views

Author

Anuraag Pasula and Walter Robinson, Jul 23 2025

Keywords

Comments

Trivial cases are identified as (1) values of k where there are already no 0s besides leading 0s, like 255 or 1296, such that A004719(k)=k, or (2) where k mod 10 = 0 and k/10 is already in the sequence or is itself a trivial case, like 10080 or 2550. In case (1), k/A004719(k) is equivalent to k/k (as in 255/255). In case (2), k/A004719(k) = 10 * (k/10)/A004719(k/10) when we already know that (k/10)/A004719(k/10) is already an integer (as in 1080/18).
Any number k of the form 1|(at least one 0)|5, such as 105 or 10000000005, will be included in this sequence because k will always be divisible by 3 and 5 due to divisibility rules, and thus will be divisible by A004719(k)=15.
Numbers of form 1|(at least one 0)|8, such as 108 or 10000008, or 4|(at least one 0)|5, such as 405 or 400005, will be included in this sequence for similar reasons.

Examples

			A004719(108)=18, 108/18=6.
A004719(9009)=99, 9009/99=91.
A004719(2040)=24, 2040/24=85, 2040 is nontrivial because 204/24=17/2.
50 is trivial because 50/10 = 5, and 5 is trivial because A004719(5)=5.
		

Crossrefs

Subset of A090055.

Programs

  • Python
    def removeZeros(number):
        stringNum = str(number)
        stringNum = stringNum.replace("0", "")
        return int(stringNum)
    for x in range(1, 100000):
        smallInt = removeZeros(x)
        if smallInt == x:
            continue
        if x % smallInt == 0:
            if x % 10 == 0:
                if (x//10) % removeZeros(x//10) == 0:
                    continue
            print(x)
Showing 1-4 of 4 results.