[seqfan] Re: Another surprising omission from OEIS

Andrew Weimholt andrew.weimholt at gmail.com
Wed Nov 11 08:43:48 CET 2009

```Thanks Michael,

Andrew

On Tue, Nov 10, 2009 at 10:22 PM, Michael Porter
<ic_designer at verizon.net> wrote:
>
> I get the same numbers.  Here is the PARI program I used:
> digits(n,b) = if(n<b, [n], concat(digits(floor(n/b),b),n%b))\Q
> is_repdigit(d) = {local(a,r);r=1;a=d[1];for(i=2,matsize(d)[2],if(a!=d[i],r=0));r}\Q
> for(n=1,1200,b=2;while(n>=b^2+b+1,d=digits(n,b);if(is_repdigit(d),print(n," = ",d," base ",b));b++))
>
> The first line generates a vector of digits (e.g. digits(1234,10) = [1, 2, 3, 4]).  The second line determines if the digits in that vector are all the same.  The three-digit restriction is handled by the "n>=b^2+b+1" in the while loop.
>
> I added the "\Q" to the end of the first two lines so it can be used in a sequence.
>
> - Michael
>
>
>
> --- On Tue, 11/10/09, Andrew Weimholt <andrew.weimholt at gmail.com> wrote:
>
> From: Andrew Weimholt <andrew.weimholt at gmail.com>
> Subject: [seqfan]  Another surprising omission from OEIS
> To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
> Date: Tuesday, November 10, 2009, 5:58 PM
>
> Numbers that are repdigits with length > 2 in some base.
> (length > 2 because all numbers n > 2, are trivially represented as 11
> in base n-1)
>
>        7 = 111     base 2
>       13 = 111     base 3
>       15 = 1111    base 2
>       21 = 111     base 4
>       26 = 222     base 3
>       31 = 11111   base 2 (also 111 base 5)
>       40 = 1111    base 3
>       42 = 222     base 4
>       43 = 111     base 6
>       57 = 111     base 7
>       62 = 222     base 5
>       63 = 111111  base 2 (also 333 base 4)
>       73 = 111     base 8
>       80 = 2222    base 3
>       85 = 1111    base 4
>       86 = 222     base 6
>       91 = 111     base 9
>       93 = 333     base 5
>      111 = 111     base 10
>      114 = 222     base 7
>      121 = 11111   base 3
>      124 = 444     base 5
>      127 = 1111111 base 2
>      129 = 333     base 6
>      133 = 111     base 11
>
> 7, 13, 15, 21, 26, 31, 40, 42, 43, 57, 62, 63, 73, 80, 85, 86,
> 91, 93, 111, 114, 121, 124, 127, 129, 133, 146, 156, 157,
> 170, 171, 172, 182, 183, 211, 215, 219, 222, 228, 241, 242,
> 255, 259, 266, 273, 285, 292, 307, 312, 314, 333, 341, 342,
> 343, 364, 365, 366, 381, 399, 400, 421, 422, 438, 444, 455,
> 463, 468, 471, 482, 507, 511, 518, 532, 546, 549, 553, 555,
> 585, 601, 614, 624, 628, 633, 637, 651, 665, 666, 682, 686,
> 703, 723, 728, 732, 757, 762, 777, 781, 785, 798, 800, 813,
> 819, 820, 842, 844, 871, 888, 915, 921, 926, 931, 942, 964,
> 993, 999, 1014, 1023, 1029, 1036, 1055, 1057, 1064, 1092,
> 1093, 1098, 1099,1106, 1111
>
> Andrew
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>

```