VOOZH about

URL: https://oeis.org/A160851

⇱ A160851 - OEIS


login
A160851
Numbers which are a difference of two of their own anagrams.
3
459, 495, 1089, 1269, 1467, 1476, 1503, 1530, 1692, 1746, 2385, 2439, 2493, 2502, 2520, 2538, 2691, 2853, 3285, 3501, 3510, 4095, 4392, 4590, 4599, 4671, 4698, 4797, 4896, 4932, 4950, 4959, 4968, 4977, 4986, 4995, 5238, 5382, 5409, 6147, 6174, 6921, 8019, 8091
OFFSET
1,1
COMMENTS
An anagram of a number k is a number formed by one of the k! permutations of its digits.
All terms are divisible by 9. - David A. Corneth, Jun 06 2025
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1000 terms from Gonzalo Martínez)
David A. Corneth, PARI program
EXAMPLE
459 = 954 - 495;
495 = 954 - 459;
1089 = 9108 - 8019;
1269 = 2961 - 1692;
1467 = 7641 - 6174;
1476 = 6147 - 4671;
2538 = 5823 - 3285;
6174 = 7641 - 1467;
10989 = 91908 - 80919;
12969 = 29961 - 16992.
PROG
(Python)
from itertools import permutations
def ok(k):
anagram = {int(''.join(p)) for p in permutations(str(k)) if p[0] != '0'}
anagram.discard(k)
return any(a != b and a - b == k for a in anagram for b in anagram)
print([k for k in range(10, 10000) if ok(k)]), #Gonzalo Martínez, May 28 2025
(PARI) \\ See Corneth link
CROSSREFS
Sequence in context: A286845 A062043 A331468 * A124620 A224456 A121970
KEYWORD
nonn,base
AUTHOR
Claudio Meller, May 28 2009
EXTENSIONS
Definition edited by R. J. Mathar, May 30 2009
a(1), a(5)-a(15) inserted by Gonzalo Martínez May 28 2025
STATUS
approved