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.

Previous Showing 21-29 of 29 results.

A050108 a(n) = floor(a(n-1)/4) if this is positive and not yet in the sequence, otherwise a(n) = 5*a(n-1).

Original entry on oeis.org

1, 5, 25, 6, 30, 7, 35, 8, 2, 10, 50, 12, 3, 15, 75, 18, 4, 20, 100, 500, 125, 31, 155, 38, 9, 45, 11, 55, 13, 65, 16, 80, 400, 2000, 10000, 2500, 625, 156, 39, 195, 48, 240, 60, 300, 1500, 375, 93, 23, 115, 28, 140, 700, 175, 43, 215
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A050000 and references therein.

Programs

  • Mathematica
    Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 4]], r, 5 #[[-1]]]] &, {0, 1}, 55] (* Ivan Neretin, Jul 31 2016 *)
  • PARI
    first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\4; if(t<2, v[i]=5*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=5*v[i-1]; next(2))); v[i]=t); v \\ Charles R Greathouse IV, Jul 31 2016

A050112 a(n) = floor(a(n-1)/4) if this is positive and not yet in the sequence, otherwise a(n) = 6*a(n-1).

Original entry on oeis.org

1, 6, 36, 9, 2, 12, 3, 18, 4, 24, 144, 864, 216, 54, 13, 78, 19, 114, 28, 7, 42, 10, 60, 15, 90, 22, 5, 30, 180, 45, 11, 66, 16, 96, 576, 3456, 20736, 5184, 1296, 324, 81, 20, 120, 720, 4320, 1080, 270, 67, 402, 100, 25, 150, 37, 222, 55
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A050000 and references therein.

Programs

  • Mathematica
    Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 4]], r, 6 #[[-1]]]] &, {0, 1}, 54] (* Ivan Neretin, Jul 31 2016 *)
  • PARI
    first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\4; if(t<2, v[i]=6*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=6*v[i-1]; next(2))); v[i]=t); v \\ Charles R Greathouse IV, Jul 31 2016

A050135 a(1) = 1, a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 4*n.

Original entry on oeis.org

1, 8, 4, 2, 20, 10, 5, 32, 16, 40, 44, 22, 11, 56, 28, 14, 7, 3, 76, 38, 19, 9, 92, 46, 23, 104, 52, 26, 13, 6, 124, 62, 31, 15, 140, 70, 35, 17, 156, 78, 39, 168, 84, 42, 21, 184, 188, 94, 47, 200, 100, 50, 25, 12, 220, 110, 55, 27, 236
Offset: 1

Views

Author

Keywords

Comments

Does this sequence contain every positive integer exactly once?

Crossrefs

Cf. A050000.

A050136 a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1), otherwise a(n)=5*n.

Original entry on oeis.org

1, 10, 5, 2, 25, 12, 6, 3, 45, 22, 11, 60, 30, 15, 7, 80, 40, 20, 95, 47, 23, 110, 55, 27, 13, 130, 65, 32, 16, 8, 4, 160, 165, 82, 41, 180, 90, 190, 195, 97, 48, 24, 215, 107, 53, 26, 235, 117, 58, 29, 14, 260, 265, 132, 66, 33, 285, 142, 71, 35, 17, 310, 155, 77, 38, 19, 9, 340, 170, 85, 42, 21
Offset: 1

Views

Author

Keywords

Comments

Does this sequence contain every positive integer exactly once?

Crossrefs

Programs

  • Maple
    S:= {0,1}: A[1]:= 1:
    for n from 2 to 100 do
      v:= floor(A[n-1]/2);
      if not member(v,S) then A[n]:= v
      else A[n]:= 5*n
      fi;
      S:= S union {A[n]};
    od:
    seq(A[i],i=1..100); # Robert Israel, Aug 07 2018
  • Mathematica
    f[s_List] := Block[{len = Length@s, m = Floor[s[[-1]]/2]}, Append[s, If[MemberQ[s, m], 5 len, m]]]; Rest@ Nest[f, {0, 1}, 65] (* Robert G. Wilson v, Aug 07 2018 *)

Extensions

Corrected by Robert Israel, Aug 07 2018

A268642 Seelmann's sequence: a(1) = 1; thereafter a(n + 1) = ceiling(a(n)/2) unless this is already in the sequence, in which case a(n + 1) = 3*a(n).

Original entry on oeis.org

1, 3, 2, 6, 18, 9, 5, 15, 8, 4, 12, 36, 108, 54, 27, 14, 7, 21, 11, 33, 17, 51, 26, 13, 39, 20, 10, 30, 90, 45, 23, 69, 35, 105, 53, 159, 80, 40, 120, 60, 180, 540, 270, 135, 68, 34, 102, 306, 153, 77, 231, 116, 58, 29, 87, 44, 22, 66, 198, 99, 50, 25, 75, 38
Offset: 1

Views

Author

Peter Kagey, Feb 09 2016, based on a posting by David Seelmann to the Reddit web site

Keywords

Comments

It is conjectured that this is a permutation of the positive integers, along with any Seelmann sequence in which a(n+1) = M*a(n) if the divide by 2 rule cannot be applied, for any integer M>1 and not of the form M = 2^N. [Corrected by Charlie Neder, Feb 06 2019]
Reminiscent of the 3x+1 or Collatz problem, cf. A006577. - N. J. A. Sloane, Feb 09 2016
The Reddit link contains what is claimed to be a proof that this sequence is a permutation. I don't know if it has been checked. - N. J. A. Sloane, Feb 11 2016

Crossrefs

Cf. A006577, A050000 (with floor instead of ceiling).
For records see A268529, A268530. For inverse see A268531.

Programs

  • Mathematica
    a[1]=1; a[n_] := a[n] = Module[{an1, an}, an1 = a[n-1]; an = If[EvenQ[an1], an1/2, (an1+1)/2]; If[FreeQ[Array[a, n-1], an], an, 3*a[n-1]]]; Array[a, 100] (* Jean-François Alcover, Feb 27 2016 *)
    Fold[Append[#1, If[FreeQ[#1, #3], #3, 3 #1[[-1]]]] & @@ {#1, #2, Ceiling[#1[[-1]]/2]} &, {1}, Range@ 63] (* Michael De Vlieger, Jan 13 2018 *)

Extensions

Title corrected by Charlie Neder, Feb 06 2019

A050416 a(1)=a(2)=1, then a(n+1) = floor(a(n)/3) if this is not among 0, a(1), ..., a(n); otherwise a(n+1) = a(n) + a(n-1).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 4, 17, 21, 7, 28, 9, 37, 12, 49, 16, 65, 81, 27, 108, 36, 144, 48, 192, 64, 256, 85, 341, 113, 454, 151, 50, 201, 67, 22, 89, 29, 118, 39, 157, 52, 209, 69, 23, 92, 30, 10, 40, 50, 90, 140, 46, 15, 61, 20, 6, 26, 32
Offset: 1

Views

Author

Keywords

Comments

Numbers appearing among the terms more than once include 1, 50, 265, 341, 516, 570, 622, ... - Ivan Neretin, Sep 04 2015

Crossrefs

Programs

  • Mathematica
    a = {0, 1, 1}; Do[AppendTo[a, If[MemberQ[a, c = Quotient[a[[-1]], 3]], a[[-1]] + a[[-2]], c]], {n, 3, 59}]; Delete[a, 1] (* Ivan Neretin, Sep 04 2015 *)

A050138 a(1)=2, a(2)=6. For n >= 2, a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 3*n.

Original entry on oeis.org

2, 6, 3, 1, 15, 7, 21, 10, 5, 30, 33, 16, 8, 4, 45, 22, 11, 54, 27, 13, 63, 31, 69, 34, 17, 78, 39, 19, 9, 90, 93, 46, 23, 102, 51, 25, 12, 114, 57, 28, 14, 126, 129, 64, 32, 138, 141, 70, 35, 150, 75, 37, 18, 162, 81, 40, 20, 174, 87, 43
Offset: 1

Views

Author

Keywords

Comments

Does this sequence contain every positive integer exactly once?
Inverse: 4, 1, 3, 14, 9, 2, 6, 13, 29, 8, 17, 37, 20, 41, 5, 12, 25, 53, ..., . - Robert G. Wilson v, Apr 09 2018

Crossrefs

Programs

  • Maple
    S:= {0,2,6}: A[1]:= 2: A[2]:= 6:
    for n from 3 to 100 do
      t:= floor(A[n-1]/2);
      if member(t, S) then t:= 3*n fi;
      A[n]:= t;
      S:= S union {t};
    od:
    seq(A[n],n=1..100); # Robert Israel, Apr 09 2018
  • Mathematica
    f[s_] := Block[{b = Floor[s[[-1]]/2], l = Length@ s}, Append[s, If[MemberQ[s, b], 3l, b]]]; s = {0, 2, 6}; Nest[f, s, 57] (* Robert G. Wilson v, Apr 09 2018 *)

Extensions

Name corrected by Robert Israel, Apr 09 2018

A050137 a(1)=2; a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 2*n.

Original entry on oeis.org

2, 1, 6, 3, 10, 5, 14, 7, 18, 9, 4, 24, 12, 28, 30, 15, 34, 17, 8, 40, 20, 44, 22, 11, 50, 25, 54, 27, 13, 60, 62, 31, 66, 33, 16, 72, 36, 76, 38, 19, 82, 41, 86, 43, 21, 92, 46, 23, 98, 49, 102, 51, 106, 53, 26, 112, 56, 116, 58, 29, 122, 61
Offset: 1

Views

Author

Keywords

Comments

Does this sequence contain every positive integer exactly once?

Crossrefs

Programs

  • Maple
    R:= 2: S:= {2}: a:= 2:
    for n from 2 to 100 do
      t:= floor(a/2);
      if t <> 0 and not member(t,S) then a:= t else a:= 2*n fi;
      R:= R,a; S:= S union {a};
    od:
    R; # Robert Israel, Aug 03 2025

A050139 a(1)=2; for n > 1, a(n) = floor(a(n-1)/2) if this is not among 0, a(1), ..., a(n-1); otherwise a(n) = 4*n.

Original entry on oeis.org

2, 1, 12, 6, 3, 24, 28, 14, 7, 40, 20, 10, 5, 56, 60, 30, 15, 72, 36, 18, 9, 4, 92, 46, 23, 11, 108, 54, 27, 13, 124, 62, 31, 136, 68, 34, 17, 8, 156, 78, 39, 19, 172, 86, 43, 21, 188, 94, 47, 200, 100, 50, 25, 216, 220, 110, 55, 232, 116
Offset: 1

Views

Author

Keywords

Comments

Does this sequence contain every positive integer exactly once?

Crossrefs

Programs

  • Mathematica
    Delete[#, 3] &@ Nest[Append[#1, If[FreeQ[#1, #2], #2, 4 #3]] & @@ {#, Floor[#[[-1]]/2], Length@ #} &, {2}, 59] (* Michael De Vlieger, Oct 06 2019 *)
Previous Showing 21-29 of 29 results.