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

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

Original entry on oeis.org

1, 3, 7, 9, 19, 21, 25, 27, 55, 57, 61, 63, 73, 75, 79, 81, 163, 165, 169, 171, 181, 183, 187, 189, 217, 219, 223, 225, 235, 237, 241, 243, 487, 489, 493, 495, 505, 507, 511, 513, 541, 543, 547, 549, 559, 561, 565, 567, 649, 651, 655, 657, 667, 669, 673, 675, 703, 705, 709, 711, 721, 723, 727, 729, 1459, 1461, 1465, 1467, 1477
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

Related sequences for various choices of i and k as defined in A190803:
A003278: (i,k) = (-2,-1)
A191106: (i,k) = (-2, 0)
A191107: (i,k) = (-2, 1)
A191108: (i,k) = (-2, 2)
A153775: (i,k) = (-1, 0)
A147991: (i,k) = (-1, 1)
A191109: (i,k) = (-1, 2)
A005836: (i,k) = ( 0, 1)
A191110: (i,k) = ( 0, 2)
A132140: (i,k) = ( 1, 2)
For a=A191106, we have closure properties: the integers in (2+a)/3 comprise a; the integers in a/3 comprise a.
For k >= 1, m = a(i), 1 <= i <= 2^k seems to be m such that m/(3^k+1) is in the Cantor set (except that m = 0 and m = 3^k+1 do not appear). For k >= 2, m = (a(i)-1)/2, 1 <= i <= 2^k seems to be m such that m/((3^k-1)/2) is in the Cantor set. - Peter Munn, Jul 06 2019
Every even number is the sum of two (possibly equal) terms. More specifically: terms a(1) through a(2^n) = 3^n sum to even numbers 2 times 1 through 3^n. Every even number is infinitely often the difference of two terms. Since the sequence is equal to 2*A005836(n) + 1, these properties follow immediately from similar properties of A005836 for every number. - Aad Thoen, Feb 17 2022
if A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+2*3^n), similar to A003278. - Arie Bos, Jul 26 2022

Examples

			1 -> 3 -> 7,9 -> 19,21,25,27 -> ...
		

Crossrefs

Cf. A005823, A005836, A054591, A088917 (characteristic function), A173934, A190803, A191108.
Partial sums of A061393.
Similar formula as A003278, A_(n+1)=(A_n,A_n+2*3^n).

Programs

  • Mathematica
    h = 3; i = -2; j = 3; k = 0; f = 1; g = 9;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A191106; regarding g, see note at A190803 *)
    b = (a + 2)/3; c = a/3; r = Range[1, 900];
    d = Intersection[b, r](* illustrates closure property *)
    e = Intersection[c, r](* illustrates closure property *)
    2 FromDigits[#, 3]&/@Tuples[{0, 1}, 7] + 1 (* Vincenzo Librandi, Jul 10 2019 *)

Formula

a(n) = 2*A005836(n) + 1. - Charles R Greathouse IV, Sep 06 2011
a(n) = A005823(n) + 1. - Vladimir Shevelev, Dec 17 2012
a(n) = (A191108(n) + 1)/2. - Peter Munn, Jul 09 2019

A153773 a(2*n) = 3*a(2*n-1) - 1, a(2*n+1) = 3*a(2*n), with a(1)=1.

Original entry on oeis.org

1, 2, 6, 17, 51, 152, 456, 1367, 4101, 12302, 36906, 110717, 332151, 996452, 2989356, 8968067, 26904201, 80712602, 242137806, 726413417, 2179240251, 6537720752, 19613162256, 58839486767, 176518460301, 529555380902, 1588666142706, 4765998428117, 14297995284351
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2009

Keywords

Examples

			a(2) = 3*1 - 1 = 2.
a(3) = 3*a(2) = 6.
a(4) = 3*a(3) - 1 = 17.
		

Crossrefs

Programs

  • Magma
    I:=[1,2,6]; [n le 3 select I[n] else 3*Self(n-1)+Self(n-2)-3*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Aug 28 2016
    
  • Mathematica
    Table[(5*3^n + 6 - 3*(-1)^n)/24 , {n,1,25}] (* or *) LinearRecurrence[{3, 1, -3}, {1, 2, 6}, 25] (* G. C. Greubel, Aug 27 2016 *)
    RecurrenceTable[{a[1] == 1, a[2] == 2, a[3] == 6, a[n] == 3 a[n-1] + a[n-2] - 3 a[n-3]}, a, {n, 30}] (* Vincenzo Librandi, Aug 28 2016 *)
  • PARI
    a(n) = (3^n*5)\/24 \\ Charles R Greathouse IV, Aug 28 2016

Formula

From R. J. Mathar, Oct 05 2009: (Start)
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).
G.f.: x*(-1 + x + x^2)/((1-x) * (3*x-1) * (1+x)).
a(n) = (5*3^n + 6 - 3*(-1)^n)/24. (End)
E.g.f.: (1/24)*(-3*exp(-x) - 8 + 6*exp(x) + 5*exp(3*x)). - G. C. Greubel, Aug 27 2016

A353830 The positions of nonzero digits in the balanced ternary expansions of n and a(n) are the same, and the k-th rightmost nonzero digit in a(n) equals the product of the k rightmost nonzero digits in n.

Original entry on oeis.org

0, 1, -4, 3, 4, 11, -12, -11, -10, 9, 10, -13, 12, 13, -34, 33, 34, 35, -36, -35, 32, -33, -32, 29, -30, -29, -28, 27, 28, -31, 30, 31, 38, -39, -38, -37, 36, 37, -40, 39, 40, 101, -102, -101, -100, 99, 100, -103, 102, 103, -106, 105, 106, 107, -108, -107, 104
Offset: 0

Views

Author

Rémy Sigrist, May 08 2022

Keywords

Comments

This sequence can naturally be extended to negative integers; we then obtain a permutation of the integers (Z).
A number is a fixed point of this sequence iff it has no digit -1 in its balanced ternary expansion (A005836).

Examples

			The first terms, in decimal and in balanced ternary, are:
  n   a(n)  bter(n)  bter(a(n))
  --  ----  -------  ----------
   0     0        0           0
   1     1        1           1
   2    -4       1T          TT
   3     3       10          10
   4     4       11          11
   5    11      1TT         11T
   6   -12      1T0         TT0
   7   -11      1T1         TT1
   8   -10      10T         T0T
   9     9      100         100
  10    10      101         101
  11   -13      11T         TTT
  12    12      110         110
		

Crossrefs

See A305458, A353824, A353826, A353828 for similar sequences.
Cf. A005836 (fixed points), A029858, A153775.

Programs

  • PARI
    a(n) = {
            my (d=[], t, p=1);
            while (n, d=concat(t=[0,1,-1][1+n%3], d); n=(n-t)/3);
            forstep (k=#d, 1, -1, if (d[k], d[k]=p*=d[k]));
            fromdigits(d,3);
    }

Formula

a(3*n) = 3*a(n).
a(3*n + 1) = 3*a(n) + 1.
Sum_{k = 0..n} a(n) = 0 iff n belongs to A029858.

A153774 a(2*n) = 3*a(2*n-1), a(2*n+1) = 3*a(2*n) - 1, with a(1) = 1.

Original entry on oeis.org

1, 3, 8, 24, 71, 213, 638, 1914, 5741, 17223, 51668, 155004, 465011, 1395033, 4185098, 12555294, 37665881, 112997643, 338992928, 1016978784, 3050936351, 9152809053, 27458427158, 82375281474, 247125844421, 741377533263, 2224132599788, 6672397799364, 20017193398091
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2009

Keywords

Comments

Let A be the Hessenberg matrix of order n, defined by: A[1,j] = 1, A[i,i] := 11, (i>1), A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n>=1, a(2n-1)=(-1)^(n-1)*charpoly(A,2). - Milan Janjic, Feb 21 2010

Examples

			a(2) = 3*1 = 3.
a(3) = 3*a(2)-1 = 8.
a(4) = 3*a(3) = 24.
		

Crossrefs

Programs

  • Magma
    I:=[1,3,8]; [n le 3 select I[n] else 3*Self(n-1) + Self(n-2) - 3*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Aug 28 2016
    
  • Maple
    A153774 := proc(n) 1/4+(-1)^n/8+7*3^(n-1)/8 ; end proc: seq(A153774(n),n=1..80) ; # R. J. Mathar, Mar 13 2010
  • Mathematica
    LinearRecurrence[{3,1,-3},{1,3,8},30] (* or *) Rest[ CoefficientList[ Series[x (-1+2x^2)/((1-x)(3x-1)(1+x)),{x,0,30}],x]] (* Harvey P. Dale, Jun 08 2011 *)
    RecurrenceTable[{a[1] == 1, a[2] == 3, a[3] == 8, a[n] == 3 a[n-1] + a[n-2] - 3 a[n-3]}, a, {n, 30}] (* Vincenzo Librandi, Aug 28 2016 *)
  • PARI
    a(n)=(3^(n-1)*7)\/8 \\ Charles R Greathouse IV, Aug 28 2016

Formula

From R. J. Mathar, Mar 13 2010: (Start)
a(n) = (7*3^(n - 1) + 2 + (-1)^n)/8.
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).
G.f.: x*(-1 + 2*x^2)/ ((1-x) * (3*x-1) * (1+x)). (End)
E.g.f.: (1/24)*(3*exp(-x) - 16 + 6*exp(x) + 7*exp(3*x)). - G. C. Greubel, Aug 27 2016

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

Original entry on oeis.org

1, 2, 4, 7, 9, 17, 19, 32, 34, 42, 44, 82, 84, 92, 94, 157, 159, 167, 169, 207, 209, 217, 219, 407, 409, 417, 419, 457, 459, 467, 469, 782, 784, 792, 794, 832, 834, 842, 844, 1032, 1034, 1042, 1044, 1082, 1084, 1092, 1094, 2032, 2034, 2042, 2044, 2082, 2084
Offset: 1

Views

Author

Clark Kimberling, Jan 02 2009

Keywords

Comments

Subsequences include A047850, A083065.
First generation: 1
2nd generation: 2, 4
3rd generation: 7, 9, 17, 19
4th generation: 32, 34, 42, 44, 82, 84, 92, 94
Does every generation contain p or 2p for some prime p?

Crossrefs

Programs

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

A191109 a(1)=1, and if x is a term then 3x-1 and 3x+2 are terms too.

Original entry on oeis.org

1, 2, 5, 8, 14, 17, 23, 26, 41, 44, 50, 53, 68, 71, 77, 80, 122, 125, 131, 134, 149, 152, 158, 161, 203, 206, 212, 215, 230, 233, 239, 242, 365, 368, 374, 377, 392, 395, 401, 404, 446, 449, 455, 458, 473, 476, 482, 485, 608, 611, 617, 620, 635, 638, 644, 647, 689, 692, 698, 701, 716, 719, 725, 728, 1094, 1097, 1103, 1106, 1121
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

See discussions at A190803, A191106.
The positive integers in (1+A191109)/3 comprise A153775, a proper subsequence of A191109.
The positive integers in (-2+A191109)/3 comprise A032924, a proper subsequence of A191109.

Crossrefs

Programs

  • Mathematica
    h = 3; i = -1; j = 3; k = 2; f = 1;  g = 7;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* 191109 *)
    b = (a + 1)/3; c = (a - 2)/3; r = Range[1, 900];
    d = Intersection[b, r] (* A153775 *)
    e = Intersection[c, r] (* A032924 *)
    Nest[Flatten[{#,3#-1,3#+2}]&,1,10]//Union (* Harvey P. Dale, Apr 05 2020 *)

Extensions

Name edited by Michel Marcus, Jul 29 2021

A337132 a(n) is the number of squares at distance n from the central square of a Vicsek fractal.

Original entry on oeis.org

1, 4, 4, 4, 12, 4, 4, 12, 4, 4, 12, 12, 12, 36, 4, 4, 12, 4, 4, 12, 12, 12, 36, 4, 4, 12, 4, 4, 12, 12, 12, 36, 12, 12, 36, 12, 12, 36, 36, 36, 108, 4, 4, 12, 4, 4, 12, 12, 12, 36, 4, 4, 12, 4, 4, 12, 12, 12, 36, 12, 12, 36, 12, 12, 36, 36, 36, 108, 4, 4, 12
Offset: 0

Views

Author

Rémy Sigrist, Nov 21 2020

Keywords

Comments

For symmetry reasons, a(n) is a multiple of 4 for any n > 0.

Crossrefs

See A337018 for similar sequences.
Cf. A153775.

Programs

  • PARI
    See Links section.

Formula

a(n) = 4 iff n belongs to A153775.
Showing 1-7 of 7 results.