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.

A096093 Numbers, not divisible by 10, whose digits can be permuted to get a proper divisor.

Original entry on oeis.org

105, 108, 405, 702, 703, 1001, 1005, 1008, 1053, 2002, 2016, 2025, 2079, 2106, 3003, 3024, 3042, 3045, 3105, 3402, 4004, 4005, 5005, 5049, 6006, 6031, 6045, 6048, 6072, 6075, 6084, 6105, 6804, 7007, 7011, 7128, 7425, 8008, 8019, 8092, 8316, 8712, 9009
Offset: 1

Views

Author

Amarnath Murthy, Jun 22 2004

Keywords

Examples

			105 is a term as 015 is a proper divisor of 105.
2178 is a proper divisor of 8712 and 8712/2178=4.
1089 is a proper divisor of 9801 and 9801/1089=9.
		

Crossrefs

Cf. A096092.

Programs

  • Maple
    filter:= proc(n) local L,nL,P;
      L:= convert(n,base,10);
      nL:= nops(L);
      P:= subs(L=NULL, combinat:-permute(L));
      ormap(p -> n mod add(p[i]*10^(i-1),i=1..nL) = 0, P)
    end proc:
    select(filter, [seq(seq(10*i+j,j=1..9),i=1..10000)]); # Robert Israel, Jun 01 2020
  • Mathematica
    f[n_] := Union[ IntegerQ /@ Drop[ n/FromDigits /@ Permutations[IntegerDigits[n]], 1]][[ -1]]; Select[ Range[ 9015], Mod[ #, 10] != 0 && f[ # ] == True &] (* Robert G. Wilson v, Jun 23 2004 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 23 2004

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

A382945 a(n) is the least positive integer k having a divisor d such that k/d is not a power of n and the base n expansions of k and d, possibly with leading zeros, have, up to order, the same digits.

Original entry on oeis.org

9, 28, 18, 16, 40, 36, 42, 64, 105, 45, 154, 105, 130, 168, 260, 120, 340, 96, 266, 275, 495, 231, 460, 351, 450, 273, 792, 175, 928, 280, 682, 1024, 308, 459, 1302, 741, 962, 665, 1612, 288, 1804, 560, 1290, 1265, 2139, 1035, 1974, 540, 952, 715, 2720, 585
Offset: 2

Views

Author

Rémy Sigrist, Apr 09 2025

Keywords

Comments

If k/d is a power of n, then k = d * n^z for some z >= 0 and, trivially, the base n expansions of k (with z trailing zeros) and d (with z leading zeros) have the same digits.
The sequence is well defined: for any n > 1, n^3 + 1 is divisible by n + 1, (n^3 + 1) / (n + 1) is not a power of n, and the base n expansions of n^3 + 1 and n + 1 have, up to order, the same digits.

Examples

			The first terms, alongside an appropriate divisor d, in bases 10 and n, are:
  n   a(n)  d    a(n) in base n  d in base n
  --  ----  ---  --------------  -----------
   2     9    3  1,0,0,1         1,1
   3    28    4  1,0,0,1         1,1
   4    18    6  1,0,2           1,2
   5    16    8  3,1             1,3
   6    40   10  1,0,4           1,4
   7    36   12  5,1             1,5
   8    42   21  5,2             2,5
   9    64   16  7,1             1,7
  10   105   15  1,0,5           1,5
  11    45   15  4,1             1,4
  12   154   22  1,0,10          1,10
  13   105   21  8,1             1,8
  14   130   65  9,4             4,9
  15   168   56  11,3            3,11
  16   260   20  1,0,4           1,4
		

Crossrefs

Programs

  • PARI
    a(n) = {
        for (k = 1, oo,
            my (t = vecsort(select(sign, digits(k, n))));
            fordiv (k, d,
                if ((k/d) != n^valuation(k/d, n)
                    && vecsort(select(sign, digits(d, n)))==t,
                    return (k);););); }

Formula

a(n) <= n^3 + 1.
Showing 1-4 of 4 results.