login
Anagraprod Integers. Integers N that reproduce their multiset of digits when all the products of two successive digits of N are done (and considered together).
3

%I #27 Nov 30 2024 19:27:18

%S 135,162,261,531,1135,1162,1326,1350,1620,2135,2162,2610,2611,2612,

%T 2613,2614,2615,2616,2617,2618,2619,3135,3162,4135,4162,5135,5162,

%U 5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,6135,6162,6231,7135,7162,8135,8162,9135,9162,11135,11162,11326,11350,11620,13260,13500,16200,21135,21162,21326,21350,21620,22134,23126,26100,26110,26111,26112,26113,26114,26115

%N Anagraprod Integers. Integers N that reproduce their multiset of digits when all the products of two successive digits of N are done (and considered together).

%C 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.

%H Alois P. Heinz, <a href="/A296451/b296451.txt">Table of n, a(n) for n = 1..500</a> (first 304 terms from Georges Brougnard)

%e 135 reproduces the digits 1, 3 and 5 (in a different order) when the products 1x3=3 and 3x5=15 are done. The same with 162 which reproduces the digit 1, 6 and 2 when the products 1x6=6 and 6x2=12 are made.

%e 1135 is a term: 1*1 = 1, 1*3 = 3, 3*5 = 15 -> multiset {1,1,3,5}.

%e 2162 is a term: 2*1 = 2, 1*6 = 6, 6*2 = 12 -> multiset {1,2,2,6}.

%t A296451Q[k_] := Sort[Flatten[IntegerDigits[Times @@@ Partition[#, 2, 1]]]] == Sort[#] & [IntegerDigits[k]];

%t Select[Range[10000], A296451Q] (* _Paolo Xausa_, Nov 30 2024 *)

%o (Python)

%o def ok(n):

%o s = str(n)

%o d = list(map(int, s))

%o sums = [d[i]*d[i+1] for i in range(len(s)-1)]

%o return sorted(s) == sorted("".join(str(t) for t in sums))

%o print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Nov 27 2024

%Y Cf. A296521, A297627.

%K nonn,base

%O 1,1

%A _Eric Angelini_ and Georges Brougnard, Dec 13 2017