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-10 of 14 results. Next

A191113 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 4x-2 are in a.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 16, 22, 28, 38, 40, 46, 54, 62, 64, 82, 86, 110, 112, 118, 136, 150, 158, 160, 182, 184, 190, 214, 244, 246, 254, 256, 326, 328, 334, 342, 352, 406, 438, 446, 448, 470, 472, 478, 542, 544, 550, 568, 598, 630, 638, 640, 726, 730, 734, 736, 758, 760, 766, 854, 974, 976, 982, 1000, 1014, 1022, 1024, 1054, 1216
Offset: 1

Views

Author

Clark Kimberling, May 27 2011

Keywords

Comments

This sequence represents a class of sequences generated by rules of the form "a(1)=1, and if x is in a then hx+i and jx+k are in a, where h,i,j,k are integers." If m>1, at least one of the numbers b(m)=(a(m)-i)/h and c(m)=(a(m)-k)/j is in the set N of natural numbers. Let d(n) be the n-th b(m) in N, and let e(n) be the n-th c(m) in N. Note that a is a subsequence of both d and e. Examples:
A191113: (h,i,j,k)=(3,-2,4,-2); d=A191146, e=A191149
A191114: (h,i,j,k)=(3,-2,4,-1); d=A191151, e=A191121
A191115: (h,i,j,k)=(3,-2,4,0); d=A191113, e=A191154
A191116: (h,i,j,k)=(3,-2,4,1); d=A191155 e=A191129
A191117: (h,i,j,k)=(3,-2,4,2); d=A191157, e=A191158
A191118: (h,i,j,k)=(3,-2,4,3); d=A191114, e=A191138
...
A191119: (h,i,j,k)=(3,-1,4,-3); d=A191120, e=A191163
A191120: (h,i,j,k)=(3,-1,4,-2); d=A191129, e=A191165
A191121: (h,i,j,k)=(3,-1,4,-1); d=A191166, e=A191167
A191122: (h,i,j,k)=(3,-1,4,0); d=A191168, e=A191169
A191123: (h,i,j,k)=(3,-1,4,1); d=A191170, e=A191171
A191124: (h,i,j,k)=(3,-1,4,2); d=A191172, e=A191173
A191125: (h,i,j,k)=(3,-1,4,3); d=A191174, e=A191175
...
A191126: (h,i,j,k)=(3,0,4,-3); d=A191128, e=A191177
A191127: (h,i,j,k)=(3,0,4,-2); d=A191178, e=A191179
A191128: (h,i,j,k)=(3,0,4,-1); d=A191180, e=A191181
A025613: (h,i,j,k)=(3,0,4,0); d=e=A025613
A191129: (h,i,j,k)=(3,0,4,1); d=A191182, e=A191183
A191130: (h,i,j,k)=(3,0,4,2); d=A191184, e=A191185
A191131: (h,i,j,k)=(3,0,4,3); d=A191186, e=A191187
...
A191132: (h,i,j,k)=(3,1,4,-3); d=A191135, e=A191189
A191133: (h,i,j,k)=(3,1,4,-2); d=A191190, e=A191191
A191134: (h,i,j,k)=(3,1,4,-1); d=A191192, e=A191193
A191135: (h,i,j,k)=(3,1,4,0); d=A191136, e=A191195
A191136: (h,i,j,k)=(3,1,4,1); d=A191196, e=A191197
A191137: (h,i,j,k)=(3,1,4,2); d=A191198, e=A191199
A191138: (h,i,j,k)=(3,1,4,3); d=A191200, e=A191201
...
A191139: (h,i,j,k)=(3,2,4,-3); d=A191143, e=A191119
A191140: (h,i,j,k)=(3,2,4,-2); d=A191204, e=A191205
A191141: (h,i,j,k)=(3,2,4,-1); d=A191206, e=A191207
A191142: (h,i,j,k)=(3,2,4,0); d=A191208, e=A191209
A191143: (h,i,j,k)=(3,2,4,1); d=A191210, e=A191136
A191144: (h,i,j,k)=(3,2,4,2); d=A191212, e=A191213
A191145: (h,i,j,k)=(3,2,4,3); d=e=A191145
...
Representative divisibility properties:
if s=A191116, then 2|(s+1), 4|(s+3), and 8|(s+3) for n>1; if s=A191117, then 10|(s+4) for n>1.
For lists of other "rules sequences" see A190803 (h=2 and j=3) and A191106 (h=j=3).

Examples

			1 -> 2 -> 4,6 -> 10,14,16,22 ->
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a191113 n = a191113_list !! (n-1)
    a191113_list = 1 : f (singleton 2)
       where f s = m : (f $ insert (3*m-2) $ insert (4*m-2) s')
                 where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Jun 01 2011
  • Maple
    N:= 2000: # to get all terms <= N
    S:= {}: agenda:= {1}:
    while nops(agenda) > 0 do
      S:= S union agenda;
      agenda:= select(`<=`,map(t -> (3*t-2,4*t-2),agenda) minus S, N)
    od:
    sort(convert(S,list)); # Robert Israel, Dec 22 2015
  • Mathematica
    h = 3; i = -2; j = 4; k = -2; f = 1; g = 8;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]
    (* a=A191113; regarding g, see the Mathematica note at A190803 *)
    b = (a + 2)/3; c = (a + 2)/4; r = Range[1, 900];
    d = Intersection[b, r] (* A191146 *)
    e = Intersection[c, r] (* A191149 *)
    m = a/2 (* divisibility property *)

Formula

a(1)=1, and if x is in a then 3x-2 and 4x-2 are in a; the terms of a are listed in without repetitions, in increasing order.

A003278 Szekeres's sequence: a(n)-1 in ternary = n-1 in binary; also: a(1) = 1, a(2) = 2, and thereafter a(n) is smallest number k which avoids any 3-term arithmetic progression in a(1), a(2), ..., a(n-1), k.

Original entry on oeis.org

1, 2, 4, 5, 10, 11, 13, 14, 28, 29, 31, 32, 37, 38, 40, 41, 82, 83, 85, 86, 91, 92, 94, 95, 109, 110, 112, 113, 118, 119, 121, 122, 244, 245, 247, 248, 253, 254, 256, 257, 271, 272, 274, 275, 280, 281, 283, 284, 325, 326, 328, 329, 334, 335, 337, 338, 352, 353
Offset: 1

Views

Author

Keywords

Comments

That is, there are no three elements A, B and C such that B - A = C - B.
Positions of 1's in Richard Stanley's Forest Fire sequence A309890. - N. J. A. Sloane, Dec 01 2019
Subtracting 1 from each term gives A005836 (ternary representation contains no 2's). - N. J. A. Sloane, Dec 01 2019
Difference sequence related to Gray code bit sequence (A001511). The difference patterns follows a similar repeating pattern (ABACABADABACABAE...), but each new value is the sum of the previous values, rather than simply 1 more than the maximum of the previous values. - Hal Burch (hburch(AT)cs.cmu.edu), Jan 12 2004
Sums of distinct powers of 3, translated by 1.
Positions of 0 in A189820; complement of A189822. - Clark Kimberling, May 26 2011
Also, Stanley sequence S(1): see OEIS Index under Stanley sequences (link below). - M. F. Hasler, Jan 18 2016
Named after the Hungarian-Australian mathematician George Szekeres (1911-2005). - Amiram Eldar, May 07 2021
If A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+3^n). - Arie Bos, Jul 24 2022

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 5*x^4 + 10*x^5 + 11*x^6 + 13*x^7 + 14*x^8 + 28*x^9 + ...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 164.
  • Richard K. Guy, Unsolved Problems in Number Theory, E10.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals 1 + A005836. Cf. A001511, A098871.
Row 0 of array in A093682.
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
Cf. A003002, A229037 (the Forest Fire sequence), A309890 (Stanley's version).
Similar formula:
If A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+4^n) produces A098871;
If A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+2*3^n) produces A191106.

Programs

  • Julia
    function a(n)
        return 1 + parse(Int, bitstring(n-1), base=3)
    end # Gabriel F. Lipnik, Apr 16 2021
  • Maple
    a:= proc(n) local m, r, b; m, r, b:= n-1, 1, 1;
          while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*3 od; r
        end:
    seq(a(n), n=1..100); # Alois P. Heinz, Aug 17 2013
  • Mathematica
    Take[ Sort[ Plus @@@ Subsets[ Table[3^n, {n, 0, 6}]]] + 1, 58] (* Robert G. Wilson v, Oct 23 2004 *)
    a[1] = 0; h = 180;
    Table[a[3 k - 2] = a[k], {k, 1, h}];
    Table[a[3 k - 1] = a[k], {k, 1, h}];
    Table[a[3 k] = 1, {k, 1, h}];
    Table[a[n], {n, 1, h}]   (* A189820 *)
    Flatten[Position[%, 0]]  (* A003278 *)
    Flatten[Position[%%, 1]] (* A189822 *)
    (* A003278 from A189820, from Clark Kimberling, May 26 2011 *)
    Table[FromDigits[IntegerDigits[n, 2], 3] + 1, {n, 0, 57}] (* Amit Munje, Jun 03 2018 *)
  • PARI
    a(n)=1+sum(i=1,n-1,(1+3^valuation(i,2))/2) \\ Ralf Stephan, Jan 21 2014
    
  • Perl
    $nxt = 1; @list = (); for ($cnt = 0; $cnt < 1500; $cnt++) { while (exists $legal{$nxt}) { $nxt++; } print "$nxt "; last if ($nxt >= 1000000); for ($i = 0; $i <= $#list; $i++) { $t = 2*$nxt - $list[$i]; $legal{$t} = -1; } $cnt++; push @list, $nxt; $nxt++; } # Hal Burch
    
  • Python
    def A003278(n):
        return int(format(n-1,'b'),3)+1 # Chai Wah Wu, Jan 04 2015
    

Formula

a(2*k + 2) = a(2*k + 1) + 1, a(2^k + 1) = 2*a(2^k).
a(n) = b(n+1) with b(0) = 1, b(2*n) = 3*b(n)-2, b(2*n+1) = 3*b(n)-1. - Ralf Stephan, Aug 23 2003
G.f.: x/(1-x)^2 + x * Sum_{k>=1} 3^(k-1)*x^(2^k)/((1-x^(2^k))*(1-x)). - Ralf Stephan, Sep 10 2003, corrected by Robert Israel, May 25 2011
Conjecture: a(n) = (A191107(n) + 2)/3 = (A055246(n) + 5)/6. - L. Edson Jeffery, Nov 26 2015
a(n) mod 2 = A010059(n). - Arie Bos, Aug 13 2022

A190803 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x-1 and 3x-1 are in a.

Original entry on oeis.org

1, 2, 3, 5, 8, 9, 14, 15, 17, 23, 26, 27, 29, 33, 41, 44, 45, 50, 51, 53, 57, 65, 68, 77, 80, 81, 86, 87, 89, 98, 99, 101, 105, 113, 122, 129, 131, 134, 135, 149, 152, 153, 158, 159, 161, 170, 171, 173, 177, 194, 195, 197, 201, 203, 209, 225, 230, 239, 242
Offset: 1

Views

Author

Clark Kimberling, May 25 2011

Keywords

Comments

This sequence represents a class of sequences generated by rules of the form "a(1)=1, and if x is in a then hx+i and jx+k are in a, where h,i,j,k are integers." If m>1, at least one of the numbers b(m)=(a(m)-i)/h and c(m)=(a(m)-k)/j is in the set N of natural numbers. Let d(n) be the n-th b(m) in N, and let e(n) be the n-th c(m) in N. Note that a is a subsequence of both d and e.
Examples, where [A......] indicates a conjecture:
A190803: (h,i,j,k)=(2,-1,3,-1); d=A190841, e=A190842
A190804: (h,i,j,k)=(2,-1,3,0); d=[A190803], e=A190844
A190805: (h,i,j,k)=(2,-1,3,1); d=A190845, e=[A190808]
A190806: (h,i,j,k)=(2,-1,3,2); d=[A190804], e=A190848
...
A190807: (h,i,j,k)=(2,0,3,-1); d=A190849, e=A190850
A003586: (h,i,j,k)=(2,0,3,0); d=e=A003586
A190808: (h,i,j,k)=(2,0,3,1); d=A190851, e=A190852
A190809: (h,i,j,k)=(2,0,3,2); d=A190853, e=A190854
...
A190810: (h,i,j,k)=(2,1,3,-1); d=A190855, e=A190856
A190811: (h,i,j,k)=(2,1,3,0); d=A002977, e=A190857
A002977: (h,i,j,k)=(2,1,3,1); d=A190858, e=A190859
A190812: (h,i,j,k)=(2,1,3,2); d=A069353, e=[A190812]
...
For h=j=3, see A191106; for h=3 and j=4, see A191113.

Examples

			1 -> 2 -> 3,5 -> 8,9,14 -> 15,17,23,26,27,41 -> ...
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a190803 n = a190803_list !! (n-1)
    a190803_list = 1 : f (singleton 2)
       where f s = m : (f $ insert (2*m-1) $ insert (3*m-1) s')
                 where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Jun 01 2011
  • Mathematica
    h = 2; i = -1; j = 3; k = -1; f = 1; g = 10;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A190803 *)
    b = (a + 1)/2; c = (a + 1)/3; r = Range[1, 300];
    d = Intersection[b, r] (* A190841 *)
    e = Intersection[c, r] (* A190842 *)
    (* Regarding this program - useful for many choices of h,i,j,k,f,g - the depth g must be chosen with care - that is, large enough.  Assuming that h<=j, the least new terms in successive nests a are typically iterates of hx+i, starting from x=1.  If, for example, h=2 and i=0, the least terms are 2,4,8,...,2^g, so that g>=9 ensures inclusion of all the desired terms <=256. *)

Extensions

a(34)=225 inserted by Reinhard Zumkeller, Jun 01 2011

A147991 Sequence S such that 1 is in S and if x is in S, then 3x-1 and 3x+1 are in S.

Original entry on oeis.org

1, 2, 4, 5, 7, 11, 13, 14, 16, 20, 22, 32, 34, 38, 40, 41, 43, 47, 49, 59, 61, 65, 67, 95, 97, 101, 103, 113, 115, 119, 121, 122, 124, 128, 130, 140, 142, 146, 148, 176, 178, 182, 184, 194, 196, 200, 202, 284, 286, 290, 292, 302, 304, 308, 310, 338, 340, 344, 346
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2008

Keywords

Comments

Positive numbers that can be written in balanced ternary without a 0 trit. - J. Hufford, Jun 30 2015
Let S be the set of terms. Define c: Z -> P(R) so that c(m) is the translated Cantor ternary set spanning [m-0.5, m+0.5], and let C be the union of c(m) for all m in S U {0} U -S. C is the closure of the translated Cantor ternary set spanning [-0.5, 0.5] under multiplication by 3. - Peter Munn, Jan 31 2022

Examples

			0th generation: 1;
1st generation: 2 4;
2nd generation: 5 7 11 13.
		

Crossrefs

Cf. A006288, A351243 (non-quotients).
See also the related sequences listed in A191106.
One half of each position > 0 where A307744 sets or equals a record.
Cf. A030300.
Column k=3 of A360099.

Programs

  • Haskell
    import Data.Set (singleton, insert, deleteFindMin)
    a147991 n = a147991_list !! (n-1)
    a147991_list = f $ singleton 1 where
       f s = m : (f $ insert (3*m - 1) $ insert (3*m + 1) s')
             where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Feb 21 2012, Jan 23 2011
    
  • Maple
    A147991:= proc(n) option remember; if n::even then 3*procname(n/2)-1 else 3*procname((n-1)/2)+1 fi end proc:
    A147991(1):= 1:
    [seq](A147991(i),i=1..1000); # Robert Israel, May 05 2014
  • Mathematica
    nn=346; s={1}; While[s1=Select[Union[s, 3*s-1, 3*s+1], # <= nn &];  s != s1, s=s1]; s
    a[ n_] := If[ n < -1 || n > 0, 3 a[Quotient[n, 2]] - (-1)^Mod[n, 2], 0]; (* Michael Somos, Dec 22 2018 *)
  • PARI
    {a(n) = if( n<-1 || n>0, 3*a(n\2) - (-1)^(n%2), 0)}; /* Michael Somos, Dec 22 2018 */
    
  • PARI
    a(n) = fromdigits(apply(b->if(b,1,-1),binary(n)), 3); \\ Kevin Ryde, Feb 06 2022

Formula

a(n) = 3*a(n/2) - 1 if n>=2 is even, 3*a((n-1)/2) + 1 if n is odd, a(0)=0. - Robert Israel, May 05 2014
G.f. g(x) satisfies g(x) = 3*(x+1)*g(x^2) + x/(1+x). - Robert Israel, May 05 2014
Product_{j=0..n-1} cos(3^j) = 2^(-n+1)*Sum_{i=2^(n-1)..2^n-1} cos(a(i)). - Gevorg Hmayakyan, Jan 15 2017
Sum_{i=2^(n-1)..2^n-1} cos(a(i)/3^(n-1)*Pi/2) = 0. - Gevorg Hmayakyan, Jan 15 2017
a(n) = -a(-1-n) for all n in Z. - Michael Somos, Dec 22 2018
For n > 0, A307744(2*a(2n)) = A307744(2*a(2n+1)) = A307744(2*a(n)) + 1. - Peter Munn, Jan 31 2022
a(n) mod 2 = A030300(n). - Alois P. Heinz, Jan 29 2023

A191203 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x and 1+x^2 are in a.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 17, 20, 26, 32, 34, 40, 52, 64, 65, 68, 80, 101, 104, 128, 130, 136, 160, 202, 208, 256, 257, 260, 272, 290, 320, 401, 404, 416, 512, 514, 520, 544, 580, 640, 677, 802, 808, 832, 1024, 1025, 1028, 1040, 1088, 1157, 1160, 1280, 1354, 1601, 1604, 1616, 1664, 2048, 2050, 2056, 2080, 2176, 2314, 2320, 2560
Offset: 1

Views

Author

Clark Kimberling, May 29 2011

Keywords

Comments

The method generalizes: a finite set F={f} of functions f:N->N and finite set G of numbers generate a set S by these rules: (1) every element of G is in S, and (2) if x is in S then f(x) is in S for every f in F. The sequence a results by taking the numbers in S in increasing order.
Examples include A190803, A191106, A191113, and these:
A191203: 2x, 1+x^2
A191211: 1+2x, 1+x^2
A191281: 2x, x^2-x+1
A191282: 2x, x^2+x+1
A191283: 2x, x(x+1)/2
A191284: floor(3x/2), 2x
A191285: 3x, floor((x^2)/2)
A191286: 3x, 1+x^2
A191287: floor(3x/2), 3x
A191288: 2x, floor((x^2)/3)
A191289: 3x-1, x^2
A191290: 2x+1, x(x+1)/2
For A191203 and other such sequences, the depth g for the NestList in the Mathematica program must be large enough to generate as many terms as required by the user. For example, the rules 2x and 1+x^2, starting with x=1, successively generate set of numbers whose minima are powers of 2: 1->2->4-> ... 2^g -> ....

Examples

			1 -> 2 -> 4,5 -> 8,10,17,26 ->
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a191203 n = a191203_list !! (n-1)
    a191203_list = f $ singleton 1 where
       f s = m : f (insert (2 * m) $ insert (m ^ 2 + 1) s')
             where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Apr 18 2014
  • Mathematica
    g = 12; Union[Flatten[NestList[{2 #, 1 + #^2} &, 1, g]]]
    (*  A191203; use g>11 to get all terms up to 4096 *)

A088917 Central Delannoy numbers (mod 3); Characteristic function for Cantor set.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Benoit Cloitre, Nov 30 2003

Keywords

Comments

Also Apery numbers (mod 3).
More generally also (Sum_{k=0..n} binomial(n,k)^x*binomial(n+k,k)^y) (mod 3) for any x >= 1 in N and any odd y >= 1.
a(n) = 0 if the ternary expansion of n contains one or more 1-digits, otherwise 1. - Antti Karttunen, Aug 23 2019
Main diagonal of the Sierpinski carpet (A153490). - Paolo Xausa, May 19 2023

Crossrefs

Characteristic function of A005823, and with offset 1, characteristic function of A191106.

Programs

  • Mathematica
    Nest[ Flatten[# /. {0 -> {0, 0, 0}, 1 -> {1, 0, 1}}] &, {1}, 5] (* Or *)
    f[n_] := Mod[LegendreP[n, 3], 3]; Array[f, 111, 0] (* Or *)
    f[n_] := If[ FreeQ[ IntegerDigits[n, 3], 1], 1, 0]; Array[f, 111, 0] (* also from Mathematica v8.0 Mathematical Functions Help section for "IntegerDigits" "Cantor set construction:" *) (* Robert G. Wilson v, Jun 16 2011 *)
    Nest[Join[#, 0 #, #] &, {1}, 5] (* IWABUCHI Yu(u)ki, Sep 08 2012 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*binomial(n+k,k))%3
    
  • PARI
    A088917(n) = { while(n, if(n%3==1, return(0), n\=3)); (1); }; \\ Antti Karttunen, Aug 23 2019 (copied from A005823)
    
  • PARI
    A088917(n) = abs(factorback(apply(d -> d-1,digits(n,3)))); \\ Antti Karttunen, Aug 23 2019

Formula

a(A005823(n)) = 1; a(A081606(n)) = 0.
a(n) = A001850(n) - 3*floor(A001850(n)/3).
a(n) = 2 - A105220(n) = 1 - A316829(n). - Antti Karttunen and Jon Maiga, Aug 24 2019
G.f.: Product_{k>=0} (1 + x^(2*3^k)). - Ilya Gutkovskiy, Jun 05 2021

Extensions

Secondary name added by Antti Karttunen, Aug 23 2019

A191107 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x+1 are in a.

Original entry on oeis.org

1, 4, 10, 13, 28, 31, 37, 40, 82, 85, 91, 94, 109, 112, 118, 121, 244, 247, 253, 256, 271, 274, 280, 283, 325, 328, 334, 337, 352, 355, 361, 364, 730, 733, 739, 742, 757, 760, 766, 769, 811, 814, 820, 823, 838, 841, 847, 850, 973, 976, 982, 985, 1000, 1003, 1009, 1012, 1054, 1057, 1063, 1066, 1081, 1084, 1090, 1093, 2188
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

For general discussions, see A190803 and A191106.
Numbers whose base-3 representation ends in 1 and contains no 2; primitive members of A005836. - Peter Munn, Aug 14 2023

Crossrefs

Programs

  • Maple
    N:= 100000: # to get all terms <= N
    with(queue):
    Q:= new(1):
    A:= {}:
    while not empty(Q) do
      s:= dequeue(Q);
      A:= A union {s};
      for t in {3*s-2,3*s+1} minus A do
        if t <= N then enqueue(Q,t) fi
      od
    od:
    sort(convert(A,list)); # Robert Israel, Nov 29 2015
  • Mathematica
    h = 3; i = -2; j = 3; k = 1; f = 1;  g = 7;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A191107 *)
    b = (a + 2)/3; c = (a - 1)/3; r = Range[1, 900];
    d = Intersection[b, r] (* A003278 *)
    e = Intersection[c, r] (* A005836 *)

Formula

Conjecture: a(n) = 3*A003278(n) - 2 = (A055246(n) + 1)/2. - L. Edson Jeffery, Nov 25 2015
Conjecture: a(n) = A190640(n)/2. - Michel Marcus, Aug 24 2016
Conjecture: a(n) = A003278(2n-1). - Arie Bos, Aug 07 2022

A191108 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x+2 are in a.

Original entry on oeis.org

1, 5, 13, 17, 37, 41, 49, 53, 109, 113, 121, 125, 145, 149, 157, 161, 325, 329, 337, 341, 361, 365, 373, 377, 433, 437, 445, 449, 469, 473, 481, 485, 973, 977, 985, 989, 1009, 1013, 1021, 1025, 1081, 1085, 1093, 1097, 1117, 1121, 1129, 1133, 1297, 1301, 1309, 1313, 1333, 1337, 1345, 1349, 1405, 1409, 1417, 1421, 1441, 1445
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

See discussions at A190803, A191106. The sequence a=A191108 has closure properties: the positive integers in (2+A191108)/3 comprise A191108, as do those in (-2+A191108)/3.
From Peter Munn, May 13 2019: (Start)
The closure of {1} in the positive integers under reflection about 3^k, k >= 1.
Asymptotic density is 0.
Consider a Sierpinski arrowhead curve formed of edges numbered consecutively from 0 at its axis of symmetry. The m-th edge is contained in the boundary of the plane sector occupied by the arrowhead if and only if m or -m is in this sequence.
For k >= 0, a(2^k) = 2*3^k - 1 and {a(i)/(2*3^k) | 1 <= i <= 2^k} is the set of center points of surviving intervals at the k-th step of generating the Cantor set, and therefore the set of center points of deleted middle-third intervals at the (k+1)-th step.
Define t: Z -> P(R) so that t(n) is the translated Cantor ternary set spanning [(n-1)/2, (n+1)/2], and let T be the union of t(a(n)) for all n. T = T * 3 = T / 3 is the closure of the Cantor ternary set under multiplication by 3.
(End)

Crossrefs

Programs

  • Mathematica
    h = 3; i = -2; j = 3; k = 2; f = 1; g = 7;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A191108 *)
    b = (a + 2)/3; c = (a - 2)/3; r = Range[1, 900];
    d = Intersection[b, r] (* A191108 closure property  *)
    e = Intersection[c, r] (* A191108 closure property  *)
  • PARI
    a(n) = fromdigits(binary(n-1),3)<<2 + 1; \\ Kevin Ryde, Aug 05 2022

Formula

From Peter Munn, May 25 2019: (Start)
a(n) = (A055247(2n-1) + A055247(2n)) / 3.
a(n) = A306556(2n)*2 - 1 = A306556(2n-1) + A306556(2n).
a(n) = 2*A005823(n) + 1 = 4*A005836(n) + 1 = 2*A191106(n) - 1.
a(2^k+i) = 2*A147991(2^k+i-1) + 3^(k+1) for k >= 0, 1 <= i <= 2^k.
(End)

A153775 Sequence S such that 1 is in S and if x is in S, then 3x-1 and 3x are in S.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 14, 15, 17, 18, 23, 24, 26, 27, 41, 42, 44, 45, 50, 51, 53, 54, 68, 69, 71, 72, 77, 78, 80, 81, 122, 123, 125, 126, 131, 132, 134, 135, 149, 150, 152, 153, 158, 159, 161, 162, 203, 204, 206, 207, 212, 213, 215, 216, 230, 231, 233, 234, 239, 240, 242
Offset: 1

Views

Author

Clark Kimberling, Jan 02 2009

Keywords

Comments

Subsequences include A007051, A000244, A153773, A153774.
First generation: 1
2nd generation: 2, 3
3rd generation: 5, 6, 8, 9
4th generation: 14, 15, 17, 18, 23, 24, 26, 27
Does every generation contain a prime?
From Peter Munn, Feb 10 2022: (Start)
Consider a Sierpinski arrowhead curve formed of edges indexed consecutively from 0 at its axis of symmetry and aligned with an infinite Sierpinski gasket so that each edge is contained in the boundary of either the plane sector occupied by the gasket or a triangular region of the gasket's complement. The numbers {4*a(n)-1 : n >= 1} (that is, 3, 7, 11, 19, 23, 31, 35, 55, 59, ...) index the edges that are contained in the boundaries of certain triangular regions: each is the first region encountered of each successively larger size that does not lie across the axis of symmetry.
Let S be the set of terms. Define c: N -> P(R) so that c(m) is the scaled and translated Cantor ternary set spanning [m-0.5, m], and let C be the union of c(m) for all m in S. C is the closure under multiplication by 3 of the scaled and translated Cantor ternary set spanning [0.5, 1.0].
(End)
Positive numbers whose balanced ternary expansions contain exactly one digit 1. - Rémy Sigrist, May 08 2022

Crossrefs

See also the related sequences listed in A191106.

Programs

  • Mathematica
    nxt[n_] := Flatten[3 # + {-1, 0} & /@ n]; Union[Flatten[NestList[nxt,{1},5]]] (* G. C. Greubel, Aug 28 2016 *)

Formula

From Peter Munn, Feb 04 2022: (Start)
For k >= 0, 2^k <= n <= 2^(k+1)-1, a(n) = A005836(n+1) - (3^k-1)/2.
For n >= 1, A307744(4*a(2n)-1) = A307744(4*a(2n+1)-1) = A307744(4*a(n)-1) + 1.
(End)

A306556 Integers that appear as (unreduced) numerators of segment endpoints when a ternary Cantor set is created.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 18, 19, 20, 21, 24, 25, 26, 27, 54, 55, 56, 57, 60, 61, 62, 63, 72, 73, 74, 75, 78, 79, 80, 81, 162, 163, 164, 165, 168, 169, 170, 171, 180, 181, 182, 183, 186, 187, 188, 189, 216, 217, 218, 219, 222, 223, 224, 225, 234, 235, 236, 237, 240, 241, 242, 243
Offset: 1

Views

Author

Dan Dima, Feb 23 2019

Keywords

Comments

Nonnegative integers whose ternary representation contains only digits 0 and 2 except for at most a single digit 1 that is followed only by 0's.
Nonnegative integers that can be written in base 3 using only 0's and 2's, allowing the use of the "decimal" point (.) and replacing ....10..0(.) by ....02..2(.)2222...
Note that fractions are not reduced.
List of integers in the closure of the ternary Cantor set under multiplication by 3. The closure is the union of the translated ternary Cantor sets spanning [a(1), a(2)], [a(3), a(4)], [a(5), a(6)], ... . - Peter Munn, Jul 09 2019

Examples

			On 1st step we have [0,1/3] U [2/3,3/3] so we get a(1)=0, a(2)=1, a(3)=2, a(4)=3.
On 2nd step we have [0,1/9] U [2/9,3/9] U [6/9,7/9] U [8/9,9/9] so we get in addition a(5)=6, a(6)=7, a(7)=8, a(8)=9.
		

Crossrefs

Programs

  • PARI
    A306556(n) = {sm=0;while(n>1,ex=floor(log(n)/log(2));if(n-2^ex==0,sm=sm+3^(ex-1),sm=sm+2*3^(ex-1));n=n-2^ex);return(sm)}
    
  • PARI
    a(n) = n--; fromdigits(binary(n>>1),3)*2 + (n%2); \\ Kevin Ryde, Apr 23 2021

Formula

a(1)=0, a(2)=1;
a(2^n) = 3^(n-1) for n >= 1;
a(2^n+k) = 2*3^(n-1) + a(k) for 1 <= k <= 2^n.
From Peter Munn, Jul 09 2019: (Start)
a(2n-1) = A005823(n) = A191106(n)-1.
a(2n) = A191106(n) = A005823(n)+1.
a(2n-1) = (A055247(2n-1)-1)/3.
a(2n) = (A055247(2n) +1)/3.
a(2n-1) = (A191108(n)-1)/2.
a(2n) = (A191108(n)+1)/2.
(End)
Showing 1-10 of 14 results. Next