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-5 of 5 results.

A325422 Complement of A077477.

Original entry on oeis.org

3, 4, 5, 7, 13, 17, 19, 21, 23, 25, 28, 29, 31, 33, 34, 37, 41, 43, 45, 46, 49, 53, 55, 61, 65, 67, 71, 73, 77, 79, 81, 82, 85, 89, 91, 95, 97, 101, 103, 105, 106, 109, 113, 115, 117, 118, 119, 121, 125, 127, 129, 133, 137, 139, 141, 142, 145, 149, 151, 153
Offset: 1

Views

Author

Clark Kimberling, Apr 26 2019

Keywords

Comments

These are the numbers 2x + 1 and 3x + 1 as x ranges through the numbers in A077477.

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1, Apply[Or,
    Map[MemberQ[a, #] &, Select[Flatten[{(# - 1)/3, (# - 1)/2}],
    IntegerQ]]] &]], {150}]; a;     (* A077477 *)
    Complement[Range[Last[a]], a];  (* A325422 *)
    (* Peter J. C. Moses, Apr 23 2019 *)

A325496 Difference sequence of A077477.

Original entry on oeis.org

1, 4, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 3, 2, 3, 1, 2, 1, 1, 2, 2, 3, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 1, 2, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 3
Offset: 1

Views

Author

Clark Kimberling, May 05 2019

Keywords

Comments

See A325417 for a guide to related sequences. Conjecture: every term is in {1,2,3,4}.

Examples

			A077477 is given by A(n) = least number not 2*A(m)+1 or 3*A(m)+1 for any m < n, so that A = (1,2,6,8,9,10,11,12,14,...), with differences (1,4,2,1,1,1,1,2,...).
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{(#-1)/3, (# - 1)/2}],
    IntegerQ]]] &]], {2000}]; a ;       (* A077477 *)
    c = Complement[Range[Last[a]], a] ; (* A325422 *)
    Differences[a]  (* A325496 *)
    Differences[c]  (* A325497 *)
    (* Peter J. C. Moses, Apr 23 2019 *)

A325417 a(n) is the least number not 2*a(m) or 3*a(m)+1 for any m < n.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 27, 29, 31, 32, 33, 35, 36, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 55, 56, 57, 59, 60, 63, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 99, 101, 103, 104
Offset: 1

Views

Author

Clark Kimberling, Apr 24 2019

Keywords

Comments

In column 1 of the following guide to related sequences, disallowed terms are indicated by the variable x representing a(m) for m < n.
Disallowed Sequence(a) Complement(c) Differences(a) Differences(c)

Examples

			The sequence necessarily starts with 1.  The next 2 terms are determined as follows:  because a(1) = 1, the numbers 2 and 4 are disallowed, so that a(2) = 3, whence the numbers 6 and 10 are disallowed, so that a(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{#/2, (# - 1)/3}],
    IntegerQ]]] &]], {150}]; a     (* A325417 *)
    Complement[Range[Last[a]], a]  (* A325418 *)
    (* Peter J. C. Moses, Apr 23 2019 *)

A002977 Klarner-Rado sequence: a(1) = 1; subsequent terms are defined by the rule that if m is present so are 2m+1 and 3m+1.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 39, 40, 43, 45, 46, 55, 57, 58, 63, 64, 67, 79, 81, 82, 85, 87, 91, 93, 94, 111, 115, 117, 118, 121, 127, 129, 130, 135, 136, 139, 159, 163, 165, 166, 171, 172, 175, 183, 187, 189, 190, 193, 202, 223, 231, 235, 237
Offset: 1

Views

Author

Keywords

Comments

Complement of A132142: A132138(a(n)) = 1; for all terms m there exists at least one x such that A132140(x)=m. - Reinhard Zumkeller, Aug 20 2007
a(n+1) = A007448(a(n)), which also gives the record values of A007448 and their positions. - Reinhard Zumkeller, Jul 14 2010
Named after the American mathematician David Anthony Klarner (1940-1999) and the German-British mathematician Richard Rado (1906-1989). - Amiram Eldar, Jun 24 2021

Examples

			a(10) = 21 = 2*(3*(2*1+1)+1)+1: A132139(A132140(10)) = A132139(43) = 21;
a(14) = 31 = 3*(3*(2*1+1)+1)+1 = 2*(2*(2*(2*1+1)+1)+1)+1: A132139(A132140(14)) = A132139(52) = 31 and A132139(A132140(16)) = A132139(121) = 31.
		

References

  • Michael L. Fredman and Donald E. Knuth, Recurrence relations based on minimization, Abstract 71T-B234, Notices Amer. Math. Soc., Vol. 18 (1971), p. 960.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence)
  • Niklaus Wirth, Systematisches Programmieren, 1975, exercise 15.12.

Crossrefs

See A276786 for multi-set version.

Programs

  • Haskell
    import Data.Set
    a002977 n = a002977_list !! (n-1)
    a002977_list = f $ singleton 1 where
       f :: Set Integer -> [Integer]
       f s = m : (f $ insert (3*m+1) $ insert (2*m+1) s') where
            (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Feb 10 2011
    
  • Haskell
    See Niemeijer link.
    import Data.List.Ordered (union)
    a002977_list = 1 : union
       (map ((+1) . (*2)) a002977_list) (map ((+1) . (*3)) a002977_list)
    -- Reinhard Zumkeller, Nov 12 2014
    
  • Mathematica
    Union[ Flatten[ NestList[{2# + 1, 3# + 1} &, 1, 6]]] (* Robert G. Wilson v, May 11 2005 *)
  • PARI
    list(lim)=my(u=List(),v=List([1]),t,sz); while(#v, listput(u,v[1]); t=2*v[1]+1; if(t>lim, listpop(v,1); next); listput(v,t); t=3*v[1]+1; listpop(v,1); if(t<=lim, listput(v,t)); if(#v>sz, u=Set(u); v=List(setminus(Set(v),u)); u=List(u); sz=2*#v)); Set(u) \\ Charles R Greathouse IV, Aug 21 2017

Formula

It seems that lim_{n->infinity} log(A002977(n))/log(n) = C = 1.3... and probably A002977(n) is asymptotic to u*n^C with u=1.0... - Benoit Cloitre, Nov 06 2002
Limit_{n->infinity} log(A002977(n))/log(n) = C = 1.269220905243564855888589424556..., and lim_{n->infinity} A002977(n)/n^C = u = 1.335... - Yi Yang, Jul 23 2011, Aug 21 2017

Extensions

More terms from Ray Chandler, Sep 06 2003

A325497 Difference sequence of A325422.

Original entry on oeis.org

1, 1, 2, 6, 4, 2, 2, 2, 2, 3, 1, 2, 2, 1, 3, 4, 2, 2, 1, 3, 4, 2, 6, 4, 2, 4, 2, 4, 2, 2, 1, 3, 4, 2, 4, 2, 4, 2, 2, 1, 3, 4, 2, 2, 1, 1, 2, 4, 2, 2, 4, 4, 2, 2, 1, 3, 4, 2, 2, 1, 3, 4, 2, 4, 2, 3, 1, 2, 2, 1, 3, 4, 2, 2, 1, 3, 4, 2, 2, 4, 3, 1, 2, 4, 2, 4
Offset: 1

Views

Author

Clark Kimberling, May 05 2019

Keywords

Comments

See A325417 for a guide to related sequences. Conjecture: every term is in {1,2,3,4,6}.

Examples

			A325422 is given by A(n) = least number not 2*A(m)+1 or 3*A(m)+1 for any m < n, so that A = (3,4,5,7,13,17,19,...), with differences (1,1,2,6,4,2,...).
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{(#-1)/3, (# - 1)/2}],
    IntegerQ]]] &]], {2000}]; a ;       (* A077477 *)
    c = Complement[Range[Last[a]], a] ; (* A325422 *)
    Differences[a]  (* A325496 *)
    Differences[c]  (* A325497 *)
    (* Peter J. C. Moses, Apr 23 2019 *)
Showing 1-5 of 5 results.