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.

Previous Showing 11-12 of 12 results.

A320862 Powers of 2 with initial digit 6.

Original entry on oeis.org

64, 65536, 67108864, 68719476736, 604462909807314587353088, 618970019642690137449562112, 633825300114114700748351602688, 649037107316853453566312041152512, 664613997892457936451903530140172288, 680564733841876926926749214863536422912
Offset: 1

Views

Author

Muniru A Asiru, Oct 23 2018

Keywords

Crossrefs

Cf. A000079 (powers of 2), A008952 (leading digit of 2^n), A217399 (numbers starting with 6).
Powers of 2 with initial digit k, (k = 1..6): A067488, A067480, A320859, A320860, A320861, this sequence.

Programs

  • GAP
    Filtered(List([0..180],n->2^n),i->ListOfDigits(i)[1]=6);
    
  • Magma
    [2^n: n in [1..160] | Intseq(2^n)[#Intseq(2^n)] eq 6]; // G. C. Greubel, Oct 27 2018
  • Maple
    select(x->"6"=""||x[1],[2^n$n=0..180])[];
  • Mathematica
    Select[2^Range[160], First[IntegerDigits[#]] == 6 &] (* G. C. Greubel, Oct 27 2018 *)
  • PARI
    select(x->(digits(x)[1]==6), vector(200, n, 2^n)) \\ Michel Marcus, Oct 26 2018
    

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
Previous Showing 11-12 of 12 results.