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

A168610 a(n) = 3^n + 5.

Original entry on oeis.org

6, 8, 14, 32, 86, 248, 734, 2192, 6566, 19688, 59054, 177152, 531446, 1594328, 4782974, 14348912, 43046726, 129140168, 387420494, 1162261472, 3486784406, 10460353208, 31381059614, 94143178832, 282429536486, 847288609448
Offset: 0

Views

Author

Vincenzo Librandi, Dec 01 2009

Keywords

Crossrefs

Cf. A168613.

Programs

  • Magma
    I:=[6, 8]; [n le 2 select I[n] else 4*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
    
  • Mathematica
    CoefficientList[Series[2*(3-8*x)/((1-x)*(1-3*x)),{x,0,40}],x] (* Vincenzo Librandi, Jul 06 2012 *)
    LinearRecurrence[{4,-3}, {6, 8}, 25] (* G. C. Greubel, Jul 27 2016 *)
  • PARI
    a(n)=3^n+5 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 3*a(n-1) - 10 with a(0)=6.
G.f.: 2*(3 - 8*x)/((1-x)*(1-3*x)). - Vincenzo Librandi, Jul 06 2012
a(n) = 4*a(n-1) -3*a(n-2). - Vincenzo Librandi, Jul 06 2012
a(n) = 2*A115098(n)+2. - Bruno Berselli, Jul 06 2012
E.g.f.: exp(3*x) + 5*exp(x). - G. C. Greubel, Jul 27 2016

Extensions

Formula and examples edited to use correct offset by Jon E. Schoenfield, Jun 19 2010

A367606 Comma-successor to n working in base 3, but written in base 10, or -1 if n has no successor.

Original entry on oeis.org

5, 9, 4, -1, 12, 8, 11, 15, 10, 14, 19, 13, 17, 22, 16, 21, 25, 20, 24, 27, 23, -1, 30, 26, 29, 33, 28, 32, 36, 31, 35, 39, 34, 38, 42, 37, 41, 45, 40, 44, 48, 43, 47, 51, 46, 50, 55, 49, 53, 58, 52, 57, 61, 56, 60, 64, 59, 63, 67, 62, 66, 70, 65, 69, 73, 68, 72, 76, 71, 75, 79, 74, 78, 81, 77, -1, 84, 80, 83, 87, 82
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

This is a base-3 analog of A367338.
It seems that the indices of the terms equal to -1 are in A168613. - Ivan N. Ianakiev, Dec 12 2023
This is true for A168613(n), n >= 2. See proofs in A367341. - Michael S. Branicky, Dec 15 2023

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):
        b = n + 3*(n%3)
        return next((b+y for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
    print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Dec 11 2023

A277104 a(n) = 9*3^n - 15.

Original entry on oeis.org

12, 66, 228, 714, 2172, 6546, 19668, 59034, 177132, 531426, 1594308, 4782954, 14348892, 43046706, 129140148, 387420474, 1162261452, 3486784386, 10460353188, 31381059594, 94143178812, 282429536466, 847288609428, 2541865828314, 7625597484972, 22876792454946
Offset: 1

Views

Author

Emeric Deutsch, Nov 05 2016

Keywords

Comments

a(n) is the first Zagreb index of the Hanoi graph H[n].
The first Zagreb index of a simple connected graph is the sum of the squared degrees of its vertices. Alternately, it is the sum of the degree sums d(i)+d(j) over all edges ij of the graph.
The M-polynomial of the Hanoi graph H[n] is M(H[n],x,y) = 6*x^2*y^3 + (3/2)*(3^n - 5)*x^3*y^3.

Crossrefs

Cf. A277105.

Programs

Formula

O.g.f.: 6*x*(2 + 3*x)/((1 - x)*(1 - 3*x)).
E.g.f.: 3*(1 - exp(x))*(2 - 3*exp(x) - 3*exp(2*x)). - Bruno Berselli, Nov 14 2016
a(n) = 3*A168613(n+1). - R. J. Mathar, Apr 07 2022
Showing 1-3 of 3 results.