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 21-25 of 25 results.

A266181 Numbers k such that k == d_1 (mod 2), k == d_2 (mod 3), k == d_3 (mod 4) etc., where d_1 d_2 d_3 ... is the decimal expansion of k.

Original entry on oeis.org

1, 11311, 1032327, 1210565, 11121217, 101033565, 111214177, 113411719, 121254557, 123254387, 10333633323, 12105652565, 11121314781937
Offset: 1

Views

Author

Pieter Post, Dec 29 2015

Keywords

Comments

Subsequence of A131835, the numbers starting with 1. - Michel Marcus, Dec 30 2015
If it exists, a(14) >= 10^21. - Hiroaki Yamanouchi, Jan 12 2016
Definition assumes that d_i are residues, as otherwise 2,3,...,9 are also terms. - Chai Wah Wu, Jun 23 2020

Examples

			11311 == 1 (mod 2),
11311 == 1 (mod 3),
11311 == 3 (mod 4),
11311 == 1 (mod 5),
11311 == 1 (mod 6).
		

Crossrefs

Cf. A131835.

Programs

  • Mathematica
    Select[Range@ 2000000, First@ Union@ Function[k, MapIndexed[Mod[k, First@ #2 + 1] == #1 &, IntegerDigits@ k]]@ # &] (* Michael De Vlieger, Dec 30 2015 *)
  • PARI
    isok(n) = {my(d = digits(n)); for (i=1, #d, if (n % (i+1) != d[i], return (0));); return (1);} \\ Michel Marcus, Dec 30 2015
  • Python
    for b in range (3,11):
        for i in range (10**(b-2), 13*10**(b-3)):
            si,k,kk=str(i),0,i
            for j in range(1,b):
                if int(si[len(str(i))-j])==kk%(b+1-j):
                    k=k+1
            if k==len(str(i)):
                print (i)
    
  • Python
    def ok(n): return all(n%i == di for i, di in enumerate(map(int, str(n)), 2)) # Michael S. Branicky, Jan 21 2025
    

Extensions

a(6)-a(12) from Michel Marcus, Dec 30 2015
a(13) from Hiroaki Yamanouchi, Jan 12 2016

A068359 Binomial(2k,k) when the first digit of binomial(2k,k) is 1.

Original entry on oeis.org

1, 12870, 184756, 10400600, 155117520, 137846528820, 126410606437752, 1946939425648112, 118264581564861424, 1832624140942590534, 112186277816662845432, 1746130564335626209832, 107507208733336176461620, 1678910486211891090247320, 103827421287553411369671120
Offset: 1

Views

Author

Benoit Cloitre, Feb 28 2002

Keywords

Crossrefs

Intersection of A000984 and A131835.
Cf. A068358 (k values).

Programs

  • Mathematica
    a={}; kmax=40; For[k=0, k<=kmax, k++, If[First[IntegerDigits[term = Binomial[2k, k]]]==1, AppendTo[a, term]]]; a (* Stefano Spezia, Sep 06 2022 *)

Extensions

a(1) = 1 inserted by Stefano Spezia, Sep 06 2022

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

A045725 Fibonacci numbers having initial digit '1'.

Original entry on oeis.org

1, 13, 144, 1597, 10946, 17711, 121393, 196418, 1346269, 14930352, 102334155, 165580141, 1134903170, 1836311903, 12586269025, 139583862445, 1548008755920, 10610209857723, 17167680177565, 117669030460994, 190392490709135, 1304969544928657, 14472334024676221, 160500643816367088
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A105501.
Intersection of A000045 and A131835.

Programs

  • Magma
    [Fibonacci(n): n in [2..100] | Intseq(Fibonacci(n))[#Intseq(Fibonacci(n))] eq 1]; // Vincenzo Librandi, Jan 30 2019
    
  • Mathematica
    Select[Fibonacci[Range[2, 100]], IntegerDigits[#, 10][[1]] == 1 &] (* T. D. Noe, Nov 01 2006 *)
  • PARI
    select(x->(digits(x)[1] == 1), vector(85, n, fibonacci(n+1))) \\ Michel Marcus, Jan 30 2019
    
  • Scala
    def fibonacci(n: BigInt): BigInt = {
      val zero = BigInt(0)
      def fibTail(n: BigInt, a: BigInt, b: BigInt): BigInt = n match {
        case `zero` => a
        case _ => fibTail(n - 1, b, a + b)
      }
      fibTail(n, 0, 1)
    } // Tail recursion by Dario Carrrasquel
    ((2 to 100).map(fibonacci())).filter(.toString.startsWith("1")) // Alonso del Arte, Apr 22 2019

Extensions

Corrected by T. D. Noe, Nov 01 2006

A357273 Integers m whose decimal expansion is a prefix of the concatenation of the divisors of m.

Original entry on oeis.org

1, 11, 12, 124, 135, 1111, 1525, 13515, 124816, 1223462, 12356910, 13919571, 1210320658, 1243162124, 1525125625, 12346121028, 12478141928, 12510153130, 12510254150, 1234689111216, 1351553159265, 1597717414885, 1713913539247, 12356910151830, 13791121336377
Offset: 1

Views

Author

Michel Marcus, Sep 22 2022

Keywords

Comments

This is different from A175252 in that the digits to be concatenated can end in the middle of a divisor.
All terms start with the digit 1. - Chai Wah Wu, Sep 23 2022
a(26) > 10^14. - Giovanni Resta, Oct 20 2022

Examples

			11 is a term since its divisors are 1 and 11 whose concatenation is 111 whose first 2 digits are 11.
1111 is a term since its divisors are 1, 11, 101, and 1111 whose concatenation is 1111011111 whose first 4 digits are 1111.
		

Crossrefs

Cf. A037278, A175252 (a subsequence).
Cf. A004022 (a subsequence).
Subsequence of A131835.

Programs

  • Mathematica
    q[n_] := (Join @@ IntegerDigits @ Divisors[n])[[1 ;; Length @ (d = IntegerDigits[n])]] == d; Select[Range[1.3*10^6], q] (* Amiram Eldar, Sep 22 2022 *)
  • PARI
    f(n) = my(s=""); fordiv(n, d, s = concat(s, Str(d))); s; \\ A037278
    isok(k) = if (k==1, 1, my(v=strsplit(f(k), Str(k))); (v[1] == ""));
    
  • Python
    from sympy import divisors
    def ok(n): return "".join(str(d) for d in divisors(n)).startswith(str(n))
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Sep 22 2022
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A357273_gen(): # generator of terms
        yield 1
        for n in count(1):
            r = str(n)
            if n&1 or r.startswith('2'):
                m = 10**(c:=len(r))+n
                s, sm = '', str(m)
                for d in divisors(m):
                    s += str(d)
                    if len(s) >= c+1:
                        break
                if s.startswith(sm):
                    yield m
    A357273_list = list(islice(A357273_gen(),10)) # Chai Wah Wu, Sep 23 2022

Extensions

a(16)-a(25) from Giovanni Resta, Oct 20 2022
Previous Showing 21-25 of 25 results.