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

A241946 Numbers n equal to the sum of all the four-digit numbers formed without repetition from the digits of n.

Original entry on oeis.org

1001, 1111, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 2002, 2112, 2222, 2332, 2442, 2552, 2662, 2772, 2882, 2992, 3003, 3113, 3223, 3333, 3443, 3553, 3663, 3773, 3883, 3993, 4004, 4114, 4224, 4334, 4444, 4554, 4664, 4774, 4884, 4994, 5005, 5115, 5225
Offset: 1

Views

Author

Michel Lagneau, May 03 2014

Keywords

Comments

Let d(1)d(2)... d(q) denote the decimal expansion of a number n. Any decimal expansion of four-digits d(i)d(j)d(k)d(l) formed from the digits of n is such that ij>k>l.
This sequence is interesting because it contains more than just the only trivial palindromic values 1001, 1111, 1221,... The sequence is given by the union of subsets {palindromes with four digits from A056524} union {37323, 48015, 72468, 152658} and contains 94 elements. The last four elements are non-palindromic numbers.
But the generalization of this problem seems difficult, for example the case with the sum of all the three-digit numbers formed without repetition from the digits of n gives only 90 palindromic numbers 101, 111, 121,..., 989,999.

Examples

			37323 is in the sequence because 37323 =  2373 + 3233 + 3237 + 3273 + 3323 + 3373 + 3723 + 3732 + 3733 + 7323.
		

Crossrefs

Cf. A241899.

Programs

  • Maple
    with(numtheory):
    for n from 1000 to 10000 do:
         lst:={}:k:=0:x:=convert(n,base,10):n1:=nops(x):
            for i from 1 to n1 do:
              for j from i+1 to n1 do:
                for m from j+1 to n1 do:
                  for q from m+1 to n1 do:
                lst:=lst union {x[i]+10*x[j]+100*x[m]+1000*x[q]}:
                od:
              od:
            od:
            od:
               for a from n1 by -1 to 1 do:
                 for b from a-1 by -1 to 1 do:
                   for c from b-1 by -1 to 1 do:
                     for d from c-1 by -1 to 1 do:
                   lst:=lst union
                   {x[a]+10*x[b]+100*x[c]+1000*x[d]}:
                   od:
                 od:
                od:
                od:
               n2:=nops(lst):s:=sum('lst[i]', 'i'=1..n2):
               if s=n
                 then
                 printf(`%d, `,n):
                 else
               fi:
      od:

A319274 Osiris or Digit re-assembly numbers: numbers that are equal to the sum of permutations of subsamples of their own digits.

Original entry on oeis.org

132, 264, 396, 8991, 10545, 35964, 255530, 1559844, 9299907, 47755078, 89599104, 167264994, 283797162, 473995260, 3929996070, 6379993620, 10009998999, 11111111110, 22222222220, 33333333330, 44444444440, 55555555550, 66666666660, 77777777770, 88888888880, 99999999990
Offset: 1

Views

Author

Pieter Post, Sep 16 2018

Keywords

Comments

This sequence differs from A241754 because this sequence uses permutations only once.
Permutations are of the same length k, leading zeros are allowed.
The k's in the sequence are: 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 7, 7, 8, 7, 9, 9.

Examples

			10545 = 014 + 015 + 041 + 045 + 051 + 054 + 055 + 104 + 105 + 140 + 145 + 150 + 154 + 155 + 401 + 405 + 410 + 415 + 450 + 451 + 455 + 501 + 504 + 505 + 510 + 514 + 515 + 540 + 541 + 545 + 550 + 551 + 554.
		

Crossrefs

Programs

  • Python
    import itertools
    def getData(a, b):
        dig = (itertools.permutations(str(a), b))
        for d in dig:
            yield d
    for w in range(2, 6):
        kk=int(w*'1')
        for i in range (kk, 10**(w+3), kk):
            m=[]
            get = getData(i, w)
            while True:
                try:
                    n = next(get)
                    ee=int("".join((n)))
                    if ee not in m:
                        m.append(ee)
                except StopIteration:
                    if sum (m)==i and len(m)>1:
                        m.sort()
                        print (sum(m), len(m), m, i)
                    break

Extensions

a(12)-a(26) from Giovanni Resta, Sep 16 2018
Showing 1-2 of 2 results.