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 31-40 of 44 results. Next

A216485 a(n) is the least value of k such that k*n uses only the digit 2, or a(n) = -1 if no such multiple exists.

Original entry on oeis.org

2, 1, 74, -1, -1, 37, 31746, -1, 24691358, -1, 2, -1, 17094, 15873, -1, -1, 130718954248366, 12345679, 11695906432748538, -1, 10582, 1, 96618357487922705314, -1, -1, 8547, 8230452674897119341563786, -1, 76628352490421455938697318, -1, 7168458781362, -1, 6734, 65359477124183, -1, -1, 6, 5847953216374269, 5698, -1, 542, 5291, 5167958656330749354
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

a(n) <= 2(10^n -1)/(9n). a(n) = -1 if and only if n is a multiple of 4 or 5. If n is a multiple of 4 then a(n) = -1 since 222....222 is not a multiple of 4. If n is a multiple of 5 then all multiples of n ends with the digit 0 or 5 and a(n) = -1. If n is odd and not a multiple of 4 or 5, then by the pigeonhole principle, two different repunits will have the same remainder modulo n. Their difference will be of the form 11...1110..0 which is a multiple of n. Since n and 10 are coprime, n is a divisor of a repunit and a(n) != -1. If n is even and not a multiple of 4 or 5, we take n/2 and use the same argument to show that n/2 is a divisor of a repunit and a(n) != -1. - Chai Wah Wu, Jun 21 2015

Crossrefs

A244955 Smallest positive multiple of n whose base-4 representation contains only 0's and 1's.

Original entry on oeis.org

1, 4, 21, 4, 5, 84, 21, 16, 81, 20, 341, 84, 65, 84, 1365, 16, 17, 324, 1045, 20, 21, 1364, 69, 336, 325, 260, 81, 84, 261, 5460, 341, 64, 1089, 68, 1365, 324, 4181, 4180, 273, 80, 1025, 84, 5461, 1364, 5445, 276, 20821, 336, 1029, 1300, 4437, 260, 5141
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004284 (written in base 4), A004290, A244954-A244960.

Programs

  • Mathematica
    Module[{nn=10,b4},b4=Rest[FromDigits[#,4]&/@Tuples[{0,1},nn]];Table[SelectFirst[b4,Mod[ #,n]==0&],{n,60}]] (* Harvey P. Dale, Feb 01 2024 *)

Extensions

Data corrected, offset corrected, and b-file replaced by Harvey P. Dale, Feb 01 2024

A244958 Smallest positive multiple of n whose base-7 representation contains only 0's and 1's.

Original entry on oeis.org

1, 8, 57, 8, 50, 19608, 7, 8, 351, 50, 2409, 19608, 351, 56, 2745, 400, 16864, 134856, 57, 400, 399, 2794, 17158, 19608, 50, 19552, 351, 56, 137257, 120450, 16864, 2752, 2409, 16864, 350, 134856, 117993, 19608, 351, 400, 134849, 137256, 344, 16808, 2745
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004287 (written in base 7), A004290, A244954-A244960.

Programs

  • Mathematica
    With[{cl=Rest[{FromDigits[#,7],FromDigits[#]}&/@Tuples[{0,1},7]]},Table[SelectFirst[cl,Mod[ #[[1]],n]==0&],{n,50}]][[;;,1]] (* Harvey P. Dale, Feb 01 2024 *)

Extensions

Data corrected, Offset corrected, Mathematica program corrected and replaced, and b-file replaced by Harvey P. Dale, Feb 01 2024

A244959 Smallest positive multiple of n whose base 8 representation contains only 0's and 1's.

Original entry on oeis.org

1, 8, 9, 8, 65, 72, 299593, 8, 9, 520, 4169, 72, 65, 2396744, 585, 64, 4097, 72, 513, 520, 17044041, 33352, 33281, 72, 266825, 520, 513, 2396744, 266249, 4680, 4681, 64, 32769, 32776, 16814665, 72, 262145, 4104, 585, 520, 32841, 136352328, 36937, 33352, 585
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004288 (written in base 8), A004290, A244954-A244960.

Programs

  • Mathematica
    Module[{nn=10,b8},b8=Rest[FromDigits[#,8]&/@Tuples[{0,1},nn]];Table[SelectFirst[ b8,Mod[#,n]==0&],{n,100}]] (* Harvey P. Dale, Feb 03 2024 *)
  • Python
    def A244959(n):
        if n > 0:
            for i in range(1,2**n):
                x = int(bin(i)[2:],8)
                if not x % n:
                    return x
        return 0 # Chai Wah Wu, Dec 30 2014

Extensions

Data corrected, offset corrected, and b-file replaced by Harvey P. Dale, Feb 03 2024

A286820 a(n) = smallest positive multiple of n whose factorial base representation contains only 0's and 1's.

Original entry on oeis.org

1, 2, 3, 8, 25, 6, 7, 8, 9, 30, 33, 24, 26, 126, 30, 32, 153, 126, 152, 120, 126, 726, 5888, 24, 25, 26, 27, 728, 145, 30, 31, 32, 33, 5066, 840, 144, 5883, 152, 5070, 120, 123, 126, 129, 5192, 720, 5888, 752, 144, 147, 150, 153, 728, 848, 864, 46200, 728
Offset: 1

Views

Author

Rémy Sigrist, Jun 24 2017

Keywords

Comments

All terms belong to A059590.
a(n) = n iff n belongs to A059590.
The sequence is well defined: for any n > 0: according to the pigeonhole principle, among the n+1 first repunits in factorial base (A007489), there must be two distinct terms equal modulo n; their absolute difference is a positive multiple of n, and contains only 0's and 1's in factorial base.
This sequence is to factorial base what A004290 is to decimal base.

Examples

			The first terms are:
n   a(n)     a(n) in factorial base
--  ----     ----------------------
1   1        1
2   2        1,0
3   3        1,1
4   8        1,1,0
5   25       1,0,0,1
6   6        1,0,0
7   7        1,0,1
8   8        1,1,0
9   9        1,1,1
10  30       1,1,0,0
11  33       1,1,1,1
12  24       1,0,0,0
13  26       1,0,1,0
14  126      1,0,1,0,0
15  30       1,1,0,0
16  32       1,1,1,0
17  153      1,1,1,1,1
18  126      1,0,1,0,0
19  152      1,1,1,1,0
20  120      1,0,0,0,0
		

Crossrefs

Programs

  • PARI
    isA059590(n) = my (r=2); while (n, if (n%r > 1, return (0), n\=r; r++)); return (1)
    a(n) = forstep (m=n, oo, n, if (isA059590(m), return (m)))

A334914 Least positive multiple of n that when written in base 10 uses only 0's, 1's, 2's and 3's.

Original entry on oeis.org

1, 2, 3, 12, 10, 12, 21, 32, 333, 10, 11, 12, 13, 112, 30, 32, 102, 1332, 133, 20, 21, 22, 23, 120, 100, 130, 1323, 112, 203, 30, 31, 32, 33, 102, 210, 1332, 111, 1102, 312, 120, 123, 210, 301, 132, 3330, 230, 1222, 1200, 1323, 100, 102, 312, 212, 2322, 110
Offset: 1

Views

Author

Bernard Schott, May 16 2020

Keywords

Comments

a(n) = n iff n is in A007090; there is no isolated fixed point because fixed points are always in patterns of 4 consecutive terms, and the first few patterns are (0,1,2,3), (10,11,12,13), (20,21,22,23), (30,31,32,33), (100,101,102,103) ...

Examples

			a(18) = 1332 because 1332 is the smallest multiple of 18 whose decimal digits are all 0, 1, 2 or 3.
		

Crossrefs

Cf. A004290 (similar, with digits 0 and 1), A181060 (similar, with digits 0, 1 and 2).

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 do if convert(convert(k*n,base,10),set) subset {0,1,2,3} then return k*n fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2020
  • Mathematica
    Table[SelectFirst[Rest @ Flatten [FromDigits /@ Tuples[Range[0, 3], 4]], Divisible[#, n] &], {n, 1, 55}] (* Amiram Eldar, May 16 2020 *)
  • PARI
    a(n) = my(k=1); while(vecmax(digits(k*n))>3, k++); k*n \\ Michel Marcus, May 17 2020

A216482 a(n) is the least value of k such that k*n uses only digits 1 and 2. a(n) = -1 if no such multiple exists.

Original entry on oeis.org

1, 1, 4, 3, -1, 2, 3, 14, 1358, -1, 1, 1, 17, 8, -1, 7, 13, 679, 59, -1, 1, 1, 527, 88, -1, 47, 786, 4, 418, -1, 362, 66, 34, 33, -1, 617, 3, 319, 2849, -1, 271, 291, 284, 48, -1, 2657, 26, 44, 229, -1, 22, 406, 4, 393, -1, 2, 3723, 209, 19, -1, 2, 181, 194, 33, -1, 17, 33, 1634, 3219, -1, 172, 1696, 2907, 3, -1, 1462, 1443, 1554, 28, -1, 262, 271, 134, 1443
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local d,a,i,S,R;
      if n mod 5 = 0 then return -1 fi;
      for d from ilog10(n)+1 do
         a:= (10^d-1)/9;
         S:= [seq(10^i, i=0..d-1)];
         R:= select(t -> convert(t,`+`) + a mod n = 0, combinat:-powerset(S));
         if R <> [] then return min(map(t -> convert(t,`+`)+a, R))/n fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 26 2022

A244956 Smallest positive multiple of n whose base-5 representation contains only 0's and 1's.

Original entry on oeis.org

1, 6, 6, 156, 5, 6, 126, 656, 126, 30, 781, 156, 26, 126, 30, 656, 3281, 126, 3781, 780, 126, 3256, 3151, 97656, 25, 26, 756, 756, 15631, 30, 31, 3776, 16401, 3876, 630, 756, 3256, 3876, 156, 3280, 656, 126, 15781, 3256, 630, 16376, 3901, 472656, 15631, 150
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004285 (written in base 5), A004290, A244954-A244960.

Programs

  • Mathematica
    Module[{nn=10,b5},b5=Rest[FromDigits[#,5]&/@Tuples[{0,1},nn]];Table[SelectFirst[b5,Mod[ #,n]==0&],{n,100}]] (* Harvey P. Dale, Feb 01 2024 *)

Extensions

Data corrected, offset corrected, Mathematica program replaced, and b-file replaced by Harvey P. Dale, Feb 01 2024

A244957 Smallest positive multiple of n whose base-6 representation contains only 0's and 1's.

Original entry on oeis.org

1, 6, 6, 36, 1555, 6, 7, 216, 36, 9330, 253, 36, 1339, 42, 9330, 1296, 1513, 36, 7999, 55980, 42, 1518, 253, 216, 9325, 8034, 216, 252, 47995, 9330, 217, 7776, 1518, 9078, 12093235, 36, 37, 47994, 8034, 335880, 46699, 42, 43, 9108, 55980, 1518, 48175, 1296
Offset: 1

Views

Author

Eric M. Schmidt, Jul 09 2014

Keywords

Crossrefs

Cf. A004286 (written in base 6), A004290, A244954-A244960.

Programs

  • Mathematica
    Module[{nn=10,b6},b6=Rest[FromDigits[#,6]&/@Tuples[{0,1},nn]];Table[SelectFirst[ b6,Mod[#,n]==0&],{n,100}]] (* Harvey P. Dale, Feb 03 2024 *)

Extensions

Data corrrected, offset corrected, and b-file replaced by Harvey P. Dale, Feb 03 2024

A288538 Lexicographically earliest sequence of distinct positive terms such that, for any n > 0, n * a(n) does not contain the digit 1 in decimal base.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 24 2017

Keywords

Comments

This sequence is a permutation of the natural numbers; for any n > 0, there are infinitely many values v such that n * v does not contain the digit 1 in decimal base (for example: 2 * A004290(n) / n * 10^k for k = 0, 1, 2,...), hence n will eventually be chosen.
This sequence is self-inverse.
If n is a fixed point, then n^2 belongs to A052383.
The first fixed points are: 3, 6, 7, 8, 15, 20, 23, 24, 25, 26, 27, 28, 45, 47, 60, 64, 65, 66, 67, 68, 75, 76, 77, 78, ...

Examples

			The first terms, alongside n * a(n), are:
n       a(n)    n * a(n)
--      ----    --------
1       2       2
2       1       2
3       3       9
4       5       20
5       4       20
6       6       36
7       7       49
8       8       64
9       10      90
10      9       90
11      19      209
12      17      204
13      16      208
14      18      252
15      15      225
16      13      208
17      12      204
18      14      252
19      11      209
20      20      400
		

Crossrefs

Previous Showing 31-40 of 44 results. Next