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.

A366963 Numbers whose difference between the largest and smallest digits is equal to 6.

This page as a plain text file.
%I A366963 #12 Nov 10 2023 12:28:01
%S A366963 17,28,39,60,71,82,93,106,117,127,137,147,157,160,167,171,172,173,174,
%T A366963 175,176,177,206,217,228,238,248,258,260,268,271,278,282,283,284,285,
%U A366963 286,287,288,306,317,328,339,349,359,360,369,371,379,382,389,393,394,395,396,397,398,399
%N A366963 Numbers whose difference between the largest and smallest digits is equal to 6.
%C A366963 The number of n-digit terms of this sequence is 27*7^(n-1) - 47*6^(n-1) + 4*5^n.
%t A366963 Select[Range[400],Max[d=IntegerDigits[#]]-Min[d]==6 &]
%o A366963 (Python)
%o A366963 def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 6
%o A366963 print([k for k in range(400) if ok(k)]) # _Michael S. Branicky_, Oct 30 2023
%o A366963 (PARI) isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 6; \\ _Michel Marcus_, Nov 05 2023
%Y A366963 Cf. A037904.
%Y A366963 Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).
%K A366963 nonn,base,easy
%O A366963 1,1
%A A366963 _Stefano Spezia_, Oct 30 2023