[seqfan] Re: Digital root

Paolo Lava paoloplava at gmail.com
Mon Jan 21 09:35:15 CET 2013


Other entries are:  d=25: 2184, d=26: 2271, d=79: 19680, d=80: 19929.

2013/1/18 Paolo Lava <paoloplava at gmail.com>

> Hello Seq-Fans,
>
> I was thinking about the period of a string of digits created by taking,
> at any step, the digital root of the sum of the previous “d” digits, for
> d>=1.
>
>
>
> I start from a configuration of “d” zeros followed by one “1”.
>
>
>
> For d=1 I start from 0,1 and I obtain
> 0,1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1,9,1,1, 2, 3, etc.
>
> The period is clearly  equal to 24:
> [1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1,9] .
>
> For d=2 the period is 39:
> [1,1,2,4,7,4,6,8,9,5,4,9,9,4,4,8,7,1,7,6,5,9,2,7,9,9,7,7,5,1,4,1,6,2,9,8,1,9,9].
>
>
>
> For d from 1 to 12 I have found:
>
>
>
> d
>
> period
>
> 1
>
> 24
>
> 2
>
> 39
>
> 3
>
> 78
>
> 4
>
> 312
>
> 5
>
> 2184
>
> 6
>
> 1092
>
> 7
>
> 240
>
> 8
>
> 273
>
> 9
>
> 26232
>
> 10
>
> 11553
>
> 11
>
> 9840
>
> 12
>
> 177144
>
>
>
> But from d=13 on?
>
>
>
> Here the Maple program I used. I’m looking for the first occurence of “d”
> 9s in a row preceded (or followed) by 1.
>
>
>
> Axxxxxx:=proc(q,i)
>
> local d,k,n,v;
>
> v:=array(1..q);
>
> for d from 1 to i do
>
>   for n from 1 to d do v[n]:=0; od; v[d+1]:=1;
>
>   for n from d+2 to q do
>
>      v[n]:=1+((add(v[k],k=n-d-1..n-1)-1) mod 9);
>
>      if add(v[k],k=n-d+1..n)=9*d and v[n-d]=1 then lprint(d,n-d); break;
> fi;
>
> od; od; end:
>
> Axxxxxx(5000000,20);
>
>
> Paolo
>
>



More information about the SeqFan mailing list