# [seqfan] Re: a(n) is divisible by the a(n)th digit of S

Maximilian Hasler maximilian.hasler at gmail.com
Thu Mar 22 06:25:39 CET 2012

```On Wed, Mar 21, 2012 at 10:34 AM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
> a(n) is the smallest integer not yet present in S such that
> a(n) is divisible by the a(n)th digit of S (if you have to
> divide by zero, divide by 10 instead):
>
> S = 1,2,3,4,5,6,7,8,9,10,20,12,30,11,14,15,40,13,16,17,24,
> 18,25,28,50,19,21,22,36,23,35,26,32,27,48,34,45,38,56,55,
> 60,29,54,42,31,44,46,51,66,50,57,63,...
> Done by hand in a couple of minutes -- could someone please
> check and submit, if of interest?

My (ugly but short) PARI script,

{S=[u=0]; while(#S<99, for(a=1,9e9, bittest(u,a)&next; a>9 &
a%if(S[1],S[1],10) & next; print1(a","); u+=1<<a; a>10 &
S=concat(vecextract(S,"^1"),eval(Vec(Str( a ))));break))}

gives 33 instead of 51 and then also other values instead of the last
three given above:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 12, 30, 11, 14, 15, 40, 13, 16, 17,
24, 18, 25, 28, 50, 19, 21, 22, 36, 23, 35, 26, 32, 27, 48, 34, 45,
38, 56, 55, 60, 29, 54, 42, 31, 44, 46, 33, 66, 52, 39, 51, 65, 58,
72, 57, 62, 64, 49, 68, 80, 63, 76, 84, 70, 69, 88, 75, 78, 85, 90,
96, 100, 74, 81, 95, 92, 104, 82, 87, 37, 108, 112, 116, 102, 93, 99,
114, 120, 105, 86, 111, 117, 110, 41, 126, ...

I will submit it.

Regards,
Maximilian

```

More information about the SeqFan mailing list