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!)
A080905 Sequence of run lengths in first differences of A080900. 4

%I #10 Feb 24 2020 17:16:31

%S 4,1,4,1,4,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2,1,2,1,

%T 1,2,1,1,2,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2,1,2,1,

%U 1,2,1,1,2,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2,1,4,1,4,1,2,1,1,1,2

%N Sequence of run lengths in first differences of A080900.

%C Even after 400000 terms there is no clear pattern here.

%H Antti Karttunen, <a href="/A080905/b080905.txt">Table of n, a(n) for n = 1..102526</a>

%e A080900 begins 1, 6, 11, 16, 21, 19, 24, 29, 34, 39, 37, 42, 47, 52, 57, 55, 60, 65, ..., the differences are 5, 5, 5, 5, -2, 5, 5, 5, 5, -2, ... with runs of lengths 4, 1, 4, 1, ...

%o (PARI)

%o up_to = 20000;

%o A080905list(up_to_n) = { my(xs=Map(), v, d, ds=vector(up_to_n)); mapput(xs,1,1); v = 1; for(n=2,1+up_to_n, v += (d=if(mapisdefined(xs,n), -2, +5)); mapput(xs,v,n); ds[n-1] = d); my(runlens=List([]), rl=1); for(i=2,#ds,if(ds[i]==ds[i-1],rl++, listput(runlens,rl);rl=1)); Vec(runlens); };

%o v080905 = A080905list(up_to);

%o A080905(n) = v080905[n]; \\ _Antti Karttunen_, Feb 24 2020

%Y Cf. A080900, A080922, A080927.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Apr 01 2003

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 April 29 03:15 EDT 2024. Contains 372097 sequences. (Running on oeis4.)