OFFSET
1,2
COMMENTS
There are many sequences with this property, but this is the lexicographically earliest such sequence which has positive terms and is strictly increasing. For a discussion of the growth rate, see A227844. - N. J. A. Sloane, Aug 20 2013
LINKS
Alois P. Heinz and N. J. A. Sloane, Table of n, a(n) for n = 1..20000
EXAMPLE
The second differences are 1, 2, 4, 8, 1, 6, 3, 2, 4, 9, 7, 2, 9, 8, 1, 2, 6, 1, 5, 8, 1, 9, 9, 2, 4, 7, ...
MAPLE
a:=[1, 2, 4]; b:=[1, 2]; c:=[1]; la:=3; lb:=2; lc:=1;
M:=100;
p:=2;
for n from 1 to M do
N:=a[p];
s:=convert(N, base, 10);
ls:=nops(s);
for i from 1 to ls do
c:=[op(c), s[ls-i+1]]; lc:=lc+1;
b:=[op(b), b[lb]+c[lc]]; lb:=lb+1;
a:=[op(a), a[la]+b[lb]]; la:=la+1;
od:
p:=p+1;
od:
[seq(a[i], i=1..la)];
# N. J. A. Sloane, Aug 21 2013
PROG
(Haskell)
digits = map (fromIntegral.digitToInt). show
inverseDiff xs = scanl (+) (head xs) xs
seqA = iterate ((!!2). iterate inverseDiff. concatMap digits) [1]
-- Example (executed in GHCi):
-- > seqA !!4
-- [1, 2, 4, 8, 16, 32, 49, 72, 98, 126, 158, 199, 247, 297]
-- Arie Groeneveld, Aug 31 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Jul 30 2013
EXTENSIONS
More terms from Paolo P. Lava, Jul 30 2013
STATUS
approved