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

A026179 Numbers k such that A026177(j) < A026177(k) for all j < k.

Original entry on oeis.org

1, 2, 5, 6, 8, 11, 14, 15, 17, 18, 20, 23, 24, 26, 29, 32, 33, 35, 38, 41, 42, 44, 45, 47, 50, 51, 53, 54, 56, 59, 60, 62, 65, 68, 69, 71, 72, 74, 77, 78, 80, 83, 86, 87, 89, 92, 95, 96, 98, 99, 101, 104, 105, 107, 110, 113, 114, 116, 119
Offset: 1

Views

Author

Keywords

Comments

After first term, these are the numbers of the form (3i+2)*3^j, where i >= 0, j >= 0. - Clark Kimberling, Oct 19 2016
Old conjecture: (a(n)) = complement of A026225 after removal of the initial 1 here. [Note that following the proof of the form of its terms, A026225 has been renamed accordingly. - Peter Munn, Mar 24 2022]
The asymptotic density of this sequence is 1/2. - Amiram Eldar, Apr 03 2022

Crossrefs

Cf. A080846 (characteristic function except for 1), A137893.

Programs

  • Mathematica
    a[b_] := Table[Mod[n/b^IntegerExponent[n, b], b], {n, 1, 160}]
    p[b_, d_] := Flatten[Position[a[b], d]]
    p[3, 1] (* A026225 *)
    p[3, 2] (* A026179 without initial 1 *)
    (* Clark Kimberling, Oct 19 2016 *)
  • PARI
    a(n) = { if(n>1, n=2*n-2; my(v=digits(n,3));
      for(i=1,#v, if(v[i]==1, n++;
        forstep(j=#v,i,-1, if(v[j]++>2,v[j]=0,break)))));
      n; } \\ Kevin Ryde, Apr 23 2021
    
  • Python
    from sympy import integer_log
    def A026179(n):
        def f(x): return n-1+x-sum(((x//3**i)-2)//3+1 for i in range(integer_log(x,3)[0]+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 15 2025

Formula

Let the sequence 1, 0, 1, 1, 0, 0, 1, 0, 1, ... (A137893) be defined as the fixed point of the morphism 1->101 and 0->100, starting from a(1)=1. The indices of 0 are 2, 5, 6, 8, 11, 14, 17, 18, ... (this sequence with first term omitted). - Philippe Deléham, Jun 27 2006

A026178 a(n) is the position of n in A026177.

Original entry on oeis.org

1, 3, 4, 2, 7, 9, 10, 12, 13, 5, 16, 6, 19, 21, 22, 8, 25, 27, 28, 30, 31, 11, 34, 36, 37, 39, 40, 14, 43, 15, 46, 48, 49, 17, 52, 18, 55, 57, 58, 20, 61, 63, 64, 66, 67, 23, 70, 24, 73, 75, 76, 26, 79, 81, 82, 84, 85, 29, 88, 90, 91, 93, 94
Offset: 1

Views

Author

Keywords

Comments

Inverse of A026177.
From Kevin Ryde, Feb 06 2020: (Start)
The formulas below are seen by considering values taken in the inverse A026177. Dekking's case II there is here a(2n) = n when lowest non-0 ternary digit LNZ(n) = A060236(n) = 2, which is LNZ(2n)=1. Otherwise case III is here a(2n+1) = 3n+1 and case IV is here a(2n) = 3n. These can be combined by a floor (the inverse of the ceiling in A026177).
For positive c with LNZ(c)=1, so c = (3j+1)*3^k = A026225, 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. Using the inverse A026177, a(n)=c*m here is located at n = A026177(c*m) = c*A026177(m) - (floor(c/3) if m==1 (mod 3)) since c*m goes to the same bigger or smaller case in A026177 as m does. Then since floor(c/2) < c, values c*m are in the same order as all values m.
(End)

Crossrefs

Cf. A026177 (inverse).

Programs

  • Mathematica
    Values[Take[#, LengthWhile[Differences@ Keys@ #, # == 1 &]]][[All, 1]] &@ KeySort@ PositionIndex@ Array[If[Mod[#/3^IntegerExponent[#, 3], 3] == 1, Ceiling[2 #/3], 2 #] &, 94] (* or *)
    Block[{nn = 63, s}, s = Array[If[Mod[#/3^IntegerExponent[#, 3], 3] == 1, Ceiling[2 #/3], 2 #] &, Ceiling[3 nn/2]]; Array[FirstPosition[s, #][[1]] &, nn]] (* Michael De Vlieger, Feb 08 2020 *)
  • PARI
    a(n) = if(n%2 || (n/3^valuation(n,3))%3==2, floor(3*n/2), n/2);

Formula

From Kevin Ryde, Feb 06 2020: (Start)
a(n) = n/2 if n even and A060236(n)=1, otherwise a(n) = floor(3n/2), where A060236(n) is the lowest non-0 ternary digit of n.
a(3n) = 3*a(n) + (1 if n odd).
(End)

Extensions

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

A026214 a(n) = (1/2)*s(n), where s(n) is the n-th even number in A026177.

Original entry on oeis.org

2, 1, 5, 6, 8, 3, 11, 4, 14, 15, 17, 18, 20, 7, 23, 24, 26, 9, 29, 10, 32, 33, 35, 12, 38, 13, 41, 42, 44, 45, 47, 16, 50, 51, 53, 54, 56, 19, 59, 60, 62, 21, 65, 22, 68, 69, 71, 72, 74, 25, 77, 78, 80, 27, 83, 28, 86, 87, 89, 30, 92, 31, 95
Offset: 1

Views

Author

Keywords

Comments

The even values in A026177 are A026177(3n) = 2n or 6n, and A026177(3n+2) = 6n+4. The odd values are A026177(3n+1) = 2n+1. So a(2n) = A026177(3n)/2 and a(2n+1) = A026177(3n+2)/2. The latter is always the "small" case in A026177. The former is A026177(3n) big or small according to the lowest non-0 ternary digit of 3n, and consequently the formula below for a(n). - Kevin Ryde, Feb 29 2020

Crossrefs

Cf. A026177.

Programs

  • PARI
    a(n) = if(n%2 || (n/3^valuation(n,3))%3==1, ceil(3*n/2), n/2); \\ Kevin Ryde, Feb 29 2020

Formula

From Kevin Ryde, Feb 29 2020: (Start)
a(n) = n/2 if n even and A060236(n)=2, otherwise a(n) = ceiling(3n/2), where A060236(n) is the lowest non-0 ternary digit of n.
a(n) = A026177(ceiling(3n/2))/2.
(End)

A026180 a(n) = s(k), where k is the n-th number such that s(j)A026177.

Original entry on oeis.org

1, 4, 10, 12, 16, 22, 28, 30, 34, 36, 40, 46, 48, 52, 58, 64, 66, 70, 76, 82, 84, 88, 90, 94, 100, 102, 106, 108, 112, 118, 120, 124, 130, 136, 138, 142, 144, 148, 154, 156, 160, 166, 172, 174, 178, 184, 190, 192, 196, 198, 202, 208
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A026177.

A026216 Duplicate of A026177.

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

A026218 a(n) = (1/3)*(s(n) + 2), where s(n) is the n-th number congruent to 1 mod 3 in A026177.

Original entry on oeis.org

1, 2, 4, 6, 3, 8, 10, 12, 5, 14, 16, 18, 7, 20, 22, 24, 9, 26, 28, 30, 11, 32, 34, 36, 13, 38, 40, 42, 15, 44, 46, 48, 17, 50, 52, 54, 19, 56, 58, 60, 21, 62, 64, 66, 23, 68, 70, 72, 25, 74, 76, 78, 27, 80, 82, 84, 29, 86, 88, 90, 31, 92, 94
Offset: 1

Views

Author

Keywords

Comments

This seems to be the same as A026200. - Colin Barker, Oct 15 2019

Crossrefs

Programs

  • PARI
    \\ here S is A026177 as vector.
    S(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}
    {[(k + 2)/3 | k<-S(500), k%3==1]} \\ Andrew Howroyd, Oct 15 2019

A026196 Duplicate of A026177.

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

A026220 Duplicate of A026215.

Original entry on oeis.org

2, 1, 6, 8, 3, 4, 14, 5, 18, 20, 7, 24, 26, 9, 10, 32, 11, 12, 38, 13, 42, 44, 15, 16, 50, 17, 54, 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, 36, 110, 37, 114, 116, 39, 40, 122, 41
Offset: 1

Views

Author

Keywords

Comments

Is this the same as A026215? [R. J. Mathar, Oct 23 2008]
The original definition of this sequence was to take the values from A026177 which are multiples of 5, and divide them by 5. See A026177 on how that gives A026215 (and likewise other multiples (6j+5)*3^k in fact). - Kevin Ryde, Mar 12 2020
Showing 1-8 of 8 results.