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

Alois Heinz heinz at hs-heilbronn.de
Thu Oct 1 21:28:07 CEST 2009

```Jonathan Post schrieb:
> 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.|
1, 2, 5, 13, 25, 44, 71, 106, 148, 203
2, 4, 10, 17, 32, 52, 79, 122, 170, 226
3, 6, 15, 30, 48, 78, 123, 174, 237, 312
4, 8, 20, 34, 55, 86, 131, 181, 241, 308
5, 10, 16, 29, 53, 85, 130, 179, 245, 322
6, 12, 21, 33, 51, 75, 111, 150, 195, 255
7, 14, 26, 46, 76, 119, 173, 238, 316, 404
8, 16, 31, 50, 74, 109, 154, 209, 275, 355
9, 18, 36, 63, 99, 153, 216, 288, 378, 486
10, 11, 14, 22, 34, 53, 80, 115, 157, 212
>
> and main diagonal 1, 4, 21, ...?
>
1, 4, 15, 34, 53, 75, 173, 209, 378, 212, 454, 480,
724, 1009, 768, 1225, 1442, 1467, 1880, 1823, 2199,
2522, 3124, 3030, 3382, 3796, 4284, 4972, 4649,
5181, 5018, 5912, 7080, 6758, 7801, 8514, 9190,
9013, 11022, 10285, 10097, 11334, 11918, 13592,
13212, 14297, 16357, 17454, 16807, 17965

note, diagonal sequence is not monotone ...

Alois

```