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-10 of 10 results.

A131835 Numbers starting with 1.

Original entry on oeis.org

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
Offset: 1

Views

Author

Andrew Good (yipes_stripes(AT)yahoo.com), Jul 20 2007

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/9 and 5/9, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Subsequence of A011531.
Disjoint union of A045707 and A206286.
Cf. A000030, A000027, A002275, A262390 (permutation).

Programs

  • Haskell
    a131835 n = a131835_list !! (n-1)
    a131835_list = concat $
                   iterate (concatMap (\x -> map (+ 10 * x) [0..9])) [1]
    -- Reinhard Zumkeller, Jul 16 2014
    
  • Maple
    isA131835 := proc(n) if op(-1,convert(n,base,10)) = 1 then true; else false ; fi ; end: for n from 1 to 300 do if isA131835(n) then printf("%d, ",n) ; fi ; od : # R. J. Mathar, Jul 24 2007
  • Mathematica
    Select[Range[150], IntegerDigits[#][[1]] == 1 &] (* Amiram Eldar, Feb 27 2021 *)
  • PARI
    a(n, {base=10}) = my (o=1); while (n>o, n-=o; o*=base); return (o+n-1) \\ Rémy Sigrist, Jun 23 2017
    
  • PARI
    a(n) = n--; s = #digits(9*n+1); n + 8 * (10^(s-1))/9 + 1/9 \\ David A. Corneth, Jun 23 2017
    
  • PARI
    nxt(n) = my(d = digits(n+1)); if(d[1]==1, n+1, 10^#d) \\ David A. Corneth, Jun 23 2017
    
  • Python
    def A131835(n): return n+(10**(len(str(9*n-8))-1)<<3)//9 # Chai Wah Wu, Dec 07 2024

Formula

A000030(a(n)) = 1. - Reinhard Zumkeller, Jul 16 2014
a(A002275(n)+1) = 10^n for any n >= 0. - Rémy Sigrist, Jun 23 2017
a(n) = n + (8*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 16 2023

Extensions

More terms from R. J. Mathar, Jul 24 2007

A217398 Numbers starting with 5.

Original entry on oeis.org

5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/45 and 5/27, respectively. - Amiram Eldar, Feb 27 2021
Also numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 5. - Stefano Spezia, Jul 08 2025

Crossrefs

Programs

  • Haskell
    a217398 n = a217398_list !! (n-1)
    a217398_list = filter ((== 5) . a000030) [1..]
    -- Reinhard Zumkeller, Mar 13 2014
    
  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 5 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217398(n): return n+(44*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

A000030(a(n)) = 5; A143473(a(n)) = a(n). - Reinhard Zumkeller, Mar 13 2014
a(n) = n + (44*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A217394 Numbers starting with 2.

Original entry on oeis.org

2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/18 and 10/27, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[300], IntegerDigits[#][[1]] == 2 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def agen():
      yield 2
      digits, adder = 1, 20
      while True:
        for i in range(10**digits): yield adder + i
        digits, adder = digits+1, adder*10
    g = agen()
    print([next(g) for i in range(54)]) # Michael S. Branicky, Feb 20 2021
    
  • Python
    def A217394(n): return n+(17*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (17*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 15 2023

A217399 Numbers starting with 6.

Original entry on oeis.org

6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/54 and 10/63, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • GAP
    Flat(List([0..2],n->List([0..10^n-1],k->6*10^n+k))); # Muniru A Asiru, Nov 21 2018
    
  • Magma
    [n: n in [1..1600] | Intseq(n)[#Intseq(n)] eq 6]; // Vincenzo Librandi, Nov 24 2018
    
  • Maple
    seq(seq(6*10^n+k, k=0..10^n-1),n=0..3); # Robert Israel, May 08 2017
  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 6 &] (* T. D. Noe, Oct 02 2012 *)
  • PARI
    isok(n) = digits(n)[1] == 6; \\ Michel Marcus, May 08 2017
    
  • Python
    def A217399(n): return n+(53*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (53*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A077679 Squarefree numbers beginning with 3.

Original entry on oeis.org

3, 30, 31, 33, 34, 35, 37, 38, 39, 301, 302, 303, 305, 307, 309, 310, 311, 313, 314, 317, 318, 319, 321, 322, 323, 326, 327, 329, 330, 331, 334, 335, 337, 339, 341, 345, 346, 347, 349, 353, 354, 355, 357, 358, 359, 362, 365, 366, 367, 370, 371, 373, 374, 377
Offset: 1

Views

Author

Amarnath Murthy, Nov 16 2002

Keywords

Comments

Intersection of A005117 and A217395. - Michel Marcus, Sep 14 2013
Lower density is 1/(5*Pi^2), upper density is 5/(3*Pi^2). - Charles R Greathouse IV, Nov 05 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[400],SquareFreeQ[#]&&IntegerDigits[#][[1]]==3&] (* Harvey P. Dale, Oct 10 2018 *)
  • PARI
    isok(n) = (issquarefree(n) && (digits(n, 10)[1] == 3)) \\ Michel Marcus, Jul 31 2013

Extensions

More terms from Sascha Kurz, Jan 28 2003

A217397 Numbers starting with 4.

Original entry on oeis.org

4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/36 and 2/9, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 4 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217397(n): return n+(35*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (35*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A217400 Numbers starting with 7.

Original entry on oeis.org

7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/63 and 5/36, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 7 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217400(n): return n+(62*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (62*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A217401 Numbers starting with 8.

Original entry on oeis.org

8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/72 and 10/81, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 8 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217401(n): return n+(71*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (71*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A217402 Numbers starting with 9.

Original entry on oeis.org

9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/81 and 1/9, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 9 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217402(n): return n+(80*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (80*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A341909 a(0) = 0; for n > 0, a(n) is the smallest positive integer not yet in the sequence such that the first digit of a(n) differs by 1 from the last digit of a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 80, 10, 11, 20, 12, 13, 21, 22, 14, 30, 15, 40, 16, 50, 17, 60, 18, 70, 19, 81, 23, 24, 31, 25, 41, 26, 51, 27, 61, 28, 71, 29, 82, 32, 33, 42, 34, 35, 43, 44, 36, 52, 37, 62, 38, 72, 39, 83, 45, 46, 53, 47, 63, 48, 73, 49, 84, 54, 55, 64, 56, 57, 65, 66, 58, 74, 59
Offset: 0

Views

Author

Scott R. Shannon, Feb 23 2021

Keywords

Examples

			a(10) = 80 as the last digit of a(9) = 9 is 9, thus the first digit of a(10) must be 8. As 8 has already been used the next smallest number starting with 8 is 80.
a(16) = 21 as the last digit of a(15) = 13 is 3, thus the first digit of a(16) must be 2 or 4. As 2, 4 and 20 have already been used the next smallest number starting with 2 is 21.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {0}, k}, Do[k = 1; While[Nand[FreeQ[a, k], Abs[First@ IntegerDigits[k] - Mod[a[[-1]], 10]] == 1], k++]; AppendTo[a, k], {i, 76}]; a] (* Michael De Vlieger, Feb 23 2021 *)
  • Python
    def nextd(strn, d):
      n = int(strn) if strn != "" else 0
      return n+1 if str(n+1)[0] == str(d) else int(str(d)+'0'*len(strn))
    def aupton(term):
      alst, aset = [0], {0}
      lastdstr = ["" for d in range(10)]
      for n in range(1, term+1):
        lastdig = alst[-1]%10
        firstdigs = set([max(lastdig-1, 0), min(lastdig+1, 9)]) - {0}
        cands = [nextd(lastdstr[d], d) for d in firstdigs]
        m = min(cands)
        argmin = cands.index(m)
        alst.append(m)
        strm = str(m)
        lastdstr[int(strm[0])] = strm
      return alst
    print(aupton(76)) # Michael S. Branicky, Feb 23 2021
Showing 1-10 of 10 results.