A026179 Numbers k such that A026177(j) < A026177(k) for all j < k.
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
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020, see R_opos in section 2.3.
- Kevin Ryde, Iterations of the Terdragon Curve, see index "TurnRight".
- Index entries for 3-automatic sequences.
Crossrefs
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
Comments