login
Numbers k such that the decimal digits of k*(k+1) are a permutation of those of k*(k-1).
2

%I #20 May 12 2020 10:59:32

%S 153,729,900,3420,4221,4500,4779,4851,5400,9153,13500,13779,22500,

%T 24498,31500,36927,40500,46647,49221,49779,50202,55152,61353,68994,

%U 69894,77499,80064,82872,83637,84249,90495,102402

%N Numbers k such that the decimal digits of k*(k+1) are a permutation of those of k*(k-1).

%C All terms are divisible by 9. - _Robert Israel_, May 12 2020

%H Robert Israel, <a href="/A181775/b181775.txt">Table of n, a(n) for n = 1..2500</a>

%e 729 is in the sequence because 729*730 = 532170 and 729*728 = 530712.

%p filter:= n -> sort(convert(n*(n+1),base,10))=sort(convert(n*(n-1),base,10)):

%p select(filter, [seq(i,i=9..200000,9)]); # _Robert Israel_, May 11 2020

%t okQ[n_]:=Module[{idn=IntegerDigits[n^2+n]},Sort[idn]==Sort[IntegerDigits[n^2-n]]];Select[Range[100000],okQ]

%o (PARI) isok(k) = vecsort(digits(k*(k+1))) == vecsort(digits(k*(k-1))); \\ _Michel Marcus_, May 12 2020

%Y Cf. A334798.

%K nonn,base

%O 1,1

%A _Michel Lagneau_