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.

Showing 1-8 of 8 results.

A366959 Numbers whose difference between the largest and smallest digits is equal to 2.

Original entry on oeis.org

13, 20, 24, 31, 35, 42, 46, 53, 57, 64, 68, 75, 79, 86, 97, 102, 113, 120, 123, 131, 132, 133, 200, 201, 202, 210, 213, 220, 224, 231, 234, 242, 243, 244, 311, 312, 313, 321, 324, 331, 335, 342, 345, 353, 354, 355, 422, 423, 424, 432, 435, 442, 446, 453, 456, 464, 465, 466
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is (46*3^n - 93*2^n + 48)/6.

Crossrefs

Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).

Programs

  • Maple
    F:= proc(d) local L,i;
       L:= select(t -> max(t) = 2 and min(t) = 0, map(convert,[$3^d..2*3^d-1],base,3));
       L:= map(t -> add(t[-i-1]*10^(i-1),i=1..nops(t)-1),L);
       L:= map(t -> seq(t+i*(10^d-1)/9,i=0..7), L);
       op(sort(select(t -> t >= 10^(d-1), L)));
    end proc:
    F(2), F(3), F(4); # Robert Israel, Nov 10 2023
  • Mathematica
    Select[Range[500],Max[d=IntegerDigits[#]]-Min[d]==2 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 2; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 2
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    
  • Python
    from itertools import chain, count, islice, combinations_with_replacement
    from sympy.utilities.iterables import multiset_permutations
    def A366959_gen(): # generator of terms
        return chain.from_iterable(sorted(int(''.join(str(d) for d in t)) for a in range(8) for c in combinations_with_replacement(range(a,a+3),l) for t in multiset_permutations((a,a+2)+c) if t[0]) for l in count(0))
    A366959_list = list(islice(A366959_gen(),30)) # Chai Wah Wu, Nov 10 2023
    

A366960 Numbers whose difference between the largest and smallest digits is equal to 3.

Original entry on oeis.org

14, 25, 30, 36, 41, 47, 52, 58, 63, 69, 74, 85, 96, 103, 114, 124, 130, 134, 141, 142, 143, 144, 203, 214, 225, 230, 235, 241, 245, 252, 253, 254, 255, 300, 301, 302, 303, 310, 314, 320, 325, 330, 336, 341, 346, 352, 356, 363, 364, 365, 366, 411, 412, 413, 414
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is 27*4^(n-1) - 41*3^(n-1) + 7*2^n.

Crossrefs

Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).

Programs

  • Mathematica
    Select[Range[415],Max[d=IntegerDigits[#]]-Min[d]==3 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 3; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 3
    print([k for k in range(420) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    
  • Python
    from itertools import chain, count, islice, combinations_with_replacement
    from sympy.utilities.iterables import multiset_permutations
    def A366960_gen(): # generator of terms
        return chain.from_iterable(sorted(int(''.join(str(d) for d in t)) for a in range(7) for c in combinations_with_replacement(range(a,a+4),l) for t in multiset_permutations((a,a+3)+c) if t[0]) for l in count(0))
    A366960_list = list(islice(A366960_gen(),30)) # Chai Wah Wu, Nov 10 2023
    

A366961 Numbers whose difference between the largest and smallest digits is equal to 4.

Original entry on oeis.org

15, 26, 37, 40, 48, 51, 59, 62, 73, 84, 95, 104, 115, 125, 135, 140, 145, 151, 152, 153, 154, 155, 204, 215, 226, 236, 240, 246, 251, 256, 262, 263, 264, 265, 266, 304, 315, 326, 337, 340, 347, 351, 357, 362, 367, 373, 374, 375, 376, 377, 400, 401, 402, 403, 404, 410
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms is 29*5^(n-1) - 47*4^(n-1) + 2*3^(n+1).

Crossrefs

Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366962 (difference = 5), A366963 (difference = 6), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).

Programs

  • Mathematica
    Select[Range[410],Max[d=IntegerDigits[#]]-Min[d]==4 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 4; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 4
    print([k for k in range(411) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    

A366962 Numbers whose difference between the largest and smallest digits is equal to 5.

Original entry on oeis.org

16, 27, 38, 49, 50, 61, 72, 83, 94, 105, 116, 126, 136, 146, 150, 156, 161, 162, 163, 164, 165, 166, 205, 216, 227, 237, 247, 250, 257, 261, 267, 272, 273, 274, 275, 276, 277, 305, 316, 327, 338, 348, 350, 358, 361, 368, 372, 378, 383, 384, 385, 386, 387, 388
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is 29*6^(n-1) - 49*5^(n-1) + 5*4^n.

Crossrefs

Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366963 (difference = 6), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).

Programs

  • Mathematica
    Select[Range[400],Max[d=IntegerDigits[#]]-Min[d]==5 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 5; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 5
    print([k for k in range(400) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    

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

Original entry on oeis.org

17, 28, 39, 60, 71, 82, 93, 106, 117, 127, 137, 147, 157, 160, 167, 171, 172, 173, 174, 175, 176, 177, 206, 217, 228, 238, 248, 258, 260, 268, 271, 278, 282, 283, 284, 285, 286, 287, 288, 306, 317, 328, 339, 349, 359, 360, 369, 371, 379, 382, 389, 393, 394, 395, 396, 397, 398, 399
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is 27*7^(n-1) - 47*6^(n-1) + 4*5^n.

Crossrefs

Cf. A037904.
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).

Programs

  • Mathematica
    Select[Range[400],Max[d=IntegerDigits[#]]-Min[d]==6 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 6; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 6
    print([k for k in range(400) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    

A366964 Numbers whose difference between the largest and smallest digits is equal to 7.

Original entry on oeis.org

18, 29, 70, 81, 92, 107, 118, 128, 138, 148, 158, 168, 170, 178, 181, 182, 183, 184, 185, 186, 187, 188, 207, 218, 229, 239, 249, 259, 269, 270, 279, 281, 289, 292, 293, 294, 295, 296, 297, 298, 299, 307, 318, 329, 370, 381, 392, 407, 418, 429, 470, 481, 492
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms is 23*8^(n-1) - 41*7^(n-1) + 2^n*3^(n+1).

Crossrefs

Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366965 (difference = 8), A366966 (difference = 9).

Programs

  • Mathematica
    Select[Range[500],Max[d=IntegerDigits[#]]-Min[d]==7 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 7; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 7
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    

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

Original entry on oeis.org

19, 80, 91, 108, 119, 129, 139, 149, 159, 169, 179, 180, 189, 191, 192, 193, 194, 195, 196, 197, 198, 199, 208, 219, 280, 291, 308, 319, 380, 391, 408, 419, 480, 491, 508, 519, 580, 591, 608, 619, 680, 691, 708, 719, 780, 791, 800, 801, 802, 803, 804, 805, 806, 807, 808, 810
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is 17*9^(n-1) - 31*8^(n-1) + 2*7^n.

Crossrefs

Cf. A037904.
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).

Programs

  • Mathematica
    Select[Range[810],Max[d=IntegerDigits[#]]-Min[d]==8 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 8; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 8
    print([k for k in range(900) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    

A366966 Numbers whose difference between the largest and smallest digits is equal to 9.

Original entry on oeis.org

90, 109, 190, 209, 290, 309, 390, 409, 490, 509, 590, 609, 690, 709, 790, 809, 890, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1009, 1019, 1029, 1039, 1049, 1059, 1069, 1079, 1089, 1090, 1091, 1092, 1093, 1094, 1095
Offset: 1

Views

Author

Stefano Spezia, Oct 30 2023

Keywords

Comments

The number of n-digit terms of this sequence is 9*10^(n-1) - 17*9^(n-1) + 8^n.

Crossrefs

Cf. A037904.
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), A366965 (difference = 8).

Programs

  • Mathematica
    Select[Range[1095],Max[d=IntegerDigits[#]]-Min[d]==9 &]
  • PARI
    isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 9; \\ Michel Marcus, Nov 05 2023
  • Python
    def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 9
    print([k for k in range(1100) if ok(k)]) # Michael S. Branicky, Oct 30 2023
    
  • Python
    from itertools import chain, count, islice, combinations_with_replacement
    from sympy.utilities.iterables import multiset_permutations
    def A366966_gen(): # generator of terms
        return chain.from_iterable(sorted(int(''.join(str(d) for d in t)) for c in combinations_with_replacement(range(10),l) for t in multiset_permutations((0,9)+c) if t[0]) for l in count(0))
    A366966_list = list(islice(A366966_gen(),30)) # Chai Wah Wu, Nov 10 2023
    
Showing 1-8 of 8 results.