# [seqfan] Re: nice base-dependent sequence

Robert G. Wilson v rgwv at rgwv.com
Fri May 28 23:36:54 CEST 2010

```Et al,

I also like it.

Here is what I have written in Mathematica. But I am not happy with
it at all; particular the function 'gQ'.

lst = {0};
f[n_] := Block[{k = Max[lst[[-1]], 1]}, While[! gQ[k, n], k++]; k];
gQ[k_, n_] := Block[{i = 1, len = Floor[Log[10, k] + 1]},
s = Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ IntegerDigits at k,
{j}, 1], {j, len}], 1]];
If[s[[1]] == 0, s = Rest at s];
While[i < n + 1 && Union[ IntegerQ@# & /@ (s/i)][[-1]] == True, i++ ];
i == n + 1];
Do[a = f at n; AppendTo[lst, f at n]; Print[{n, a}], {n, 100}]

I wrote it about a half an hour ago and so far I have only been able to
compute to f(32). This is far to so to create a nice b-text file.

I would really appreciate any one who has meaningful shortcuts.

Sincerely, Bob.

--------------------------------------------------
From: "Jonathan Post" <jvospost3 at gmail.com>
Sent: Friday, May 28, 2010 12:43 PM
To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
Subject: [seqfan] Re: nice base-dependent sequence

> I like it too.  But so long as someone's programming it, why not do so
> base j for bases other than 10, and show us the upper left corner of
> the array
> A[j,n] = n-th smallest integer k such that k or one of its substrings
> (base j) is divisible by every integer in {1, 2, ..., n}?
>
> Jonathan Vos Post
>
> On Fri, May 28, 2010 at 9:10 AM, N. J. A. Sloane <njas at research.att.com>
> wrote:
>> Dear Seq Fans,  This just caught my eye.  Anyone care to
>> produce a b-file?
>>
>> %I A177834
>> %S A177834
>> 1,2,6,12,45,54,56,56,245,504,1440,1440,5044,5044,10456,10569,11704,
>> %T A177834
>> 11704,11704,13608,13608,13608,26460,26460,198007,258064,264600,264600,
>> %U A177834
>> 475440,475440,1754608,1754608,2258064,2258064,2646004,2646004,2992520
>> %N A177834 Smallest integer k such that k or one of its substrings
>> (regarded as an integer) is divisible by every integer from {1,2,...,n}
>> %e A177834 a(8)=56 because 56 is divisible by 1,2,4,7,8; 5 is divisible
>> by 5; 6 is divisible by 3 and 6. Therefore the set {1,2,3,4,5,6,7,8} is
>> covered by the divisors. 56 is the smallest number with this property.
>> %K A177834 nonn,base,nice,new
>> %O A177834 1,2
>> %A A177834 Martins Opmanis (askola(AT)latnet.lv), May 14 2010
>> %E A177834 Edited by N. J. A. Sloane, May 28 2010.
>>
>> Neil
>>
>>
>>
>> _______________________________________________
>>
>> Seqfan Mailing list - http://list.seqfan.eu/
>>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/

```