# [seqfan] Re: a(n) = a(n-1) + [sum of all digits present so far]

Farideh Firoozbakht f.firoozbakht at sci.ui.ac.ir
Thu Oct 1 21:39:54 CEST 2009

```Quoting Jonathan Post <jvospost3 at gmail.com>:

> so the array begins (done by hand, needs checking)
>
> a(1) = k; a(n) = a(n-1) + sum of all decimal digits so far in the
> sequence (row of array)
>
> ......|.n=1.|.n=2.|.n=3.|.n=4.|.n=5.|.n=6.|.n=7.|
> k=1.|....1.|.....2.|.....5.|...13.|...25.|...44...|.71.|
> k=2.|....2.|.....4.|.....8.|...16.|...39.|...90...|189.|
> k=3.|....3.|.....6.|...21.|...45.|...99.|..216...|441.|
>
> and main diagonal 1, 4, 21, ...?

The correct values:

......|.n=1.|.n=2.|.n=3.|.n=4.|.n=5.|.n=6.|.n=7.|
k=1.|....1.|.....2.|.....5.|...13.|...25.|...44...|.71.|
k=2.|....2.|.....4.|....10.|...17.|...32.|...52...|.79.|
k=3.|....3.|.....6.|....15.|...30.|...48.|...78...|123.|
k=4    4       8        20     34     55     86    131
k=5    5      10        16     29     53     85    130
k=6    6      12        21     33     51     75    111
...

and main diagonal :

1, 4, 15, 34, 53, 75, 173, 209, 378, 419, 544, 597, 967, 1027, 1227,
1315, 1712, 2007, 2285, 2624, 2694, 2909, 4006, 4092, 4354, 4336,
4599, 5818, 5675, 6369, 6215, 7613, 8403, 8225, 9646, 9432, 10207,
11083, 11967, 12355, 12797, 14583, 15158, 16427, 16470, 17303, 18166,
19803, 20119, 19153, ...

--- Farideh

----------------------------------------------------------------
University of Isfahan (http://www.ui.ac.ir)

```