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.

A216194 a(n) = Smallest b for which the base b representation of n contains at least one 2 (or 0 if no such base exists).

Original entry on oeis.org

0, 3, 0, 0, 3, 3, 3, 3, 4, 4, 3, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 10, 3, 4, 11, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 4, 3, 6, 5, 3, 3, 3, 3, 4, 4, 3, 6, 4, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Nathan Fox, Mar 12 2013

Keywords

Comments

a(n)=3 if and only if n is in A074940.
a(n) > 0 for n >= 5 since 12 is n written in base n-2.
The only perfect k-th powers (k>=2) that can appear in this sequence are 2^k with k a prime number.
The first n for which a(n)=7 is 849.
The first n for which a(n)=8 is 1084.
The first n for which a(n)=10 is 28. The second is 243.
The first n for which a(n)=11 is 31. The second is 58130496.
a(n)<=11 for all n with fewer than 3000 base 10 digits. No n for which a(n)>11 has been found.

Crossrefs

Programs

  • Maple
    firstNTerms:=proc(n) local b,i,rep,L:
    L:=[]:
    for i from 5 to n do
        b:=3:
        while true do
            rep:=convert(i, base, b):
            if evalb(2 in rep) then
                L:=[op(L), b]:
                break:
            fi:
            b:=b+1:
        od:
    od:
    L:
    end:
  • Mathematica
    sb2[n_]:=Module[{b=3},While[DigitCount[n,b,2]<1,b++];b]; Array[sb2,110,5] (* Harvey P. Dale, Jan 16 2016 *)
    Table[SelectFirst[Range[3, 1200], DigitCount[n, #, 2] > 0 &], {n, 5, 120}] (* Michael De Vlieger, Mar 09 2016, Version 10 *)
  • PARI
    a(n) = if ((n<5) && (n!=2), 0, my(b=3); while (! vecsearch(vecsort(digits(n, b)), 2), b++); b);  \\ Michel Marcus, Aug 06 2014, Mar 11 2016

Extensions

Modified the definition to make the offset 1 by Nathan Fox, Mar 10 2016

A270027 a(n) is the smallest b >= 3 for which the base-b representation of n contains at least one 0 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 3, 4, 5, 3, 7, 4, 3, 3, 3, 3, 13, 7, 3, 4, 4, 3, 3, 3, 3, 11, 23, 3, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 3, 43, 4, 3, 3, 3, 3, 4, 4, 3, 4, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

It is natural to consider this sequence starting from base 3 instead of base 2, as the latter causes most terms to be 2 (see A270026).
a(n) = n if and only if n = 3 or n is in A069575.
a(n) > 0 for n >= 3 since the base-n representation of n is 10.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[3, 10^3], DigitCount[n, #, 0] > 0 &], {n, 3, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if (n < 3, 0, my(b=3); while(vecmin(digits(n, b)), b++); b); \\ Michel Marcus, Mar 10 2016

A270028 a(n) is the smallest b >= 3 for which the base-b representation of n contains at least one 1 (or 0 if no such base exists).

Original entry on oeis.org

3, 0, 3, 3, 3, 4, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 5, 3, 3, 3, 6, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

If we drop the b >= 3 requirement, then this sequence becomes A007395 (the constant 2 sequence).
a(n) > 0 for n >= 3 since the base-(n-1) representation of n is 11.
a(n)=3 if and only if n is in A081606.
The only perfect k-th powers (k >= 2) that can appear in this sequence are 2^k with k a prime number.
The first n for which a(n)=7 is 560.
The first n for which a(n)=8 is 870899850.
The first n for which a(n)=10 is 871017138.
The first n for which a(n)=11 is 65473886952.
The first n for which a(n)=12 is 65473886954.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[3, 10], DigitCount[n, #, 1] > 0 &], {n, 3, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if (n==2, 0, my(b=3); while(!vecsearch(Set(digits(n, b)), 1), b++); b); \\ Michel Marcus, Mar 10 2016

A270029 a(n) is the smallest b for which the base-b representation of n contains at least one 3 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 4, 0, 0, 0, 4, 5, 6, 7, 4, 4, 4, 4, 4, 5, 5, 5, 4, 6, 6, 6, 4, 7, 7, 7, 4, 4, 4, 4, 4, 9, 5, 9, 4, 10, 10, 5, 4, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 17, 5, 5, 4, 5, 5, 7, 4, 7, 5, 7, 4, 4, 4, 4, 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5, 4, 4, 4, 4, 4, 5, 5, 5, 4, 26
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 7 since 13 is n written in base n-3.
The only perfect k-th powers (k >= 2) that can appear in this sequence are 2^k and 3^k with k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[4, 10^3], DigitCount[n, #, 3] > 0 &], {n, 7, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<7) && (n!=3), 0, my(b=4); while(!vecsearch(Set(digits(n, b)), 3), b++); b); \\ Michel Marcus, Mar 10 2016

A270030 a(n) is the smallest b for which the base-b representation of n contains at least one 4 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 0, 5, 0, 0, 0, 0, 5, 6, 7, 8, 9, 5, 11, 6, 13, 7, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 5, 7, 7, 7, 7, 5, 8, 8, 8, 8, 5, 6, 9, 9, 9, 5, 5, 5, 5, 5, 5, 11, 11, 6, 7, 5, 12, 12, 12, 6, 5, 6, 6, 6, 6, 5, 6, 14, 7, 8, 5, 5, 5, 5, 5, 5, 16, 6, 7, 7, 5, 7, 7, 6, 7, 5, 9, 18, 18, 6, 5, 19
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 9 since 14 is n written in base n-4.
The only perfect k-th powers (k >= 2) that can appear in this sequence are 2^k, 3^k, or 4^k, with k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[5, 10^3], DigitCount[n, #, 4] > 0 &], {n, 9, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<9) && (n!=4), 0, my(b=5); while(!vecsearch(Set(digits(n, b)), 4), b++); b); \\ Michel Marcus, Mar 10 2016

A270031 a(n) is the smallest b for which the base-b representation of n contains at least one 5 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 6, 13, 7, 15, 8, 17, 6, 19, 10, 7, 11, 23, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 6, 8, 8, 8, 8, 8, 6, 9, 9, 9, 9, 9, 6, 7, 10, 10, 10, 10, 6, 11, 7, 11, 11, 11, 6, 6, 6, 6, 6, 6, 6, 13, 13, 13, 7, 13, 6, 14, 14, 14, 14, 7, 6, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 11 since 15 is n written in base n-5.
The only perfect k-th powers (k >= 2) that can appear in this sequence are m^k with 2 <= m <= 5 and k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[6, 10^3], DigitCount[n, #, 5] > 0 &], {n, 11, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<11) && (n!=5), 0, my(b=6); while(!vecsearch(Set(digits(n, b)), 5), b++); b); \\ Michel Marcus, Mar 10 2016

A270033 a(n) is the smallest b for which the base-b representation of n contains at least one 7 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 13, 14, 15, 8, 17, 9, 19, 10, 21, 11, 23, 8, 25, 13, 9, 14, 29, 10, 31, 8, 11, 17, 35, 9, 37, 19, 13, 8, 41, 14, 43, 11, 9, 23, 47, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, 10, 10, 10, 10, 10, 10, 10, 8, 11, 11
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 15 since 17 is n written in base n-7.
The only perfect k-th powers (k >= 2) that can appear in this sequence are m^k with 2 <= m <= 7 and k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[8, 1200], DigitCount[n, #, 7] > 0 &], {n, 15, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<15) && (n!=7), 0, my(b=8); while(!vecsearch(Set(digits(n, b)), 7), b++); b); \\ Michel Marcus, Mar 10 2016

A270035 a(n) is the smallest b for which the base-b representation of n contains at least one 9 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 10, 31, 16, 11, 17, 35, 12, 37, 19, 13, 10, 41, 14, 43, 11, 15, 23, 47, 12, 49, 10, 17, 13, 53, 18, 11, 14, 19, 29, 59, 10, 61, 31, 21, 16, 13, 11, 67, 17, 23, 10, 71
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 19 since 19 is n written in base n-9.
The only perfect k-th powers (k >= 2) that can appear in this sequence are m^k with 2 <= m <= 9 and k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[10, 1200], DigitCount[n, #, 9] > 0 &], {n, 19, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<19) && (n!=9), 0, my(b=10); while(!vecsearch(Set(digits(n, b)), 9), b++); b); \\ Michel Marcus, Mar 10 2016

A270044 a(n) = Smallest m >= 17 containing no eights when represented in any base from 9 through n.

Original entry on oeis.org

18, 19, 20, 21, 22, 23, 24, 25, 27, 27, 29, 29, 31, 31, 33, 33, 37, 37, 37, 37, 39, 39, 43, 43, 43, 43, 45, 45, 49, 49, 49, 49, 51, 51, 55, 55, 55, 55, 57, 57, 61, 61, 61, 61, 67, 67, 67, 67, 67, 67, 69, 69, 549, 590, 590, 590, 590, 594, 604, 630
Offset: 9

Views

Author

Nathan Fox, Mar 09 2016

Keywords

Comments

It remains to be determined if the sequence is finite.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[17, 10^3], Total@ Map[Function[k, DigitCount[#, k, 8]], Range[9, n]] == 0 &], {n, 9, 68}] /. n_ /; MissingQ@ n -> Nothing (* Michael De Vlieger, Mar 10 2016, Version 10.2 *)

A270032 a(n) is the smallest b for which the base-b representation of n contains at least one 6 (or 0 if no such base exists).

Original entry on oeis.org

0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 7, 15, 8, 17, 9, 19, 10, 7, 11, 23, 8, 25, 13, 9, 7, 29, 10, 31, 8, 11, 17, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 9, 9, 9, 9, 9, 9, 7, 10, 10, 10, 10, 10, 10, 7, 8, 11, 11, 11, 11, 11, 7, 12, 8, 12, 12, 12
Offset: 1

Views

Author

Nathan Fox, Mar 08 2016

Keywords

Comments

a(n) > 0 for n >= 13 since 16 is n written in base n-6.
The only perfect k-th powers (k >= 2) that can appear in this sequence are m^k with 2 <= m <= 6 and k a prime number.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[7, 1200], DigitCount[n, #, 6] > 0 &], {n, 13, 120}] (* Michael De Vlieger, Mar 10 2016, Version 10 *)
  • PARI
    a(n) = if ((n<13) && (n!=6), 0, my(b=7); while(!vecsearch(Set(digits(n, b)), 6), b++); b); \\ Michel Marcus, Mar 10 2016
Showing 1-10 of 10 results.