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.

A286293 A compressed version of A286290.

Original entry on oeis.org

1, 2, 4, 11, 17, 12, 14, 16, 29, 35, 24, 26, 28, 30, 32, 53, 59, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 98, 104, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 161, 167, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2017

Keywords

Examples

			Start with A064736, bisect to get A286290, take second difference, and we get:
1, 2, 7, 6, -5, 2, 2, 13, 6, -11, 2, 2, 2, 2, 21, 6, -19, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 6, -34, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 57, 6, -55, 2, 2, ...
which appears to consist of runs of 2's separated by a triple of numbers.
Look at the runs in that sequence:
1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 11, 1, 1, 1, 17, 1, 1, 1, 12, 1, 1, 1, 14, 1, 1, 1, 16, 1, 1, 1, 29, 1, 1, 1, 35, 1, 1, 1, 24, 1, 1, 1, 26, 1, 1, ...
and take the 4i+2 subsequence, which gives the present sequence.
		

Crossrefs

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

A121229 Beginning with a(1) = 1 and a(2) = 2, a(n) is not equal to the product of two consecutive (distinct) earlier terms.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Aug 21 2006

Keywords

Crossrefs

The complement is A286290, excluding the initial 1.

Programs

  • Maple
    A121229 := proc(n)
        option remember;
        local a,ispr,i;
        if n <=2 then
            n;
        else
            for a from procname(n-1)+1 do
                ispr := false ;
                for i from 1 to n-2 do
                    if procname(i)*procname(i+1) = a then
                        ispr := true ;
                        break;
                    end if;
                end do:
                if not ispr then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, May 25 2017
  • Mathematica
    a[n_] := a[n] = Module[{k, ispr, i}, If[n <= 2, n, For[k = a[n - 1] + 1, True, k++, ispr = False; For[i = 1, i <= n - 2, i++, If[a[i]*a[i + 1] == k, ispr = True; Break[]]]; If[!ispr, Return[k]]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 23 2022, after R. J. Mathar *)
  • Python
    from itertools import islice
    def agen(): # generator of terms
        disallowed, prevk, k = {1, 2}, 2, 3; yield from [1, 2]
        while True:
            while k in disallowed: k += 1
            yield k; disallowed.update([k, k*prevk]); prevk = k
    print(list(islice(agen(), 72))) # Michael S. Branicky, Sep 23 2022

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