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

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)

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

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

Original entry on oeis.org

1, 4, 6, 19, 21, 29, 31, 94, 96, 104, 106, 144, 146, 154, 156, 469, 471, 479, 481, 519, 521, 529, 531, 719, 721, 729, 731, 769, 771, 779, 781, 2344, 2346, 2354, 2356, 2394, 2396, 2404, 2406, 2594, 2596, 2604, 2606, 2644, 2646, 2654, 2656, 3594, 3596, 3604
Offset: 1

Views

Author

Clark Kimberling, Jan 02 2009

Keywords

Comments

Subsequences include A003463, A083065.
1st generation: 1
2nd generation: 4, 6
3rd generation: 19, 21, 29, 31
4th generation: 94, 96, 104, 106, 144, 146, 154, 156
Does every generation contain p or 2p for some prime p?

Crossrefs

Column k=5 of A360099.

Programs

  • Mathematica
    nxt[n_]:=Flatten[5#+{1,-1}&/@n]; Union[Flatten[NestList[nxt,{1},5]]] (* Harvey P. Dale, Dec 25 2012 *)

Formula

Product_{j=0..n-1} cos(5^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)/5^(n-1)*Pi/2) = 0. - Gevorg Hmayakyan, Jan 15 2017
a(n) mod 2 = A030300(n). - Alois P. Heinz, Jan 29 2023

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 *)

A371275 a(n) is the number of runs in the balanced ternary expansion of n.

Original entry on oeis.org

0, 1, 2, 2, 1, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 3, 3, 4, 3, 4, 4, 4, 3, 3, 4, 4, 3, 2, 3, 4, 4, 3, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 5, 5, 4, 3, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 4, 3, 3, 4, 4, 5, 4, 5, 5, 5, 4, 3, 4, 4, 3, 2, 3, 4, 4, 3, 4
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2024

Keywords

Comments

Leading zeros are ignored.
Every positive integers occurs infinitely many times.

Examples

			The first terms, alongside the balanced ternary expansion of n, are:
  n    a(n)  bter(n)
  ---  ----  -------
    0     0        0
    1     1        1
    2     2       1T
    3     2       10
    4     1       11
    5     2      1TT
    6     3      1T0
    7     3      1T1
    8     3      10T
    9     2      100
   10     3      101
   11     2      11T
   12     2      110
   13     1      111
   14     2     1TTT
   15     3     1TT0
		

Crossrefs

Programs

  • PARI
    a(n) = { my (r = 0, d); while (n, r++; d = centerlift(Mod(n, 3)); while (d==centerlift(Mod(n, 3)), n = (n-d)/3;);); return (r); }

Formula

a(n) <= A134021(n).
a(A153773(k)) = k for any k > 0.
Showing 1-5 of 5 results.