OFFSET
1,1
COMMENTS
The sequence is infinite as each term can be extended with as many zeros as wanted. The name "anagraprod numbers" comes from "anagram by product". The "anagrasum numbers" are A296521.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..500 (first 304 terms from Georges Brougnard)
EXAMPLE
135 reproduces the digits 1, 3 and 5 (in a different order) when the products 1*3=3 and 3*5=15 are done. The same with 162 which reproduces the digit 1, 6 and 2 when the products 1*6=6 and 6*2=12 are made.
1135 is a term: 1*1 = 1, 1*3 = 3, 3*5 = 15 -> multiset {1,1,3,5}.
2162 is a term: 2*1 = 2, 1*6 = 6, 6*2 = 12 -> multiset {1,2,2,6}.
MATHEMATICA
A296451Q[k_] := Sort[Flatten[IntegerDigits[Times @@@ Partition[#, 2, 1]]]] == Sort[#] & [IntegerDigits[k]];
Select[Range[10000], A296451Q] (* Paolo Xausa, Nov 30 2024 *)
PROG
(Python)
def ok(n):
s = str(n)
d = list(map(int, s))
sums = [d[i]*d[i+1] for i in range(len(s)-1)]
return sorted(s) == sorted("".join(str(t) for t in sums))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Nov 27 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Georges Brougnard, Dec 13 2017
STATUS
approved
