|
| |
|
|
A154328
|
|
Lexicographically first strictly increasing sequence having the property that a(n) is the sum of the first a(n) digits of the sequence.
|
|
4
| |
|
|
1, 10, 11, 12, 20, 111, 112, 120, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 10000, 10000000000000000000, 10000000800000000000, 10000000800000000001, 10000000800000000002
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
COMMENTS
| The variant where the condition of strict monotonicity is dropped (suggested by Paolo Lava; cf. link) is less straightforward to compute.
The sequence could also be encoded in a more compact way by specifying only the indices n where it jumps (a(n) > a(n-1)+1) and the corresponding values a(n), see A154329-A154330.
|
|
|
LINKS
| M. F. Hasler, Table of n, a(n) for n = 1..73
Eric Angelini, An ugly self-describing sequence.
E. Angelini et al., "Ugly digit sum", SeqFan mailing list, Jan 08, 2008
|
|
|
EXAMPLE
| Starting with a(1)=1, the next term a(2)>a(1) cannot be 2,...,9 (else the sum of these digits would be larger): the least possibility not leading to a contradiction is a(2)=10.
Then we can go on with a(3)=11, a(4)=12, but a(5) cannot be 13, the least possibility is a(5)=20.
See the linked web page for more details and sequences A154329-A154330 for terms beyond those given here.
|
|
|
PROG
| (PARI) /* NB: This code checks only whether there is a contradiction for the given digits (1st arg), it does not ensure minimality. If the 2nd arg is nonzero, it dumps a list of all digits and partial sums. */
check_A154328(S=[1, 10, 11, 12, 20], dump=0)={
local(d=eval(Vec(concat(concat([""], S)))), t=0, ds=vector(#d, i, t+=d[i]));
dump & print(vector(#d, i, Str(i":"d[i]":"ds[i])));
for(i=1, #S, S[i]>#d & break; ds[S[i]]==S[i]|error("wrong at i=", i, ": [S[i], ds[S[i]]]=", [S[i], ds[S[i]]]));
print("no contradiction for terms <= "#d) }
|
|
|
CROSSREFS
| Cf. A155817 [From Paolo P. Lava (paoloplava(AT)gmail.com), Jul 23 2009]
Sequence in context: A109279 A154770 A098395 * A112654 A102695 A144582
Adjacent sequences: A154325 A154326 A154327 * A154329 A154330 A154331
|
|
|
KEYWORD
| nonn,base
|
|
|
AUTHOR
| Eric Angelini (eric.angelini(AT)kntv.be) and M. F. Hasler (www.univ-ag.fr/~mhasler), Jan 13 2009
|
| |
|
|