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

A249516 Numbers k for which the digital product A007954(k) contains the same distinct digits as the number k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 111, 1111, 1288, 1557, 1575, 1755, 1828, 1882, 2188, 2818, 2881, 3448, 3484, 3577, 3757, 3775, 3844, 4348, 4384, 4438, 4483, 4834, 4843, 5157, 5175, 5377, 5517, 5571, 5715, 5737, 5751, 5773, 7155, 7357, 7375, 7515, 7537, 7551
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2014

Keywords

Examples

			1288 is a member since 1288 and its digital product 1*2*8*8 = 128 have the same digit set {1,2,8}.
		

Crossrefs

Programs

  • Magma
    [0] cat [n: n in [0..100000] | Set(Intseq(n)) eq Set(Intseq(&*Intseq(n)))];
    
  • Mathematica
    Select[Range[0,8000],Union[IntegerDigits[Times@@IntegerDigits[#]]] == Union[ IntegerDigits[#]]&] (* Harvey P. Dale, Aug 05 2018 *)
  • PARI
    print1(0,", ");for(n=1,10^4,d=digits(n);p=prod(i=1,#d,d[i]);if(vecsort(digits(p),,8)==vecsort(d,,8),print1(n,", "))) \\ Derek Orr, Nov 05 2014

A249517 Numbers k for which the digital sum A007953(k) and the digital product A007954(k) both contain the same distinct digits as the number k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11111111111
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2014

Keywords

Comments

a(12) = (10^106-1)/9 + 122222222. - Max Alekseyev, Nov 15 2014
Other entries include (10^111-1)/9, (10^113-1)/9 + 177, (10^115-1)/9 + 122222222, (10^117-1)/9 + 11117, (10^125-1)/9 + 2224, (10^126-1)/9 + 333335, (10^135-1)/9 + 4666, (10^143-1)/9 + 446, (10^143-1)/9 + 2224, (10^144-1)/9 + 33335. All other entries with 150 or fewer digits are formed by permutations of the decimal digits of these entries (including a(12)). (10^((10^m-1)/9)-1)/9 are entries of the sequence for m >= 0. - Chai Wah Wu, Nov 15 2014

Examples

			11111111111 is a term since A007953(11111111111) = 11 and A007954(11111111111) = 1.
		

Crossrefs

Intersection of A249515 and A249516. Subsequence of A249334.

Programs

  • Magma
    [0] cat [n: n in [0..10^7] | Set(Intseq(n)) eq Set(Intseq(&*Intseq(n))) and Set(Intseq(n)) eq Set(Intseq(&+Intseq(n)))];
    
  • PARI
    is(n)=if(n<=9,return(1)); my(d=digits(n),s=Set(d)); s==Set(digits(sum(i=1,#d,d[i]))) && s==Set(digits(prod(i=1,#d,d[i]))) \\ Charles R Greathouse IV, Nov 13 2014
    
  • Python
    from itertools import product
    from operator import mul
    from functools import reduce
    A249517_list = [0]
    for g in range(1,15):
        xp, ylist = [], []
        for i in range(9*g,-1,-1):
            x = set(str(i))
            if not (('0' in x) or (x in xp)):
                xv = [int(d) for d in x]
                imin = int(''.join(sorted(str(i))))
                if max(xv)*(g-len(x)) >= imin-sum(xv) and i-sum(xv) >=  min(xv)*(g-len(x)):
                    xp.append(x)
                    for y in product(x,repeat=g):
                        if set(y) == x:
                            yd = [int(d) for d in y]
                            if set(str(sum(yd))) == x == set(str(reduce(mul, yd, 1))):
                                ylist.append(int(''.join(y)))
        A249517_list.extend(sorted(ylist)) # Chai Wah Wu, Nov 15 2014

Extensions

a(11) = 11111111111 confirmed by Sean A. Irvine, Nov 13 2014, by direct search.

A360986 Primes whose sum of decimal digits has the same set of decimal digits as the prime.

Original entry on oeis.org

2, 3, 5, 7, 199, 919, 991, 2999, 9929, 11177, 11717, 17117, 31333, 33331, 71171, 71711, 161611, 616111, 999499, 1111333, 1131133, 1131331, 1133131, 1313311, 3111313, 3111331, 3131113, 3131311, 3133111, 3311131, 3337777, 3377377, 3773377, 3773773, 7377373, 7733377, 7737337, 7737733, 32333333
Offset: 1

Views

Author

Robert Israel, Feb 27 2023

Keywords

Examples

			a(5) = 199 is a term because 199 is prime and 1+9+9 = 19 has the same set {1,9} of decimal digits as 199.
		

Crossrefs

Primes in A249515.

Programs

  • Maple
    dmax:= 7: # for terms with up to dmax digits
    dsets:= proc(s, S) option remember;
    # nondecreasing lists [x_1, ..., x_n] with sum s and set of elements S
       local i, x1;
       if S = {} then if s = 0 then return {[]} else return {} fi fi;
       x1:= min(S);
       `union`(seq(map(t -> [x1$i, op(t)], procname(s-i*x1, S minus {x1})), i=1..`if`(x1=0,dmax,floor(s/x1))))
    end proc:
    R:= {2,3,5,7}: count:= 4:
    for s from 2 to 9*dmax-1 do
      if s mod 3 = 0 then next fi;
      ds:= convert(convert(s,base,10),set);
      DS:= select (t -> nops(t) > 1 and nops(t) <= dmax, dsets(s,ds));
      for r in DS do
         for v in remove(t -> member(t[1],[0,2,4,5,6,8]) or t[-1]=0,combinat:-permute(r)) do
           p:= add(v[i]*10^(i-1),i=1..nops(v));
           if isprime(p) then R:= R union {p}; count:= count+1;
          fi
    od od od:
    sort(convert(R,list));
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p)); Set(d) == Set(digits(vecsum(d)))); \\ Michel Marcus, Feb 28 2023

A383328 Numbers that have the same set of digits as the sum of the squares of their digits.

Original entry on oeis.org

0, 1, 155, 224, 242, 334, 343, 422, 433, 505, 515, 550, 551, 1388, 1788, 1838, 1878, 1883, 1887, 3188, 3334, 3336, 3343, 3363, 3433, 3633, 3818, 3881, 4333, 5005, 5050, 5500, 6333, 7188, 7818, 7881, 8138, 8178, 8183, 8187, 8318, 8381, 8718, 8781, 8813, 8817, 8831
Offset: 1

Views

Author

Jean-Marc Rebert, Apr 23 2025

Keywords

Examples

			155 and 1^2 + 5^2 + 5^2 = 51 have the same set of digits {1,5}, so 155 is a term.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Module[{d = IntegerDigits[k]}, Union[d] == Union[IntegerDigits[Total[d^2]]]]; Select[Range[0, 10000], q] (* Amiram Eldar, Apr 23 2025 *)
  • PARI
    isok(k) = my(d=digits(k)); Set(d) == Set(digits(sum(i=1, #d, d[i]^2))); \\ Michel Marcus, May 13 2025
  • Python
    def ok(n): return set(s:=str(n)) == set(str(sum(int(d)**2 for d in s)))
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Apr 23 2025
    

A383347 Numbers that have the same set of digits as the sum of the cubes of their digits.

Original entry on oeis.org

0, 1, 135, 137, 153, 173, 307, 315, 317, 351, 370, 371, 407, 470, 513, 531, 703, 704, 713, 730, 731, 740, 3007, 3070, 3700, 4007, 4070, 4700, 7003, 7004, 7030, 7040, 7300, 7400, 11112, 11113, 11121, 11131, 11211, 11311, 12111, 12599, 12959, 12995, 13111, 15299
Offset: 1

Views

Author

Jean-Marc Rebert, Apr 24 2025

Keywords

Comments

Contains 3*10^j + 7*10^k and 4*10^j + 7*10^k if j <> k and max(j,k) >= 2. - Robert Israel, Apr 25 2025

Examples

			135 and 1^3 + 3^3 + 5^3 = 153 have the same set of digits {1,3,5}, so 135 is a term.
		

Crossrefs

Cf. A046197 (a subsequence).

Programs

  • Maple
    filter:= proc(n) local L,t;
      L:= convert(n,base,10);
      convert(L,set) = convert(convert(add(t^3,t=L),base,10),set)
    end proc:
    select(filter, [$0 .. 10^5]); # Robert Israel, Apr 25 2025
  • Mathematica
    q[k_] := Module[{d = IntegerDigits[k]}, Union[d] == Union[IntegerDigits[Total[d^3]]]]; Select[Range[0, 16000], q] (* Amiram Eldar, Apr 24 2025 *)
  • PARI
    isok(k) = my(d=digits(k)); Set(d) == Set(digits(sum(i=1, #d, d[i]^3))); \\ Michel Marcus, Apr 24 2025
  • Python
    def ok(n): return set(s:=str(n)) == set(str(sum(int(d)**3 for d in s)))
    print([k for k in range(2*10**4) if ok(k)]) # Michael S. Branicky, Apr 24 2025
    

A383349 Numbers that have the same set of digits as the sum of 4th powers of its digits.

Original entry on oeis.org

0, 1, 488, 668, 686, 848, 866, 884, 1346, 1364, 1436, 1463, 1634, 1643, 2088, 2556, 2565, 2655, 2808, 2880, 3146, 3164, 3416, 3461, 3614, 3641, 4136, 4163, 4316, 4361, 4479, 4497, 4613, 4631, 4749, 4794, 4947, 4974, 5256, 5265, 5526, 5562, 5625, 5652, 6134, 6143
Offset: 1

Views

Author

Jean-Marc Rebert, Apr 24 2025

Keywords

Examples

			488 and 4^4 + 8^4 + 8^4 = 8448 have the same set of digits {4,8}, so 488 is a term.
		

Crossrefs

Cf. A052455 (a subsequence).

Programs

  • Mathematica
    q[k_] := Module[{d = IntegerDigits[k]}, Union[d] == Union[IntegerDigits[Total[d^4]]]]; Select[Range[0, 7000], q] (* Amiram Eldar, Apr 24 2025 *)
  • PARI
    isok(k) = my(d=digits(k)); Set(d) == Set(digits(sum(i=1, #d, d[i]^4))); \\ Michel Marcus, Apr 24 2025
    
  • Python
    def ok(n): return set(s:=str(n)) == set(str(sum(int(d)**4 for d in s)))
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Apr 24 2025
Showing 1-6 of 6 results.