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

A026186 Duplicate of A026136.

Original entry on oeis.org

1, 3, 2, 7, 9, 4, 5, 15, 6, 19, 21, 8, 25, 27, 10, 11, 33, 12, 13, 39, 14, 43, 45, 16, 17, 51, 18, 55, 57, 20, 61, 63, 22, 23, 69, 24, 73, 75, 26, 79, 81, 28, 29, 87, 30, 31, 93, 32, 97, 99, 34, 35, 105, 36, 37, 111, 38, 115, 117, 40, 41, 123
Offset: 1

Views

Author

Keywords

A026210 Duplicate of A026136.

Original entry on oeis.org

1, 3, 2, 7, 9, 4, 5, 15, 6, 19, 21, 8, 25, 27, 10, 11, 33, 12, 13, 39, 14, 43, 45, 16, 17, 51, 18, 55, 57, 20, 61, 63, 22, 23, 69, 24, 73, 75, 26, 79, 81, 28, 29, 87, 30, 31, 93, 32, 97, 99, 34, 35, 105, 36, 37, 111, 38, 115, 117, 40, 41, 123
Offset: 1

Views

Author

Keywords

A026228 Numbers k such that A026166(k) = A026136(k) - 1.

Original entry on oeis.org

2, 5, 11, 14, 23, 29, 32, 38, 41, 50, 59, 65, 68, 77, 83, 86, 92, 95, 104, 110, 113, 119, 122, 131, 140, 146, 149, 158, 167, 173, 176, 185, 191, 194, 200, 203, 212, 221, 227, 230, 239, 245, 248, 254, 257, 266, 272, 275, 281, 284
Offset: 1

Views

Author

Keywords

A026142 Lexicographically earliest permutation of the positive integers such that for n >= 2, |a(n)-n| = [(a(n)+1)/2].

Original entry on oeis.org

1, 4, 2, 8, 3, 12, 14, 5, 6, 20, 7, 24, 26, 9, 10, 32, 11, 36, 38, 13, 42, 44, 15, 16, 50, 17, 18, 56, 19, 60, 62, 21, 22, 68, 23, 72, 74, 25, 78, 80, 27, 28, 86, 29, 30, 92, 31, 96, 98, 33, 34, 104, 35, 108, 110, 37, 114, 116, 39, 40, 122, 41, 126, 128, 43, 132
Offset: 1

Views

Author

Keywords

Comments

Old name: For n >= 2, let h=[ (n+1)/2 ], L=n-h, R=n+h; a(L)=n if a(L) not yet defined, else a(R)=n; thus |a(n)-n| = [ (a(n)+1)/2 ].
From Peter Munn, Jan 07 2022: (Start)
A value m occurs at an index n, n < m if and only if m has the form 3^i*4 or 3^i*(6k+2), k >= 1.
Proof:
For k >= 1, values of the form 2k+1 occur at index 2k+1 + [(2k+1+1)/2] = 3k+2 and not at index 2k+1 - [(2k+1+1)/2] = k, because a(k) can take the value 2k and 2k cannot occur earlier.
So, for k >= 1, values of the form 6k+4 occur at index 6k+4 + [(6k+4+1)/2] = 9k+6, and not at index 6k+4 - [(6k+4+1)/2] = 3k+2 because a(3k+2) takes the value 2k+1.
For k >= 1, values of the form 6k+2 occur at index 6k+2 - [(6k+2+1)/2] = 3k+1, because numbers of the form 3k+1 do not have the form m+[(m+1)/2] for any m > 0. (Note that for k = 0, 1 occurs at index 1 due to an explicit exemption from the definition's constraining rule.)
A value of the form 6k occurs at index 6k - [(6k+1)/2] = 3k if and only if 2k occurs at index k rather than occupying index 3k.
From the characterization above of cases 6k+4, 6k+2 and 6k we see the following: an even number 2j > 4 occurs before or after position 2j depending on the base 3 representation of j with its trailing zeros removed. (With respect to the statement being proved j = 3^i*2 or 3^i*(3k+1).)
(End)

Crossrefs

Programs

  • Mathematica
    Block[{a, nn = 132}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[(i + 1)/2], {i, nn}]; TakeWhile[Array[a[#] &, nn], IntegerQ]] (* Michael De Vlieger, Apr 17 2020 *)

Extensions

New name from Peter Munn, Jan 07 2022

A026177 For n >= 2, let h=floor(n/2), L=n-h, R=n+h; then a(R)=n if n odd or a(L) already defined, otherwise a(L)=n.

Original entry on oeis.org

1, 4, 2, 3, 10, 12, 5, 16, 6, 7, 22, 8, 9, 28, 30, 11, 34, 36, 13, 40, 14, 15, 46, 48, 17, 52, 18, 19, 58, 20, 21, 64, 66, 23, 70, 24, 25, 76, 26, 27, 82, 84, 29, 88, 90, 31, 94, 32, 33, 100, 102, 35, 106, 108, 37, 112, 38, 39, 118, 120, 41
Offset: 1

Views

Author

Keywords

Comments

Also a(n) = (1/5)*s(n), where s(n) is the n-th multiple of 5 in A026142.
Inverse is A026178.
From Kevin Ryde, Feb 06 2020: (Start)
Dekking's cases III and IV can be combined as ceiling(2n/3). Theorem 8 determines the case for n by discarding low ternary 0 digits until reaching the lowest ternary non-0 digit of n, LNZ(n) = A060236(n), and hence the formula below for when the bigger a(n) = 2n or smaller a(n) = ceiling(2n/3).
For c odd and LNZ(c)=1, so c = (6j+1)*3^k, this sequence has a self-similarity in that taking the values which are multiples of c, and dividing them by c, gives the full sequence again. (Multiples of 3 divided by 3 this way had been the definition of A026216.) Using the inverse A026178, a(n)=c*m is located at n = A026178(c*m) = c*A026178(m) + (floor(c/2) if m odd) since c*m goes to the same bigger or smaller case in A026178 as m does. Then floor(c/2) < c so values c*m are in the same order as all values m.
For c even and LNZ(c)=1, so c = (6j+4)*3^k = A026180 except initial 1, this sequence has an inverse self-similarity in that taking the values which are multiples of c, and dividing them by c, gives the inverse sequence A026178. c*m is located here at A026178(c*m) and conversely m in A026178 is located at a(m). These locations are related by an identity 4*A026178(c*m) = 3*c*a(m) - (c if m==1 (mod 3)) since c*m is even so goes to the big or small cases in A026178 according to LNZ, the same as here. The cases here and there differ by factor 3/4. So values c*m here are in the same order as all values m in A026178.
For c even and LNZ(c)=2, so c = (6j+2)*3^k = 2*A026225, taking the values which are multiples of c, and dividing them by c, gives A026214. A026214 is defined as the multiples of 2 divided by 2, i.e., c=2, and other c of this form are the same. The locations of c*m and 2*m here are A026178(c*m) = (c/2)*A026178(2*m) since c*m has the same effect as 2*m on the big or small cases in A026178, and so values c*m here are in the same order as values 2*m.
For c odd and LNZ(c)=2, so c = (6j+5)*3^k, taking the values which are multiples of c, and dividing them by c, gives A026215. (Multiples of 5 divided by 5 this way had been the definition of A026220.) Using the formulas in their respective inverses, the location of c*m here and m in A026215 are related by A026178(c*m) = c*A026214(m) - (ceiling(c/2) if m odd). This is since LNZ(c)=2 in c*m flips the sense of the LNZ test in A026178 so it corresponds to A026214. Then ceiling(c/2) < c so values c*m here are in the same order as all values of A026215.
(End)

Crossrefs

Cf. A026178 (inverse), A026179 (indices of new highs), A026180 (values of new highs), A026136, A026142.

Programs

  • Mathematica
    Array[If[Mod[#/3^IntegerExponent[#, 3], 3] == 1, Ceiling[2 #/3], 2 #] &, 61] (* Michael De Vlieger, Feb 08 2020 *)
  • PARI
    seq(n)={my(a=vector(n)); a[1]=1; for(i=2, 2*n, my(h=i\2); if(i%2==0&&!a[i-h], a[i-h]=i, if(i+h<=n, a[i+h]=i))); a} \\ Andrew Howroyd, Oct 15 2019
    
  • PARI
    a(n) = if((n/3^valuation(n,3))%3==1, ceil(2*n/3), 2*n); \\ Kevin Ryde, Feb 06 2020

Formula

From Kevin Ryde, Feb 06 2020: (Start)
a(n) = ceiling(2n/3) if A060236(n)=1, otherwise a(n) = 2n, where A060236(n) is the lowest non-0 ternary digit of n.
a(n) = ceiling(2n / 3^A137893(n)).
a(3n) = 3*a(n) - (1 if n==1 (mod 3)).
(End)

Extensions

Edited by N. J. A. Sloane, Feb 05 2020

A026141 a(n) = (s(n)-s(n-1))/2, where s = A026139.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{a, r, s, nn = 105}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[i/2], {i, 4 nn}]; s = TakeWhile[Array[a[#] &, 2 nn], IntegerQ]; Map[(#2 - #1)/2 & @@ # &, Partition[Union@ FoldList[Max, s], 2, 1]]] (* Michael De Vlieger, Aug 27 2021 *)

Extensions

Edited by N. J. A. Sloane, Jan 31 2020

A026140 a(n) = (1/2)*(s(n) - 1), where s = A026139.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 10, 12, 13, 16, 19, 21, 22, 25, 27, 28, 30, 31, 34, 36, 37, 39, 40, 43, 46, 48, 49, 52, 55, 57, 58, 61, 63, 64, 66, 67, 70, 73, 75, 76, 79, 81, 82, 84, 85, 88, 90, 91, 93, 94, 97, 100, 102, 103, 106, 108, 109, 111, 112, 115, 117, 118
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{a, r, s, nn = 119}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[i/2], {i, 2 nn}]; s = TakeWhile[Array[a[#] &, 2 nn], IntegerQ]; Map[(1/2) (# - 1) &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Aug 27 2021 *)
Previous Showing 11-17 of 17 results.