login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226930 Second differences give the sequence itself, but read digit-by-digit. 2

%I #39 May 12 2023 21:36:36

%S 1,2,4,8,16,32,49,72,98,126,158,199,247,297,356,423,491,561,637,714,

%T 796,886,977,1077,1186,1297,1412,1534,1658,1791,1931,2074,2222,2376,

%U 2534,2694,2857,3024,3200,3377,3559,3747,3936

%N Second differences give the sequence itself, but read digit-by-digit.

%C 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

%H Alois P. Heinz and N. J. A. Sloane, <a href="/A226930/b226930.txt">Table of n, a(n) for n = 1..20000</a>

%e 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, ...

%p a:=[1,2,4]; b:=[1,2]; c:=[1]; la:=3; lb:=2; lc:=1;

%p M:=100;

%p p:=2;

%p for n from 1 to M do

%p N:=a[p];

%p s:=convert(N,base,10);

%p ls:=nops(s);

%p for i from 1 to ls do

%p c:=[op(c),s[ls-i+1]]; lc:=lc+1;

%p b:=[op(b), b[lb]+c[lc]]; lb:=lb+1;

%p a:=[op(a), a[la]+b[lb]]; la:=la+1;

%p od:

%p p:=p+1;

%p od:

%p [seq(a[i],i=1..la)];

%p # _N. J. A. Sloane_, Aug 21 2013

%o (Haskell)

%o digits = map (fromIntegral.digitToInt). show

%o inverseDiff xs = scanl (+) (head xs) xs

%o seqA = iterate ((!!2). iterate inverseDiff. concatMap digits) [1]

%o -- Example (executed in GHCi):

%o -- > seqA !!4

%o -- [1,2,4,8,16,32,49,72,98,126,158,199,247,297]

%o -- Arie Groeneveld, Aug 31 2013

%Y Cf. A227844.

%K nonn,base

%O 1,2

%A _Eric Angelini_, Jul 30 2013

%E More terms from _Paolo P. Lava_, Jul 30 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)