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.

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
    

A344436 Numbers k such that k, 2*k, 3*k, 4*k, 5*k and 6*k are anagrams and no digit of k is zero.

Original entry on oeis.org

142857, 1429857, 14299857, 142999857, 1429999857, 14299999857, 142857142857, 142999999857, 1428571429857, 1429857142857, 1429999999857, 14285714299857, 14298571429857, 14299857142857, 14299999999857, 137428291864557, 137464282918557, 142829186455737
Offset: 1

Views

Author

Bhupendra Kumar Singh, May 19 2021

Keywords

Comments

All terms are divisible by 9.
a(1) = 143*999 = 1287*111;
a(2) = 143*9999 = 1287*1111;
a(7) = 143*999000999 = 1287*111000111; etc.
a(n) = k is odd. Proof: If k is even then 5*k ends in 0, which is forbidden by definition. - David A. Corneth, May 22 2021

Examples

			142857, 1429857, and 14299857 are in the sequence:
.
      k        2*k       3*k       4*k       5*k       6*k
  --------  --------  --------  --------  --------  --------
    142857    285714    428571    571428    714285    857142
   1429857   2859714   4289571   5719428   7149285   8579142
  14299857  28599714  42899571  57199428  71499285  85799142
		

Crossrefs

Programs

  • PARI
    isok(k) = {my(d = vecsort(digits(k))); vecmin(d) && (d==vecsort(digits(2*k))) && (d==vecsort(digits(3*k))) && (d==vecsort(digits(4*k))) && (d==vecsort(digits(5*k))) && (d==vecsort(digits(6*k)));} \\ Michel Marcus, Jun 01 2021

Extensions

Data corrected by David A. Corneth, May 22 2021

A373407 Smallest positive integer k such that no more than n numbers (formed by multiplying k by a digit) are anagrams of k, or -1 if no such number exists.

Original entry on oeis.org

1, 1035, 123876, 1402857, 1037520684, 142857
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2024

Keywords

Comments

For n = 2..6 all terms are divisible by 9.
For n >= 4, a(n) must be divisible by 9, or a(n) = -1, because all anagrams d*k of k for d = 2, 3, 5, 6, 8 and 9 are divisible by 9. Thus there are only 3 values of d, i.e., 1, 4 and 7, for which k*d must not be divisible by 9.
If a(n) exists for n > 1 then 9|a(n). Holds for n = 2 and n = 3 by inspection. Proof for n >= 4: if k*d is an anagram of k where 2 <= d <= 9 then k*d - k = k*(d-1) is a multiple of 9. For this to be true, k must be a multiple of 9 as d is not of the form 1 (mod 3) for all d. - David A. Corneth, Jun 04 2024
From Michael S. Branicky, Jun 07 2024: (Start)
The following were constructed from multiples of cyclic numbers (cf. A180340, Wikipedia):
a(6) = 142857 = (10^6 - 1) / 7;
a(7) <= 1304347826086956521739 = 3*(10^22 - 1) / 23;
a(8) <= 1176470588235294 = 2*(10^16 - 1) / 17;
a(9) <= 105263157894736842 = 2*(10^18 - 1) / 19. (End)

Examples

			a(2) = 1035, because 1035 * 1 = 1035 and 1035 * 3 = 3105 are anagrams of 1035, and no other number 1035 * i with digit i is an anagram of 1035, and no lesser number verifies this property.
Table n, k, set of multipliers.
  1   1          [1]
  2   1035       [1, 3]
  3   123876     [1, 3, 7]
  4   1402857    [1, 2, 3, 5]
  5   1037520684 [1, 2, 4, 5, 8]
  6   142857     [1, 2, 3, 4, 5, 6]
		

Crossrefs

Programs

  • PARI
    isok(k, n) = my(d=vecsort(digits(k))); sum(i=1, 9, vecsort(digits(k*i)) == d) == n; \\ Michel Marcus, Jun 04 2024
Showing 1-3 of 3 results.