OFFSET
1,2
COMMENTS
First differences are N's shadow. Never twice the same integer in sequence or first differences (except the starting "1").
LINKS
Petros Hadjicostas, Table of n, a(n) for n = 1..130
EXAMPLE
The first line hereunder is the sequence, the second line gives the first differences:
1..13.16.20.25.31.38.46.55..65..76...197..228..269..311 ...
.12..3..4..5..6..7..8..9..10..11..121...31...41...51... <-- N's shadow (which, when concatenated, gives A033307)
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{c = Flatten[ IntegerDigits /@ Range[150]], k = 1, t = Table[a[i], {i, n - 1}]}, d = Drop[t, 1] - Drop[t, -1]; b = Drop[c, Length[ Flatten[ IntegerDigits /@ d]]]; e = Union[ Join[t, d]]; While[f = FromDigits[ Take[b, k]]; Position[e, f] != {} || b[[k + 1]] == 0, k++ ]; f + a[n - 1]]; Table[ a[n], {n, 48}] (* Robert G. Wilson v, Oct 10 2005 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Alexandre Wajnberg and Eric Angelini, Sep 14 2005
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Oct 10 2005
STATUS
approved