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 11-15 of 15 results.

A036552 List of pairs (m,2m) where m is the least unused positive number.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 5, 10, 7, 14, 9, 18, 11, 22, 12, 24, 13, 26, 15, 30, 16, 32, 17, 34, 19, 38, 20, 40, 21, 42, 23, 46, 25, 50, 27, 54, 28, 56, 29, 58, 31, 62, 33, 66, 35, 70, 36, 72, 37, 74, 39, 78, 41, 82, 43, 86, 44, 88, 45, 90, 47, 94, 48, 96, 49, 98, 51, 102
Offset: 1

Views

Author

Keywords

Comments

A permutation of the natural numbers. Inverse permutation is A065037.

Crossrefs

Alternating merge of A003159 and A036554. Cf. A064736, A065037.

Programs

  • Haskell
    import Data.List (delete)
    a036552 n = a036552_list !! (n-1)
    a036552_list = g [1..] where
       g (x:xs) = x : (2*x) : (g $ delete (2*x) xs)
    -- Reinhard Zumkeller, Feb 07 2011
    
  • Mathematica
    w = {}; Do[ w = If[ FreeQ[w, k], w = Join[w, {k, 2k}], w], {k, 100}]; w
    (* Jean-François Alcover, Nov 04 2011, after Wouter Meeussen *)
  • PARI
    apairs(N) = my(m=0, r=List(), i=0); while(#rRuud H.G. van Tol, May 09 2024

A064764 Largest integer m such that every permutation (p_1, ..., p_n) of (1, ..., n) satisfies lcm(p_i, p_{i+1}) >= m for some i, 1 <= i <= n-1.

Original entry on oeis.org

1, 2, 3, 4, 6, 6, 12, 12, 12, 12, 18, 18, 24, 24, 24, 24, 35, 35, 44, 44, 44, 44, 55, 55, 55, 55, 55, 55, 68, 68, 85, 85, 85, 85, 85, 85, 102, 102, 102, 102, 119, 119, 145, 145, 145, 145, 174, 174, 174, 174, 174, 174, 203, 203, 203, 203, 203, 203, 232, 232, 261, 261, 261
Offset: 1

Views

Author

N. J. A. Sloane, Oct 21 2001

Keywords

Comments

For n >= 4, a(n) >= A073818(pi(n)), with equality for 19 <= n <= 70. - David Wasserman, Aug 17 2002

Examples

			n=6: we must arrange the numbers 1..6 so that the max of the lcm of pairs of adjacent terms is minimized. The answer is 632415, with max lcm = 6, so a(6) = 6.
		

Crossrefs

Formula

a(n) = (1+o(1))n^2/(4 log n) as n -> infinity.

Extensions

More terms from Vladeta Jovovic, Oct 21 2001
Further terms from David Wasserman, Aug 17 2002

A304085 Divisor-or-multiple permutation of natural numbers: a(n) = A052330(A304083(n)).

Original entry on oeis.org

1, 2, 6, 3, 24, 12, 4, 8, 120, 60, 20, 5, 40, 10, 30, 15, 840, 420, 140, 35, 7, 280, 70, 14, 210, 105, 21, 168, 84, 28, 56, 7560, 42, 1890, 945, 315, 63, 9, 3780, 1260, 252, 36, 2520, 630, 126, 18, 1512, 756, 189, 27, 378, 54, 1080, 540, 180, 45, 360, 90, 270, 135, 83160, 504, 72, 216, 108, 41580, 13860, 3465, 693, 99, 11, 27720, 6930, 1386, 198, 22, 20790
Offset: 0

Views

Author

Antti Karttunen, May 06 2018

Keywords

Comments

Each a(n) is always either a divisor or a multiple of a(n+1).

Crossrefs

Cf. A304086 (inverse).
Cf. also A064736, A113552, A207901, A281978, A282291, A302350, A302781, A302783, A303751, A303771 for similar permutations.

Programs

  • PARI
    up_to_e = 16; \\ Good for computing up to n = (2^16)-1
    v050376 = vector(up_to_e);
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e,break));
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A304085(n) = A052330(A304083(n)); \\ Needs also code from A304083

Formula

a(n) = A052330(A304083(n)).

A210770 a(1) = 1, a(2) = 2; for n > 1, a(2*n+2) = smallest number not yet seen, a(2*n+1) = a(2*n) + a(2*n+2).

Original entry on oeis.org

1, 2, 5, 3, 7, 4, 10, 6, 14, 8, 17, 9, 20, 11, 23, 12, 25, 13, 28, 15, 31, 16, 34, 18, 37, 19, 40, 21, 43, 22, 46, 24, 50, 26, 53, 27, 56, 29, 59, 30, 62, 32, 65, 33, 68, 35, 71, 36, 74, 38, 77, 39, 80, 41, 83, 42, 86, 44, 89, 45, 92, 47, 95, 48, 97, 49, 100
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 25 2012

Keywords

Comments

Permutation of natural numbers with inverse A210771.
From Jeffrey Shallit, Jun 18 2021: (Start)
This sequence is "2-sychronized"; there is a 23-state finite automaton that recognizes the base-2 representations of n and a(n), in parallel.
It obeys the identities
a(4n+3) = a(2n+1) - a(4n) + 2 a(4n+2)
a(8n) = 2a(4n)
a(8n+1) = a(2n+1) + 3a(4n)
a(8n+2) = a(2n+1) + 2 a(4n) - a(4n+1) + a(4n+2)
a(8n+4) = a(2n+1) + a(4n+2)
a(8n+5) = 3a(2n+1) - a(4n) +2a(4n+2)
a(8n+6) = 2a(2n+1) - a(4n) + a(4n+2). (End)

Crossrefs

Cf. A064736.

Programs

  • Haskell
    import Data.List (delete)
    a210770 n = a210770_list !! (n-1)
    a210770_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
    
  • Python
    def aupton(terms):
        alst, seen = [1, 2], {1, 2}
        for n in range(2, terms, 2):
            anp1 = alst[-1] + 1
            while anp1 in seen: anp1 += 1
            an = alst[n-1] + anp1
            alst, seen = alst + [an, anp1], seen | {an, anp1}
        return alst[:terms]
    print(aupton(67)) # Michael S. Branicky, Jun 18 2021

Formula

a(2*n-1) = A022441(n-1); a(2*n) = A055562(n-1).

Extensions

Definition corrected by Jeffrey Shallit, Jun 18 2021

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

Previous Showing 11-15 of 15 results.