cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A080900 a(1)=1; for n>1, a(n)=a(n-1)-2 if n is already in the sequence, a(n)=a(n-1)+5 otherwise.

Original entry on oeis.org

1, 6, 11, 16, 21, 19, 24, 29, 34, 39, 37, 42, 47, 52, 57, 55, 60, 65, 63, 68, 66, 71, 76, 74, 79, 84, 89, 94, 92, 97, 102, 107, 112, 110, 115, 120, 118, 123, 121, 126, 131, 129, 134, 139, 144, 149, 147, 152, 157, 162, 167, 165, 170, 175, 173, 178, 176
Offset: 1

Views

Author

N. J. A. Sloane and Benoit Cloitre, Apr 01 2003

Keywords

Crossrefs

Cf. A080901 (starting value = 2), A080905 (run lengths of first differences).

Programs

  • Mathematica
    Fold[Append[#1, #1[[-1]] + If[MemberQ[#1, #2], -2, 5]] &, {1}, Range[2, 57]] (* Ivan Neretin, Mar 03 2016 *)
  • PARI
    up_to = 1001;
    A080900list(up_to_n) = { my(xs=Map(), v=vector(up_to_n)); mapput(xs,1,1); v[1] = 1; for(n=2,up_to_n, v[n] = v[n-1]+if(mapisdefined(xs,n), -2, +5); mapput(xs,v[n],n)); (v); };
    v080900 = A080900list(up_to);
    A080900(n) = v080900[n]; \\ Antti Karttunen, Jan 22 2020

Formula

Perhaps this is asymptotic to c_0*n*(1 + c_1/log n + ...), with c_0 near 2 ?

A080905 Sequence of run lengths in first differences of A080900.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

N. J. A. Sloane, Apr 01 2003

Keywords

Comments

Even after 400000 terms there is no clear pattern here.

Examples

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

Crossrefs

Programs

  • PARI
    up_to = 20000;
    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); };
    v080905 = A080905list(up_to);
    A080905(n) = v080905[n]; \\ Antti Karttunen, Feb 24 2020

A080927 Where records occur in A080905 (endpoints of record runs).

Original entry on oeis.org

5, 198, 1281, 6162, 12749, 102883
Offset: 1

Views

Author

N. J. A. Sloane, Apr 04 2003

Keywords

Crossrefs

Showing 1-3 of 3 results.