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.

A038754 a(2n) = 3^n, a(2n+1) = 2*3^n.

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Comments

In general, for the recurrence a(n) = a(n-1)*a(n-2)/a(n-3), all terms are integers iff a(0) divides a(2) and first three terms are positive integers, since a(2n+k) = a(k)*(a(2)/a(0))^n for all nonnegative integers n and k.
Equals eigensequence of triangle A070909; (1, 1, 2, 3, 6, 9, 18, ...) shifts to the left with multiplication by triangle A070909. - Gary W. Adamson, May 15 2010
The a(n) represent all paths of length (n+1), n >= 0, starting at the initial node on the path graph P_5, see the second Maple program. - Johannes W. Meijer, May 29 2010
a(n) is the difference between numbers of multiple of 3 evil (A001969) and odious (A000069) numbers in interval [0, 2^(n+1)). - Vladimir Shevelev, May 16 2012
A "half-geometric progression": to obtain a term (beginning with the third one) we multiply the before previous one by 3. - Vladimir Shevelev, May 21 2012
Pisano periods: 1, 2, 1, 4, 8, 2, 12, 4, 1, 8, 10, 4, 6, 12, 8, 8, 32, 2, 36, 8, ... . - R. J. Mathar, Aug 10 2012
Numbers k such that the k-th cyclotomic polynomial has a root mod 3. - Eric M. Schmidt, Jul 31 2013
Range of row n of the circular Pascal array of order 6. - Shaun V. Ault, Jun 05 2014
Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 1. - Sean A. Irvine, Jun 03 2025

Examples

			In the interval [0,2^5) we have 11 multiples of 3 numbers, from which 10 are evil and only one (21) is odious. Thus a(4) = 10 - 1 = 9. - _Vladimir Shevelev_, May 16 2012
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a038754 n = a038754_list !! n
    a038754_list = concat $ transpose [a000244_list, a008776_list]
    -- Reinhard Zumkeller, Oct 19 2015
    
  • Magma
    [n le 2 select n else 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 18 2016
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=3*a[n-2]+2 od: seq(a[n]+1, n=0..34); # Zerinvary Lajos, Mar 20 2008
    with(GraphTheory): P:=5: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=35; for n from 1 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P) od: seq(a(n),n=1..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    LinearRecurrence[{0,3},{1,2},40] (* Harvey P. Dale, Jan 26 2014 *)
    CoefficientList[Series[(1+2x)/(1-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 18 2016 *)
    Module[{nn=20,c},c=3^Range[0,nn];Riffle[c,2c]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    a(n)=(1/6)*(5-(-1)^n)*3^floor(n/2)
    
  • PARI
    a(n)=3^(n>>1)<
    				
  • SageMath
    [2^(n%2)*3^((n-(n%2))/2) for n in range(61)] # G. C. Greubel, Oct 10 2022

Formula

a(n) = a(n-1)*a(n-2)/a(n-3) with a(0)=1, a(1)=2, a(2)=3.
a(2*n) = (3/2)*a(2*n-1) = 3^n, a(2*n+1) = 2*a(2*n) = 2*3^n.
From Benoit Cloitre, Apr 27 2003: (Start)
a(1)=1, a(n)= 2*a(n-1) if a(n-1) is odd, or a(n)= (3/2)*a(n-1) if a(n-1) is even.
a(n) = (1/6)*(5-(-1)^n)*3^floor(n/2).
a(2*n) = a(2*n-1) + a(2*n-2) + a(2*n-3).
a(2*n+1) = a(2*n) + a(2*n-1). (End)
G.f.: (1+2*x)/(1-3*x^2). - Paul Barry, Aug 25 2003
From Reinhard Zumkeller, Sep 11 2003: (Start)
a(n) = (1 + n mod 2) * 3^floor(n/2).
a(n) = A087503(n) - A087503(n-1). (End)
a(n) = sqrt(3)*(2+sqrt(3))*(sqrt(3))^n/6 - sqrt(3)*(2-sqrt(3))*(-sqrt(3))^n/6. - Paul Barry, Sep 16 2003
From Reinhard Zumkeller, May 26 2008: (Start)
a(n) = A140740(n+2,2).
a(n+1) = a(n) + a(n - n mod 2). (End)
If p(i) = Fibonacci(i-3) and if A is the Hessenberg matrix of order n defined by A(i,j) = p(j-i+1), (i<=j), A(i,j)=-1, (i=j+1), and A(i,j)=0 otherwise. Then, for n>=1, a(n-1) = (-1)^n det A. - Milan Janjic, May 08 2010
a(n) = A182751(n) for n >= 2. - Jaroslav Krizek, Nov 27 2010
a(n) = Sum_{i=0..2^(n+1), i==0 (mod 3)} (-1)^A000120(i). - Vladimir Shevelev, May 16 2012
a(0)=1, a(1)=2, for n>=3, a(n)=3*a(n-2). - Vladimir Shevelev, May 21 2012
Sum_(n>=0) 1/a(n) = 9/4. - Alexander R. Povolotsky, Aug 24 2012
a(n) = sqrt(3*a(n-1)^2 + (-3)^(n-1)). - Richard R. Forberg, Sep 04 2013
a(n) = 2^((1-(-1)^n)/2)*3^((2*n-1+(-1)^n)/4). - Luce ETIENNE, Aug 11 2014
From Reinhard Zumkeller, Oct 19 2015: (Start)
a(2*n) = A000244(n), a(2*n+1) = A008776(n).
For n > 0: a(n+1) = a(n) + if a(n) odd then min{a(n), a(n-1)} else max{a(n), a(n-1)}, see also A128588. (End)
E.g.f.: (7*cosh(sqrt(3)*x) + 4*sqrt(3)*sinh(sqrt(3)*x) - 4)/3. - Stefano Spezia, Feb 17 2022
Sum_{n>=0} (-1)^n/a(n) = 3/4. - Amiram Eldar, Dec 02 2022

A182751 a(1)=1, a(2)=3, a(3)=6; a(n) = 3*a(n-2) for n > 3.

Original entry on oeis.org

1, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

For n >= 3: a(n) = the smallest number > a(n-1) such that ((a(n-2) + a(n-1))*(a(n-2) + a(n))*(a(n-1) + a(n)))/(a(n-2)*a(n-1)*a(n)) is an integer (= 10 for n >= 4).
Number of necklaces with n-1 beads and 3 colors that are the same when turned over and hence have reflection symmetry. Example: For n=4 there are 9 necklaces with the colors A, B and C: AAA, AAB, AAC, ABB, ACC, BBB, BBC, BCC, CCC. The only necklaces without reflection symmetry are ABC and ACB. - Herbert Kociemba, Nov 24 2016

Examples

			For n = 5; a(3) = 6, a(4) = 9, a(5) = 18 before ((6+9)*(6+18)*(9+18)) / (6*9*18) = 10.
		

Crossrefs

Essentially the same as A038754 (cf. formula).

Programs

  • Magma
    I:=[3,6]; [1] cat [n le 2 select I[n] else 3*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 11 2018
  • Mathematica
    Join[{1},RecurrenceTable[{a[2]==3,a[3]==6,a[n]==3a[n-2]},a[n],{n,50}]] (* or *) Transpose[NestList[{#[[2]],#[[3]],3#[[2]]}&,{1,3,6},49]][[1]] (* Harvey P. Dale, Oct 19 2011 *)
    Rest@ CoefficientList[Series[x (1 + 3 x + 3 x^2)/(1 - 3 x^2), {x, 0, 34}], x] (* Michael De Vlieger, Nov 24 2016 *)
    Join[{1}, LinearRecurrence[{0, 3}, {3, 6}, 30]] (* Vincenzo Librandi, Nov 25 2016 *)
  • PARI
    x='x+O('x^30); Vec(x*(1+3*x+3*x^2)/(1-3*x^2)) \\ G. C. Greubel, Jan 11 2018
    

Formula

a(n) = A038754(n) for n >= 2.
a(2*k) = (3/2)*a(2*k-1) for k >= 2, a(2*k+1) = 2*a(2*k).
G.f.: x*(1 + 3*x + 3*x^2)/(1 - 3*x^2). - Herbert Kociemba, Nov 24 2016

A182752 a(1) = 1, a(2) = 6, for n >= 3; a(n) = the smallest number greater than a(n-1) such that [[a(n-2) + a(n-1)] * [a(n-2) + a(n)] * [a(n-1) + a(n)]] / [a(n-2) * a(n-1) * a(n)] is an integer.

Original entry on oeis.org

1, 6, 14, 84, 196, 1176, 2744, 16464, 38416, 230496, 537824, 3226944, 7529536, 45177216, 105413504, 632481024, 1475789056, 8854734336, 20661046784
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Examples

			a(5)=196 since (14+84)*(14+x)*(84+x)/(14*84*x) is an integer for x=196, but not an integer for any x satisfying 85 <= x <= 195.
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[n],6*a,7/3 a]}; NestList[nxt,{1,1},20][[All,2]] (* Harvey P. Dale, Aug 14 2020 *)

Formula

a(2n) = 6 * a(2n-1), a(2n+1) = 7/3 * a(2n).
G.f.: (1 + 6*x)/(1 - 14*x^2). - Georg Fischer, Nov 17 2022

A182754 a(1) = 1, a(2) = 21, a(n) = 77*a(n-2) for n>=3.

Original entry on oeis.org

1, 21, 77, 1617, 5929, 124509, 456533, 9587193, 35153041, 738213861, 2706784157, 56842467297, 208422380089, 4376869981869, 16048523266853, 337018988603913, 1235736291547681, 25950462122501301, 95151694449171437, 1998185583432600177, 7326680472586200649
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

For n >= 3, a(n) = the smallest number h > a(n-1) such that [[a(n-2) + a(n-1)] * [a(n-2) + a(n)] * [a(n-1) + a(n)]] / [a(n-2) * a(n-1) * a(n)] is an integer (= 104).

Examples

			For n = 4; a(2) = 21, a(3) = 77, a(4) = 1617 before [(21+77)*(21+1617)*(77+1617)]  / (21*77*1617) = 104.
		

Crossrefs

Programs

  • Magma
    I:=[1,21]; [n le 2 select I[n] else 77*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 11 2018
    
  • Mathematica
    LinearRecurrence[{0,77},{1,21},30] (* Harvey P. Dale, Sep 05 2013 *)
  • PARI
    A182754(n)=if(n%2,77^(n\2),77^(n\2-1)*21)
    
  • PARI
    Vec(x*(1 + 21*x) / (1 - 77*x^2) + O(x^40)) \\ Colin Barker, Jan 11 2018
    
  • Python
    def aupton(nn):
      dmo = [1, 21, 77]
      for n in range(3, nn+1): dmo.append(77*dmo[-2])
      return dmo[:nn]
    print(aupton(21)) # Michael S. Branicky, Jan 21 2021

Formula

a(2*n) = 21*a(2*n-1), a(2*n+1) = (11/3)*a(2*n).
G.f.: x*(1+21*x) / ( 1 - 77*x^2 ).
From Colin Barker, Jan 11 2018: (Start)
a(n) = 3*7^(n/2)*11^(n/2-1) for n even.
a(n) = 77^((n-1)/2) for n odd. (End)

Extensions

More terms from Harvey P. Dale, Sep 05 2013

A182753 Expansion of (1 + 14*x)/(1 - 35*x^2).

Original entry on oeis.org

1, 14, 35, 490, 1225, 17150, 42875, 600250, 1500625, 21008750, 52521875, 735306250, 1838265625, 25735718750, 64339296875, 900750156250, 2251875390625, 31526255468750, 78815638671875, 1103418941406250, 2758547353515625, 38619662949218750, 96549157373046875
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

a(1) = 1, a(2) = 14, for n >= 3; a(n) = the smallest number h > a(n-1) such that [[a(n-2) + a(n-1)] * [a(n-2) + h] * [a(n-1) + h]] / [a(n-2) * a(n-1) * h] is an integer (= 54).
5^(floor((n - 1)/2)) | a(n), n>=1. - G. C. Greubel, Jan 11 2018

Examples

			For n = 5; a(3) = 35, a(4) = 490, a(5) = 1225 before [(35+490)*(35+1225)*(490+1225)]  / (35*490*1225) = 54.
		

Crossrefs

Programs

  • Magma
    I:=[1,14]; [n le 2 select I[n] else 35*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 11 2018
  • Mathematica
    LinearRecurrence[{0, 35}, {1, 14}, 30] (* or *) CoefficientList[Series[(1 + 14*x)/(1-35*x^2), {x,0,50}], x] (* G. C. Greubel, Jan 11 2018 *)
  • PARI
    Vec((1+14*x)/(1-35*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 25 2012
    

Formula

a(2n) = 14 * a(2n-1), a(2n+1) = (5/2) * a(2n).
a(2n) = 14*35^(n-1), a(2n+1) = 35^n.

Extensions

Terms a(15) onward added by G. C. Greubel, Jan 11 2018

A182755 Expansion of (1+35*x)/(1-90*x^2).

Original entry on oeis.org

1, 35, 90, 3150, 8100, 283500, 729000, 25515000, 65610000, 2296350000, 5904900000, 206671500000, 531441000000, 18600435000000, 47829690000000, 1674039150000000, 4304672100000000, 150663523500000000, 387420489000000000, 13559717115000000000, 34867844010000000000
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

a(1) = 1, a(2) = 35, for n >= 3; a(n) = the smallest number h > a(n-1) such that [[a(n-2) + a(n-1)] * [a(n-2) + h] * [a(n-1) + h]] / [a(n-2) * a(n-1) * h] is an integer (= 130). (conjectured)
10^(floor((n - 1)/2)) | a(n), for n>=1. - G. C. Greubel, Jan 11 2018

Examples

			For n = 4; a(2) = 35, a(3) = 90, a(4) = 3150 before [(35+90)*(35+3150)*(90+3150)]  / (35*90*3150) = 130.
		

Crossrefs

Programs

  • Magma
    I:=[1,35]; [n le 2 select I[n] else 90*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 11 2018
  • Mathematica
    LinearRecurrence[{0,90}, {1,35}, 50] (* or *) CoefficientList[Series[(1 + 35*x)/(1-90*x^2), {x,0,50}], x] (* G. C. Greubel, Jan 11 2018 *)
  • PARI
    Vec((1+35*x)/(1-90*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 25 2012
    

Formula

a(2n) = 35* a(2n-1), a(2n+1) = (18/7) * a(2n).
a(2n) = 35*90^(n-1), a(2n+1) = 90^n.

Extensions

Terms a(12) onward added by G. C. Greubel, Jan 11 2018

A182756 Numbers k > 1 such that are sequences B_k of type: {b(1) = 1, b(2) = k, for n >= 3; b(n) = the smallest number h > b(n-1) such that [[b(n-2) + b(n-1)] * [b(n-2) + h] * [b(n-1) + h]] / [b(n-2) * b(n-1) * h] is an integer}.

Original entry on oeis.org

2, 3, 6, 14, 21, 35, 77, 90, 234, 286, 611
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

With 1 complement of A182757.
Is this a union/superset of A032908 and A101879? - Ralf Stephan, Nov 29 2010

Examples

			For n =1; a(n) = 2; B_2 = A038754(n): 1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, …
For n =2; a(n) = 3; B_3 = A182751(n): 1, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, …
For n =3; a(n) = 6; B_6 = A182752(n): 1, 6, 14, 84, 196, 1176, 2744, 16464, 38416, …
For n =4; a(n) = 14; B_14 = A182753(n): 1, 14, 35, 490, 1225, 17150, 42875, …
For n =5; a(n) = 21; B_21 = A182754(n): 1, 21, 77, 1617, 5929, 124509, 456533, …
For n =6; a(n) = 35; B_35 = A182755(n): 1, 35, 90, 3150, 8100, 283500, 729000, …
		

Crossrefs

Showing 1-7 of 7 results.