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.
%I A380974 #44 Feb 21 2025 13:07:40 %S A380974 4,5,6,7,8,9,10,11,17,24,25,32,34,67,75,78,100,101,142,167,334,667, %T A380974 1000,1001,1667,3334,6667,10000,10001,16667,33334,66667,100000,100001, %U A380974 166667,333334,666667,1000000,1000001,1666667,3333334,6666667,10000000,10000001,16666667,33333334,66666667,100000000 %N A380974 Numbers k such that k*(k-1) is composed of exactly two different decimal digits. %C A380974 Numbers k such that A002378(k-1) is in A031955. %C A380974 Conjecture: all terms >= 334 are of the form 10...0, 10...01, 16...67, 3...34, or 6...67. %C A380974 Last decimal digit of a(n)*(a(n)-1) is either 0, 2 or 6. - _Chai Wah Wu_, Feb 19 2025 %H A380974 Michael S. Branicky, <a href="/A380974/b380974.txt">Table of n, a(n) for n = 1..117</a> %F A380974 Conjectured: for k >= 0, %F A380974 a(20 + 5*k) = (10^(3+k) + 2)/6, %F A380974 a(21 + 5*k) = (10^(3+k) + 2)/3, %F A380974 a(22 + 5*k) = (2*10^(3+k)+1)/3, %F A380974 a(23 + 5*k) = 10^(3+k), %F A380974 a(24 + 5*k) = 10^(3+k) + 1. %F A380974 Conjectured G.f.: (4*x + 5*x^2 + 6*x^3 + 7*x^4 + 8*x^5 - 35*x^6 - 45*x^7 - 55*x^8 - 60*x^9 - 64*x^10 - 34*x^11 - 28*x^12 - 27*x^13 - 50*x^14 - 109*x^15 - 107*x^16 - 152*x^17 - 163*x^18 - 425*x^19 - 418*x^20 - 274*x^21 - 113*x^22 + 229*x^23 + 109*x^24 + 580*x^25 + 440*x^26 + 330*x^27 + 10*x^28 + 410*x^29)/(1 - 11 * x^5 + 10 * x^10). %e A380974 a(10) = 23 is a term because 23 * 24 = 552 contains two different digits 2 and 5. %p A380974 select(k -> nops(convert(convert(k*(k+1),base,10),set)) = 2, [$1..10^6]); %t A380974 Select[Range[10^7],Length[Union[IntegerDigits[#*(#-1)]]]==2&] (* _James C. McMahon_, Feb 13 2025 *) %o A380974 (PARI) isok(k) = #Set(digits(k*(k-1))) == 2; \\ _Michel Marcus_, Feb 11 2025 %o A380974 (Python) %o A380974 from math import isqrt %o A380974 from itertools import count, combinations, product, islice %o A380974 def A380974_gen(): # generator of terms %o A380974 for n in count(1): %o A380974 c = [] %o A380974 for a in combinations('0123456789',2): %o A380974 if '0' in a or '2' in a or '6' in a: %o A380974 for b in product(a,repeat=n): %o A380974 if b[0] != '0' and b[-1] in {'0','2','6'} and b != (a[0],)*n and b != (a[1],)*n: %o A380974 m = int(''.join(b)) %o A380974 q = isqrt(m) %o A380974 if q*(q+1)==m: %o A380974 c.append(q+1) %o A380974 yield from sorted(c) %o A380974 A380974_list = list(islice(A380974_gen(),30)) # _Chai Wah Wu_, Feb 19 2025 %Y A380974 Cf. A002378, A031955, A016069, A380984. %K A380974 nonn,base %O A380974 1,1 %A A380974 _Robert Israel_, Feb 11 2025