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

A064736 a(1)=1, a(2)=2; for n>0, a(2*n+2) = smallest number missing from {a(1), ... ,a(2*n)}, and a(2*n+1) = a(2*n)*a(2*n+2).

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 20, 5, 35, 7, 56, 8, 72, 9, 90, 10, 110, 11, 143, 13, 182, 14, 210, 15, 240, 16, 272, 17, 306, 18, 342, 19, 399, 21, 462, 22, 506, 23, 552, 24, 600, 25, 650, 26, 702, 27, 756, 28, 812, 29, 870, 30, 930, 31, 992, 32, 1056, 33, 1122, 34, 1224, 36
Offset: 1

Views

Author

J. C. Lagarias (lagarias(AT)umich.edu), Oct 21 2001

Keywords

Comments

Let c be the smallest positive constant such that for all permutations {a_n} of the positive integers, lim inf_{n -> infinity} gcd(a_n, a_{n+1})/n <= c. This sequence shows c >= 1/2.
The definition implies that if a(n) is prime then n is even. - N. J. A. Sloane, May 23 2017
a(2n) ~ n+1 ~ n has asymptotic density 1 and a(2n-1) ~ n(n+1) ~ n^2 has asymptotic density zero. - M. F. Hasler, May 23 2017

Crossrefs

A064745 gives inverse permutation.
Interleaving of A286290 and A286291. See also A286292, A286293.

Programs

  • Haskell
    import Data.List (delete)
    a064736 n = a064736_list !! (n-1)
    a064736_list = 1 : 2 : f 1 2 [3..] where
       f u v (w:ws) = u' : w : f u' w (delete u' ws) where u' = v * w
    -- Reinhard Zumkeller, Mar 23 2012
  • Mathematica
    A064736 = {a[1]=1, a[2]=2}; a[n_] := a[n] = (an = If[OddQ[n], a[n-1]*a[n+1], First[ Complement[ Range[n], A064736]]]; AppendTo[A064736, an]; an); Table[a[n], {n, 1, 62}] (*Jean-François Alcover, Aug 07 2012 *)

Extensions

More terms from Vladeta Jovovic, Oct 21 2001
Definition clarified by N. J. A. Sloane, May 23 2017

A286290 A bisection of A064736.

Original entry on oeis.org

1, 6, 12, 20, 35, 56, 72, 90, 110, 143, 182, 210, 240, 272, 306, 342, 399, 462, 506, 552, 600, 650, 702, 756, 812, 870, 930, 992, 1056, 1122, 1224, 1332, 1406, 1482, 1560, 1640, 1722, 1806, 1892, 1980, 2070, 2162, 2256, 2352, 2450, 2550, 2652, 2756, 2862, 2970, 3135, 3306, 3422, 3540
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2017

Keywords

Comments

The terms of A064736 lie on two (curved) lines; this is one of them.
To produce this set, start with S={1} and a counter c=2, then repeatedly add to S the element c*increment(c), where increment() adds 1 or 2 in case c+1 is already in S. - M. F. Hasler, May 23 2017
Alternate definition: {1} and numbers of the form m(m+1) if neither m nor m+1 is an earlier term, or (m-1)(m+1), if m > 1 is a term of the sequence. - M. F. Hasler, May 23 2017
By definition, complement of A286291. - David A. Corneth, May 25 2017
If the initial 1 is omitted, this is the complement of A121229. - N. J. A. Sloane, May 26 2017

Crossrefs

Programs

  • PARI
    A286290_list(Nmax,a=List(1),c=2)={while(#aM. F. Hasler, May 23 2017
    
  • PARI
    a(n) = my(r = 1); for(i = 2, n, r = nxt(r)); r
    is(n) = if(n < 6, return(n==1)); if(issquare(n+1, &n), is(n), if(sqrtint(4*n+1)^2 == 4*n+1, s = sqrtint(4*n+1); !(is(s\2) || is(s\2+1)), return(0)))
    nxt(n) = n==1&&return(6); if(issquare(n+1, &n), (n+1) * (n+2), my(m = sqrtint(n)); if(is(m + 2), (m + 1) * (m + 3), (m + 1) * (m + 2)))
    lista(n) = my(c = 1, l = List([1])); for(i=2, n, c = nxt(c); listput(l, c)); l \\ David A. Corneth, May 25 2017

Formula

a(n) ~ n^2*(1 + 1.5/n^c) with c=1/2. (Conjectured, although for small n around 10^5 a smaller c ~ 0.478 is a better fit to the data.) - M. F. Hasler, May 23 2017
For n around 10^8, c ~ 0.4848 is a better fit. - David A. Corneth, May 25 2017

A286291 A bisection of A064736.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2017

Keywords

Comments

The terms of A064736 lie on two (curved) lines; this is one of them.
Sequence is: a(1) = 2, a(2) = 3. m is in the sequence if and only if there is no i such that a(i) * a(i+1) = m, where i are indices of terms in the sequence so far. By definition, this is the complement of A286090. - David A. Corneth, May 25 2017
Apparently the same as A121229 shifted by one place. - R. J. Mathar, May 25 2017

Examples

			See comments: 4 is in the sequence, since the terms so far, 2 and 3, don't multiply to 4. Same for 5. Sequence so far is: 2, 3, 4, 5. 6 isn't in the sequence. 7 is. Carrying on we get 2, 3, 4, 5, 7, 8, 9, 10, 11. 12 isn't in the sequence. Further in the sequence, 30 is in the sequence though it's of the form k*(k+1) for k = 5. But 6 isn't in the sequence. And indeed, 5 and 7 are consecutive terms so 5*7 = 35 isn't in the sequence. - _David A. Corneth_, May 25 2017
		

Crossrefs

Programs

  • PARI
    upto(n) = {my(l=List([2,3]), i = 1, p = 6, op = 3);
    while(1, if(op>=n, return(l)); for(j=op + 1, p-1, listput(l, j)); i++; op = p; p = l[i]*l[i+1])}
    is(n) = !is_A286290(n)
    is_A286290(n) = if(n < 6, return(n==1)); if(issquare(n+1, &n), is(n), if(sqrtint(4*n+1)^2 == 4*n+1, s = sqrtint(4*n+1); !(is(s\2) || is(s\2+1)), return(0))) \\ David A. Corneth, May 25 2017

A286292 The first differences of A286291 (one of the bisections of A064736) appears to consist of runs of 1 followed by singleton 2's; this sequence gives the lengths of these runs.

Original entry on oeis.org

3, 4, 6, 13, 19, 14, 16, 18, 31, 37, 26, 28, 30, 32, 34, 55, 61, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 100, 106, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 163, 169, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2017

Keywords

Comments

The steps of 2 occur when the corresponding integer is not in A286291 because it already occurred in A286290 [numbers of the form m(m+1) (m & m+1 not occurring earlier) or (m-1)(m+1) with m occurring earlier]. Accordingly, the present sequence equals first differences of A286290, minus 2. - M. F. Hasler, May 23 2017

Examples

			A064736: 1, 2, 6, 3, 12, 4, 20, 5, 35, 7, 56, 8, 72, 9, 90, 10, 110, ...
Bisect: 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, ... (A286291)
Differences: 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, ...
Runs: 3, 1, 4, 1, 6, 1, 13, 1, 19, 1, 14, 1, 16, 1, 18, 1, 31, 1, 37, 1, ...
Bisect: 3, 4, 6, 13, 19, 14, 16, 18, 31, 37, 26, 28, 30, 32, 34, 55, ... (this sequence)
From _M. F. Hasler_, May 23 2017: (Start)
Another approach:
A286290 = 1, 6, 12, 20, 35, 56, 72, 90, 110, 143, 182, 210, 240, 272, 306, 342, ...
1st Diff.: 5, 6,  8,  15, 21, 16, 18, 20,  33,  39,  28,  30,  32,  34, 36, ...
minus 2 =  3, 4,  6,  13, 19, 14, 16, 18,  31,  37,  26,  28,  30,  32, 34, ... (this sequence). (End)
		

Crossrefs

Formula

a(n) = A286290(n+1) - A286290(n) - 2. - M. F. Hasler, May 23 2017
Showing 1-4 of 4 results.