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.

A067016 Start with a(0)=1, a(1)=4, a(2)=3, a(3)=2; for n>=3, a(n+1) = max_i (a(i)+a(n-i)).

Original entry on oeis.org

1, 4, 3, 2, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124, 127, 128
Offset: 0

Views

Author

N. J. A. Sloane, Feb 17 2002

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, E27.

Crossrefs

Programs

  • Haskell
    a067016 n = a067016_list !! n
    a067016_list = [1,4,3,2] ++ f [2,3,4,1] where
       f xs = maxi : f (maxi : xs) where
         maxi = maximum $ zipWith (+) xs (reverse xs)
    -- Reinhard Zumkeller, May 05 2012

Formula

First differences are ultimately periodic.
Conjecture: a(n) = (-3+(-1)^n+4*n)/2 for n>3. G.f.: -(2*x^6 -2*x^5 -6*x^4 +4*x^3 +2*x^2 -3*x -1) / ((x -1)^2*(x +1)). - Colin Barker, Apr 01 2013

Extensions

More terms from John W. Layman, Feb 20 2002

A067018 Start with a(0)=1, a(1)=4, a(2)=3, a(3)=2; for n>=3, a(n+1) = mex_i (nim-sum a(i)+a(n-i)), where mex means smallest nonnegative missing number.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 17 2002

Keywords

Comments

Nim-sum is addition in base 2 without carry (XOR the binary expansions).

Examples

			a(5) = mex{1 xor 0, 4 xor 2, 3 xor 3, etc. (duplicates)} = mex{1 xor 0, 100 xor 10, 11 xor 11} (in base 2) = mex{1, 6, 0} = 2
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E27.

Crossrefs

Programs

  • Haskell
    import Data.Bits (xor)
    import Data.List ((\\))
    a067018 n = a067018_list !! n
    a067018_list =  [1,4,3,2] ++ f [2,3,4,1] where
      f xs = mexi : f (mexi : xs) where
        mexi = head $ [0..] \\ zipWith xor xs (reverse xs) :: Integer
    -- Reinhard Zumkeller, May 05 2012

Extensions

More terms from John W. Layman, Feb 20 2002

A309157 Rectangular array in 3 columns that solve the complementary equation c(n) = a(n) + b(2n), where a(1) = 1; see Comments.

Original entry on oeis.org

1, 2, 5, 3, 4, 12, 6, 7, 20, 8, 9, 26, 10, 11, 33, 13, 14, 41, 15, 16, 47, 17, 18, 54, 19, 21, 61, 22, 23, 68, 24, 25, 75, 27, 28, 83, 29, 30, 89, 31, 32, 96, 34, 35, 104, 36, 37, 110, 38, 39, 117, 40, 42, 124, 43, 44, 131, 45, 46, 138, 48, 49, 146, 50, 51
Offset: 1

Views

Author

Clark Kimberling, Jul 15 2019

Keywords

Comments

Let A = (a(n)), B = (b(n)), and C = (c(n)). A unique solution (A,B,C) exists for these conditions: (1) A,B,C must partition the positive integers, and (2) A and B are defined by mex (minimal excludant, as in A067017); that is, a(n) is the least "new" positive integer, and likewise for b(n).

Examples

			c(1) = a(1) + b(2) > = 1 + 3, so that
a(2) = mex{1,2} = 3;
b(2) = mex{1,2,3} = 4;
c(1) = 5.
Then c(2) = a(2) + b(4) >= 3 + 8, so that
a(3) = 6, b(3) = 7;
a(4) = 8, b(4) = 9;
c(2) = a(2) + b(4) = 3 + 9 = 12.
   n    a(n) b(n) c(n)
  --------------------
   1      1    2    5
   2      3    4   12
   3      6    7   20
   4      8    9   26
   5     10   11   33
   6     13   14   41
   7     15   16   47
   8     17   18   54
   9     19   21   61
  10     22   23   68
		

Crossrefs

Cf. A326663 (3rd column),
A101544 solves c(n) = a(n) + b(n),
A326661 solves c(n) = a(n) + b(3n),
A326662 solves c(n) = a(2n) + b(2n).

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = b = c = {}; h = 1; k = 2;
    Do[Do[AppendTo[a,
      mex[Flatten[{a, b, c}], Max[Last[a /. {} -> {0}], 1]]];
      AppendTo[b, mex[Flatten[{a, b, c}], Max[Last[b /. {} -> {0}], 1]]], {k}];
      AppendTo[c, a[[h Length[a]/k]] + Last[b]], {150}];
    {a, b, c} // ColumnForm
    a = Take[a, Length[c]]; b = Take[b, Length[c]];
    Flatten[Transpose[{a, b, c}]] (* Peter J. C. Moses, Jul 04 2019 *)

A326661 Rectangular array in 3 columns that solve the complementary equation c(n) = a(n) + b(3n), where a(1) = 1; see Comments.

Original entry on oeis.org

1, 2, 7, 3, 4, 16, 5, 6, 25, 8, 9, 35, 10, 11, 43, 12, 13, 52, 14, 15, 61, 17, 18, 71, 19, 20, 79, 21, 22, 88, 23, 24, 97, 26, 27, 107, 28, 29, 115, 30, 31, 124, 32, 33, 133, 34, 36, 142, 37, 38, 151, 39, 40, 160, 41, 42, 169, 44, 45, 179, 46, 47, 187, 48
Offset: 1

Views

Author

Clark Kimberling, Jul 16 2019

Keywords

Comments

Let A = (a(n)), B = (b(n)), and C = (c(n)). A unique solution (A,B,C) exists for the following conditions: (1) A,B,C must partition the positive integers, and (2) A and B are defined by mex (minimal excludant, as in A067017); that is, a(n) is the least "new" positive integer, and likewise for b(n).

Examples

			c(1) = a(1) + b(3) >= 1 + 6, so that b(1) = mex{1} = 2; a(2) = mex{1,2} = 3; b(2) = mex{1,2,3} = 4; a(3)= mex{1,2,3,4} = 5, a(4) = mex{1,2,3,4,5} = 6, c(1) = 7.
n           a(n)      b(n)     c(n)
---------------------------
1             1        2        7
2             3        4       16
3             5        6       25
4             8        9       35
5            10       11       43
6            12       13       52
7            14       15       61
8            17       18       74
9            19       20       79
10           21       22       88
		

Crossrefs

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = b = c = {}; h = 1; k = 3;
    Do[Do[AppendTo[a,
      mex[Flatten[{a, b, c}], Max[Last[a /. {} -> {0}], 1]]];
      AppendTo[b, mex[Flatten[{a, b, c}], Max[Last[b /. {} -> {0}], 1]]], {k}];
      AppendTo[c, a[[h Length[a]/k]] + Last[b]], {150}];
    {a, b, c} // ColumnForm
    a = Take[a, Length[c]]; b = Take[b, Length[c]];
    Flatten[Transpose[{a, b, c}]](* Peter J. C. Moses, Jul 04 2019 *)

Extensions

Replaced a(0)->a(1) in NAME. - R. J. Mathar, Jun 19 2021

A326662 Rectangular array in 3 columns that solve the complementary equation c(n) = a(2n) + b(2n), where a(1) = 1; see Comments.

Original entry on oeis.org

1, 2, 7, 3, 4, 17, 5, 6, 25, 8, 9, 34, 10, 11, 43, 12, 13, 53, 14, 15, 61, 16, 18, 71, 19, 20, 79, 21, 22, 89, 23, 24, 97, 26, 27, 106, 28, 29, 115, 30, 31, 125, 32, 33, 133, 35, 36, 142, 37, 38, 151, 39, 40, 161, 41, 42, 169, 44, 45, 178, 46, 47, 187, 48
Offset: 1

Views

Author

Clark Kimberling, Jul 16 2019

Keywords

Comments

Let A = (a(n)), B = (b(n)), and C = (c(n)). A unique solution (A,B,C) exists for the following conditions: (1) A,B,C must partition the positive integers, and (2) A and B are defined by mex (minimal excludant, as in A067017); that is, a(n) is the least "new" positive integer, and likewise for b(n).

Examples

			c(1) = a(2) + b(2) >= 3 + 4, so that b(1) = mex{1} = 2; a(2) = mex{1,2} = 3; b(2) = mex{1,2,3} = 4; a(3)= mex{1,2,3,4} = 5, a(4) = mex{1,2,3,4,5} = 6, c(1) = 7.
n           a(n)      b(n)     c(n)
-----------------------------------
1             1        2        7
2             3        4       17
3             5        6       25
4             8        9       34
5            10       11       43
6            12       13       53
7            14       15       61
8            16       18       71
9            19       20       79
10           21       22       89
		

Crossrefs

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = b = c = {}; h = 2; k = 2;
    Do[Do[AppendTo[a,
       mex[Flatten[{a, b, c}], Max[Last[a /. {} -> {0}], 1]]];
      AppendTo[b, mex[Flatten[{a, b, c}], Max[Last[b /. {} -> {0}], 1]]], {k}];
      AppendTo[c, a[[h Length[a]/k]] + Last[b]], {150}];
    {a, b, c} // ColumnForm
    a = Take[a, Length[c]]; b = Take[b, Length[c]];
    Flatten[Transpose[{a, b, c}]](* Peter J. C. Moses, Jul 04 2019 *)

Extensions

Replaced a(0)->a(1) in NAME. - R. J. Mathar, Jun 19 2021
Showing 1-5 of 5 results.