cp's OEIS Frontend

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.

A366965 Numbers whose difference between the largest and smallest digits is equal to 8.

This page as a plain text file.
%I A366965 #14 Nov 10 2023 12:26:42
%S A366965 19,80,91,108,119,129,139,149,159,169,179,180,189,191,192,193,194,195,
%T A366965 196,197,198,199,208,219,280,291,308,319,380,391,408,419,480,491,508,
%U A366965 519,580,591,608,619,680,691,708,719,780,791,800,801,802,803,804,805,806,807,808,810
%N A366965 Numbers whose difference between the largest and smallest digits is equal to 8.
%C A366965 The number of n-digit terms of this sequence is 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
%t A366965 Select[Range[810],Max[d=IntegerDigits[#]]-Min[d]==8 &]
%o A366965 (Python)
%o A366965 def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 8
%o A366965 print([k for k in range(900) if ok(k)]) # _Michael S. Branicky_, Oct 30 2023
%o A366965 (PARI) isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 8; \\ _Michel Marcus_, Nov 05 2023
%Y A366965 Cf. A037904.
%Y A366965 Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366964 (difference = 7), A366966 (difference = 9).
%K A366965 nonn,base,easy
%O A366965 1,1
%A A366965 _Stefano Spezia_, Oct 30 2023