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

A384433 Integers k that are equal to the sum of at least two distinct of their anagrams, which must have the same number of digits as k.

Original entry on oeis.org

954, 2961, 4617, 4851, 4932, 5013, 5022, 5031, 5103, 5112, 5184, 5238, 5823, 5913, 6012, 6021, 6102, 6129, 6147, 6171, 6180, 6192, 6210, 6219, 6291, 6312, 6321, 6417, 6519, 6915, 6921, 7125, 7128, 7149, 7152, 7182, 7194, 7218, 7251, 7281, 7341, 7416, 7431
Offset: 1

Views

Author

Gonzalo Martínez, May 28 2025

Keywords

Comments

This sequence consists of integers k that are equal to the sum of at least two of their own digit permutations. All anagrams must have the same number of digits as k, so permutations with leading zeros are not allowed.
Unlike Osiris numbers (A319274), which are formed by summing permutations of digit subsamples, these numbers require the use of all digits in each term of the sum.
All terms are divisible by 3. Proof: if a term t is in the sequence then it is a sum of at least 2 anagrams and at most 9 anagrams. The remainder of any q anagrams of t is (q*t) mod 9 which is never equivalent t mod 9 since t mod 3 is nonzero. - David A. Corneth, Jun 05 2025

Examples

			4617 is in this list, since 4617 = 1467 + 1476 + 1674, where 1467, 1476 and 1674 are anagrams of 4617.
921 is not in the sequence even though 921 = 192 + 219 + 219 + 291. - _David A. Corneth_, Jun 05 2025
		

Crossrefs

Programs

  • Python
    from itertools import permutations
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def anagrams(k):
        s = str(k)
        return sorted({int(''.join(p)) for p in permutations(s) if p[0] != '0' and int(''.join(p)) != k})
    def ok(k):
        def back(i, acc):
            if acc == k: return True
            if acc > k or i == len(a): return False
            return back(i + 1, acc + a[i]) or back(i + 1, acc)
        a = anagrams(k)
        return back(0, 0)
    print([k for k in range(10, 10000) if ok(k)])
Showing 1-1 of 1 results.