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

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

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)

A360099 To get A(n,k), replace 0's in the binary expansion of n with (-1) and interpret the result in base k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, -1, 0, 1, 0, 1, 0, 1, 1, 2, -1, 0, 1, 2, 3, -1, 1, 0, 1, 3, 4, 1, 1, -1, 0, 1, 4, 5, 5, 3, 1, 1, 0, 1, 5, 6, 11, 7, 5, 3, -1, 0, 1, 6, 7, 19, 13, 11, 7, -2, 1, 0, 1, 7, 8, 29, 21, 19, 13, 1, 0, -1, 0, 1, 8, 9, 41, 31, 29, 21, 14, 3, 0, 1, 0, 1, 9, 10, 55, 43, 41, 31, 43, 16, 5, 2, -1
Offset: 0

Views

Author

Alois P. Heinz, Jan 25 2023

Keywords

Comments

The empty bit string is used as binary expansion of 0, so A(0,k) = 0.

Examples

			Square array A(n,k) begins:
   0,  0, 0,  0,  0,   0,   0,   0,   0,   0,   0, ...
   1,  1, 1,  1,  1,   1,   1,   1,   1,   1,   1, ...
  -1,  0, 1,  2,  3,   4,   5,   6,   7,   8,   9, ...
   1,  2, 3,  4,  5,   6,   7,   8,   9,  10,  11, ...
  -1, -1, 1,  5, 11,  19,  29,  41,  55,  71,  89, ...
   1,  1, 3,  7, 13,  21,  31,  43,  57,  73,  91, ...
  -1,  1, 5, 11, 19,  29,  41,  55,  71,  89, 109, ...
   1,  3, 7, 13, 21,  31,  43,  57,  73,  91, 111, ...
  -1, -2, 1, 14, 43,  94, 173, 286, 439, 638, 889, ...
   1,  0, 3, 16, 45,  96, 175, 288, 441, 640, 891, ...
  -1,  0, 5, 20, 51, 104, 185, 300, 455, 656, 909, ...
		

Crossrefs

Columns k=0-6, 10 give: A062157, A145037, A006257, A147991, A147992, A153777, A147993, A359925.
Rows n=0-10 give: A000004, A000012, A023443, A000027(k+1), A165900, A002061, A165900(k+1), A002061(k+1), A083074, A152618, A062158.
Main diagonal gives A360096.

Programs

  • Maple
    A:= proc(n, k) option remember; local m;
         `if`(n=0, 0, k*A(iquo(n, 2, 'm'), k)+2*m-1)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= (n, k)-> (l-> add((2*l[i]-1)*k^(i-1), i=1..nops(l)))(Bits[Split](n)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);

Formula

G.f. for column k satisfies g_k(x) = k*(x+1)*g_k(x^2) + x/(1+x).
A(n,k) = k*A(floor(n/2),k)+2*(n mod 2)-1 for n>0, A(0,k)=0.
A(n,k) mod 2 = A057427(n) if k is even.
A(n,k) mod 2 = A030300(n) if k is odd and n>=1.
A(2^(n+1),1) + n = 0.

A147985 Coefficients of numerator polynomials S(n,x) associated with reciprocation.

Original entry on oeis.org

1, 0, 1, 0, -1, 1, 0, -3, 0, 1, 1, 0, -7, 0, 13, 0, -7, 0, 1, 1, 0, -15, 0, 83, 0, -220, 0, 303, 0, -220, 0, 83, 0, -15, 0, 1, 1, 0, -31, 0, 413, 0, -3141, 0, 15261, 0, -50187, 0, 115410, 0, -189036, 0, 222621, 0, -189036, 0, 115410, 0, -50187, 0, 15261, 0, -3141, 0, 413, 0
Offset: 1

Views

Author

Clark Kimberling, Nov 24 2008

Keywords

Comments

1. S(n)=U(n-1)V(n-1) where U(n-1)=S(n-1)+S(1)*S(2)*...*S(n-2) and V(n-1)=S(n-1)-S(1)*S(2)*...*S(n-2), for n>=2. If U(n) and V(n) are written as polynomials U(n,x) and V(n,x), then V(n,x)=U(n,-x). See A147989 for coefficients of U(n).
2. S(n)=S(n-1)^2+S(n-1)*S(n-2)^2-S(n-2)^4 for n>2. (The Gorskov-Wirsting polynomials also have this recurrence; see H. L. Montgomery, Ten Lectures on the Interface between Analytic Number Theory and Harmonic Analysis, CBMS Regional Conference Series in Mathematics, 84, AMS, pp. 183-190.)
3. For n>0, the 2^(n-1) zeros of S(n) are real. If r is a zero of S(n), then -r and 1/r are zeros of S(n).
4. If r is a zero of S(n), then the numbers z satisfying r=z-1/z and r=z+1/z are zeros of S(n+1).
5. If n>2, then S(n,1)=1 and S(n,2)=A127814(n).
6. S(n,2^(1/2))=-1 for n>2 and S(n,2^(-1/2))=-2^(1-n) for n>1.

Examples

			S(1)=x
S(2)=x^2-1=(x-1)(x+1)
S(3)=x^4-3*x^2+1=(x^2+x-1)(x^2-x-1)
S(4)=x^8-7*x^6+13*x^4-7*x^2+1=(x^4+x^3-3*x^2-x+1)(x^4-x^3-3*x^2+x+1),
so that, as an array, sequence begins with
1 0
1 0 -1
1 0 -3 0 1
1 0 -7 0 13 0 -7 0 1
		

Crossrefs

Programs

  • Mathematica
    s[1] = x; t[1] = 1; s[n_] := s[n] = s[n-1]^2 - t[n-1]^2; t[n_] := t[n] = s[n-1]*t[n-1]; row[n_] := CoefficientList[s[n], x] // Reverse; Table[row[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Apr 22 2013 *)

Formula

The basic idea is to iterate the reciprocation-difference mapping x/y -> x/y-y/x.
Let x be an indeterminate, S(1)=x, T(1)=1 and for n>1, define S(n)=S(n-1)^2-T(n-1)^2 and T(n)=S(n-1)*T(n-1), so that S(n)/T(n)=S(n-1)/T(n-1)-T(n-1)/S(n-1).

A147986 Coefficients of denominator polynomials T(n,x) associated with reciprocation.

Original entry on oeis.org

1, 1, 0, 1, 0, -1, 0, 1, 0, -4, 0, 4, 0, -1, 0, 1, 0, -11, 0, 45, 0, -88, 0, 88, 0, -45, 0, 11, 0, -1, 0, 1, 0, -26, 0, 293, 0, -1896, 0, 7866, 0, -22122, 0, 43488, 0, -60753, 0, 60753, 0, -43488, 0, 22122, 0, -7866, 0, 1896, 0, -293, 0, 26, 0, -1, 0, 1, 0, -57, 0, 1512, 0
Offset: 1

Views

Author

Clark Kimberling, Nov 24 2008

Keywords

Comments

T(n)=S(1)*S(2)*...*S(n-1). The degree of S(n) in x is m=2^(n-1), so that the degree of T(n) is m-1. Write the zeros of T(n) as r(1)

Examples

			T(1) = 1
T(2) = x
T(3) = x^3-x
T(4) = x^7-4*x^5+4*x^3-x
so that, as an array, the sequence begins with:
1
1 0
1 0 -1 0
1 0 -4 0 4 0 -1 0
		

Programs

  • Mathematica
    s[1] = x; t[1] = 1; s[n_] := s[n] = s[n-1]^2 - t[n-1]^2; t[n_] := t[n] = s[n-1]*t[n-1]; row[n_] := CoefficientList[t[n], x] // Reverse; Table[row[n], {n, 7}] // Flatten (* Jean-François Alcover, Apr 22 2013 *)

Formula

The basic idea is to iterate the reciprocation-difference mapping x/y -> x/y-y/x.
Let x be an indeterminate, S(1)=x, T(1)=1 and for n>1, define S(n)=S(n-1)^2-T(n-1)^2 and T(n)=S(n-1)*T(n-1), so that S(n)/T(n)=S(n-1)/T(n-1)-T(n-1)/S(n-1).

A147989 Coefficients of factor polynomials U(n,x) associated with reciprocation.

Original entry on oeis.org

1, 1, -1, 1, 1, -3, -1, 1, 1, 1, -7, -4, 13, 4, -7, -1, 1, 1, 1, -15, -11, 83, 45, -220, -88, 303, 88, -220, -45, 83, 11, -15, -1, 1, 1, 1, -31, -26, 413, 293, -3141, -1896, 15261, 7866, -50187, -22122, 115410, 43488, -189036, -60753, 222621, 60753, -189036
Offset: 1

Author

Clark Kimberling, Nov 25 2008

Keywords

Comments

The zeros of U(n,x) and U(n,-x) are the zeros of S(n,x) at A147985.

Examples

			U(3) = x^2+x-1;
U(4) = x^4+x^3-3*x^2-x+1;
U(5) = x^8+x^7-7*x^6-4*x^5+13*x^4+4*x^3-7*x^2-x+1;
so that, as an array, the sequence begins with:
1 1 -1
1 1 -3 -1 1
1 1 -7 -4 13 4 -7 -1 1
		

Programs

  • Maple
    U[3]:= x^2+x-1:
    U[4]:= x^4+x^3-3*x^2-x+1:
    for n from 5 to 10 do
      U[n]:= normal(U[n-1]*M(U[n-1]) + x*(x^2-1)*mul(U[i]*M(U[i]),i=3..n-2));
    od:
    seq(seq(coeff(U[m],x,j),j=degree(U[m])..0,-1),m=3..10); # Robert Israel, Jun 30 2015
  • Mathematica
    U[3, x_] = x^2 + x - 1;
    U[4, x_] = x^4 + x^3 - 3 x^2 - x + 1;
    U[n_, x_] := U[n, x] = U[n-1, x] U[n-1, -x] + x (x^2 - 1) Product[U[k, x] U[k, -x], {k, 3, n-2}];
    Table[CoefficientList[U[n, x], x] // Reverse, {n, 3, 7}] // Flatten (* Jean-François Alcover, Mar 25 2019 *)

Formula

For n>=5, U(n)=U(n,x)=U(n-1,x)*U(n-1,-x)+x*(x^2-1)*U(3,x)*U(3,-x)*U(4,x)*U(4,-x)*...*U(n-2,x)*U(n-2,-x), where U(3)=x^2+x-1, U(4)=x^4+x^3-3*x^2-x+1.

A147990 Array A147985 (Polynomial coefficients) with zeros deleted.

Original entry on oeis.org

1, 1, -1, 1, -3, 1, 1, -7, 13, -7, 1, 1, -15, 83, -220, 303, -220, 83, -15, 1, 1, -31, 413, -3141, 15261, -50187, 115410, -189036, 222621, -189036, 115410, -50187, 15261, -3141, 413, -31, 1, 1, -63, 1839, -33150, 414861, -3841195, 27378213, -154299168
Offset: 1

Author

Clark Kimberling, Nov 25 2008

Keywords

Examples

			s(1)=x
s(2)=S(2,y)=x-1
s(3)=S(3,y)=x^2-3*x+1
s(4)=S(4,y)=x^4-7*x^3+13*x^2-7*x+1
so that as an array A147990 begins with
1
1 -1
1 -3 1
1 -7 13 -7 1
		

Formula

Let s(1)=x and for n>=2, let s(n)=s(n,x)=S(n,y), where y=x^(1/2) and S(n,x)
is as at A147985. Then A147990 gives the coefficients of the polynomials s(n).

A147987 Coefficients of numerator polynomials P(n,x) associated with reciprocation.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 1, 0, 7, 0, 13, 0, 7, 0, 1, 1, 0, 15, 0, 83, 0, 220, 0, 303, 0, 220, 0, 83, 0, 15, 0, 1, 1, 0, 31, 0, 413, 0, 3141, 0, 15261, 0, 50187, 0, 115410, 0, 189036, 0, 222621, 0, 189036, 0, 115410, 0, 50187, 0, 15261, 0, 3141, 0, 413, 0, 31, 0, 1, 1, 0, 63
Offset: 1

Author

Clark Kimberling, Nov 24 2008

Keywords

Comments

1. P(n,1)=A073833(n) for n>=1; P(n,2)=A073833(n+1) for n>=0.
2. P(n)=P(n-1)^2+P(n-1)*P(n-2)^2-P(n-2)^4 for n>=3.
3. For n>=3, P(n)=P(n,x)=S(n,i*x), where S(n) is the polynomial at A147985.
Thus all the zeros of P(n,x), for n>=2, are nonreal.

Examples

			P(1) = x
P(2) = x^2+1
P(3) = x^4+3*x^2+1
P(4) = x^8+7*x^6+13*x^4+7x^2+1
so that, as an array, the sequence begins with:
1 0
1 0 1
1 0 3 0 1
1 0 7 0 13 0 7 0 1
		

Programs

  • Mathematica
    p[1] = x; q[1] = 1; p[n_] := p[n] = p[n-1]^2 + q[n-1]^2; q[n_] := q[n] = p[n-1]*q[n-1]; row[n_] := CoefficientList[p[n], x] // Reverse; Table[row[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Apr 22 2013 *)

Formula

The basic idea is to iterate the reciprocation-sum mapping x/y -> x/y+y/x.
Let x be an indeterminate, P(1)=x, Q(1)=1 and for n>1, define P(n)=P(n-1)^2+Q(n-1)^2 and Q(n)=P(n-1)*Q(n-1), so that P(n)/Q(n)=P(n-1)/Q(n-1)-Q(n-1)/P(n-1).

A147988 Coefficients of denominator polynomials Q(n,x) associated with reciprocation.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 0, 1, 0, 4, 0, 4, 0, 1, 0, 1, 0, 11, 0, 45, 0, 88, 0, 88, 0, 45, 0, 11, 0, 1, 0, 1, 0, 26, 0, 293, 0, 1896, 0, 7866, 0, 22122, 0, 43488, 0, 60753, 0, 60753, 0, 43488, 0, 22122, 0, 7866, 0, 1896, 0, 293, 0, 26, 0, 1, 0, 1, 0, 57, 0, 1512, 0, 24858, 0, 284578, 0
Offset: 1

Author

Clark Kimberling, Nov 24 2008

Keywords

Comments

1. Q(n,1)=A073834(n) for n>=1.
2. For n>=3, Q(n)=Q(n,x)=i*T(n,i*x), where T(n) is the polynomial at A147986.
Thus all the zeros of Q(n,x), for n>=2, are nonreal.

Examples

			Q(1) = 1
Q(2) = x
Q(3) = x^3+x
Q(4) = x^7+4*x^5+4*x^3+1
so that, as an array, the sequence begins with:
1
1 0
1 0 1 0
1 0 4 0 4 0 1
		

Formula

The basic idea is to iterate the reciprocation-sum mapping x/y -> x/y+y/x.
Let x be an indeterminate, P(1)=x, Q(1)=1 and for n>1, define P(n)=P(n-1)^2+Q(n-1)^2 and Q(n)=P(n-1)*Q(n-1), so that P(n)/Q(n)=P(n-1)/Q(n-1)-Q(n-1)/P(n-1).

A343230 A binary encoding of the digits "0" in balanced ternary representation of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 0, 2, 3, 2, 0, 1, 0, 0, 1, 0, 2, 3, 2, 0, 1, 0, 4, 5, 4, 6, 7, 6, 4, 5, 4, 0, 1, 0, 2, 3, 2, 0, 1, 0, 0, 1, 0, 2, 3, 2, 0, 1, 0, 4, 5, 4, 6, 7, 6, 4, 5, 4, 0, 1, 0, 2, 3, 2, 0, 1, 0, 8, 9, 8, 10, 11, 10, 8, 9, 8, 12, 13, 12, 14, 15, 14, 12
Offset: 0

Author

Rémy Sigrist, Apr 08 2021

Keywords

Comments

The ones in the binary representation of a(n) correspond to the nonleading digits "0" in the balanced ternary representation of n.
We can extend this sequence to negative indices: a(-n) = a(n) for any n >= 0.

Examples

			The first terms, alongside the balanced ternary representation of n (with "T" instead of digits "-1") and the binary representation of a(n), are:
  n   a(n)  ter(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      1T          0
   3     1      10          1
   4     0      11          0
   5     0     1TT          0
   6     1     1T0          1
   7     0     1T1          0
   8     2     10T         10
   9     3     100         11
  10     2     101         10
  11     0     11T          0
  12     1     110          1
  13     0     111          0
  14     0    1TTT          0
  15     1    1TT0          1
		

Crossrefs

Cf. A059095, A140267, A291770, A343228, A343229, A343231, A147991 (indices of 0's).

Programs

  • PARI
    a(n) = { my (v=0, b=1, t); while (n, t=centerlift(Mod(n, 3)); if (t==0, v+=b); n=(n-t)\3; b*=2); v }
Showing 1-10 of 14 results. Next