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

A052909 Expansion of g.f. (1+x-x^2)/((1-x)*(1-3*x)).

Original entry on oeis.org

1, 5, 16, 49, 148, 445, 1336, 4009, 12028, 36085, 108256, 324769, 974308, 2922925, 8768776, 26306329, 78918988, 236756965, 710270896, 2130812689, 6392438068, 19177314205, 57531942616, 172595827849, 517787483548, 1553362450645
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Examples

			Ternary.......................Decimal
1...................................1
12..................................5
121................................16
1211...............................49
12111.............................148
121111............................445
1211111..........................1336
12111111.........................4009
121111111.......................12028
1211111111......................36085, etc. - _Philippe Deléham_, Feb 17 2014
		

Crossrefs

Programs

  • GAP
    Concatenation([1], List([1..30], n-> (11*3^n - 3)/6)); # G. C. Greubel, Oct 15 2019
  • Magma
    I:=[1, 5, 16]; [n le 3 select I[n] else 4*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    spec := [S,{S=Prod(Union(Sequence(Z),Z),Sequence(Union(Z,Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    CoefficientList[Series[(1+x-x^2)/((1-x)*(1-3*x)),{x,0,30}],x] (* Vincenzo Librandi, Jun 22 2012 *)
    Join[{1}, (11*3^Range[30] -3)/6] (* G. C. Greubel, Oct 15 2019 *)
  • PARI
    vector(30, n, if(n==1, 1, (11*3^(n-1) - 3)/6)) \\ G. C. Greubel, Oct 15 2019
    
  • Sage
    [1]+[(11*3^n -3)/6 for n in (1..30)] # G. C. Greubel, Oct 15 2019
    

Formula

a(n) = 3*a(n-1) + 1, with a(0)=1, a(1)=5, a(2)=16.
a(n) = (11*3^n - 3)/6.
a(n) = 4*a(n-1) - 3*a(n-2). - Vincenzo Librandi, Jun 22 2012
a(n+1) = A237930(n) + 2*A000244(n). - Philippe Deléham, Feb 17 2014
a(n) = Sum_{k=1..3} floor((3^n)/k). - Lechoslaw Ratajczak, Jul 31 2016
E.g.f.: (11*exp(3*x) - 3*exp(x) - 2)/6. - Stefano Spezia, Aug 28 2023

Extensions

More terms from James Sellers, Jun 08 2000

A199109 a(n) = (7*3^n + 1)/2.

Original entry on oeis.org

4, 11, 32, 95, 284, 851, 2552, 7655, 22964, 68891, 206672, 620015, 1860044, 5580131, 16740392, 50221175, 150663524, 451990571, 1355971712, 4067915135, 12203745404, 36611236211, 109833708632, 329501125895, 988503377684, 2965510133051, 8896530399152, 26689591197455
Offset: 0

Views

Author

Vincenzo Librandi, Nov 03 2011

Keywords

Comments

Also the number of (not necessarily maximal) cliques in the (n+2)-Mycielski graph. - Eric W. Weisstein, Nov 29 2017

Examples

			Ternary....................Decimal
11...............................4
102.............................11
1012............................32
10112...........................95
101112.........................284
1011112........................851
10111112......................2552
101111112.....................7655
1011111112...................22964, etc.
- _Philippe Deléham_, Feb 16 2014
		

Crossrefs

Cf. A000244, A003462, A005032 (first differences), A199110, A237930.

Programs

Formula

a(n) = 3*a(n-1) - 1.
a(n) = 4*a(n-1) - 3*a(n-2).
G.f.: (4-5*x)/((1-x)*(1-3*x)). - Bruno Berselli, Nov 03 2011
a(n) = A000244(n+1) + A003462(n) + 1 = A237930(n) + 1. - Philippe Deléham, Feb 16 2014
From Elmo R. Oliveira, Apr 02 2025: (Start)
E.g.f.: exp(x)*(7*exp(2*x) + 1)/2.
a(n) = A199110(n)/2. (End)

A027107 a(n) = Sum_{k=0..2n} (k+1) * A027082(n, 2n-k).

Original entry on oeis.org

1, 6, 20, 62, 188, 566, 1700, 5102, 15308, 45926, 137780, 413342, 1240028, 3720086, 11160260, 33480782, 100442348, 301327046, 903981140, 2711943422, 8135830268, 24407490806, 73222472420, 219667417262, 659002251788
Offset: 0

Views

Author

Keywords

Programs

Formula

For n>0, a(n) = 7*3^(n-1) - 1.
G.f.: (1+2*x-x^2)/(1-4*x+3*x^2). [Bruno Berselli, Mar 25 2013]
a(n) = 2*A237930(n-1), n>0. - R. J. Mathar, Jun 24 2020

A329774 a(n) = n+1 for n <= 2; otherwise a(n) = 3*a(n-3)+1.

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 13, 22, 31, 40, 67, 94, 121, 202, 283, 364, 607, 850, 1093, 1822, 2551, 3280, 5467, 7654, 9841, 16402, 22963, 29524, 49207, 68890, 88573, 147622, 206671, 265720, 442867, 620014, 797161, 1328602, 1860043, 2391484, 3985807
Offset: 0

Views

Author

N. J. A. Sloane, Nov 27 2019

Keywords

Comments

Robert Fathauer observed that if the "warp and woof" construction used by Jim Conant in his recursive dissection of a square (see A328078) is applied to a triangle, one obtains the Sierpinski gasket.
The present sequence gives the number of regions after the n-th generation of this dissection of a triangle.

References

  • Robert Fathauer, Email to N. J. A. Sloane, Oct 14 2019.

Crossrefs

A mixture of A003462, A060816, and A237930. Cf. A328078.

Programs

  • Maple
    f:=proc(n) option remember;
    if n<=2 then n+1 else 3*f(n-3)+1; fi; end;
    [seq(f(n),n=0..50)];
  • PARI
    Vec((1 + x + x^2 - 2*x^3) / ((1 - x)*(1 - 3*x^3)) + O(x^40)) \\ Colin Barker, Nov 27 2019

Formula

From Colin Barker, Nov 27 2019: (Start)
G.f.: (1 + x + x^2 - 2*x^3) / ((1 - x)*(1 - 3*x^3)).
a(n) = a(n-1) + 3*a(n-3) - 3*a(n-4) for n>3.
(End)

A330246 a(n) = 4^(n+1) + (4^n-1)/3.

Original entry on oeis.org

4, 17, 69, 277, 1109, 4437, 17749, 70997, 283989, 1135957, 4543829, 18175317, 72701269, 290805077, 1163220309, 4652881237, 18611524949, 74446099797, 297784399189, 1191137596757, 4764550387029, 19058201548117, 76232806192469, 304931224769877, 1219724899079509
Offset: 0

Views

Author

Vincenzo Librandi, Jan 09 2020

Keywords

Comments

After 4, these numbers are the third column of the rectangular array in A238475.

Crossrefs

Similar to A272743.
Together with 1: first bisection of A136326.

Programs

  • Magma
    [4^(n+1)+(4^n-1)/3: n in [0..30]];
  • Mathematica
    Table[(4^(n + 1) + (4^n - 1) / 3), {n, 0, 30}]

Formula

G.f.: (4 - 3*x) / ((1 - x)*(1 - 4*x)).
a(n) = 5*a(n-1) - 4*a(n-2) for n > 1.
a(n) = 4*a(n-1) + 1 for n > 0.
a(n) = (13*4^n -1)/3, for n >= 0. - Wolfdieter Lang, Sep 16 2021
a(n) = A178415(5, n) = A347834(7, n-1), arrays, for n >= 1. - Wolfdieter Lang, Nov 29 2021

A238055 a(n) = (13*3^n-1)/2.

Original entry on oeis.org

6, 19, 58, 175, 526, 1579, 4738, 14215, 42646, 127939, 383818, 1151455, 3454366, 10363099, 31089298, 93267895, 279803686, 839411059, 2518233178, 7554699535, 22664098606, 67992295819, 203976887458, 611930662375, 1835791987126, 5507375961379, 16522127884138
Offset: 0

Views

Author

Philippe Deléham, Feb 17 2014

Keywords

Examples

			Ternary....................Decimal
20...............................6
201.............................19
2011............................58
20111..........................175
201111.........................526
2011111.......................1579
20111111......................4738
201111111....................14215, etc.
		

Crossrefs

Formula

a(n) = 3*a(n-1) + 1, a(0)=6.
a(n) = 4*a(n-1) - 3*a(n-2), a(0)=6, a(1)=19.
a(n) = 2*A237930(n) - A003462(n).
a(n) = A052909(n+1) + A000244(n).
a(n) = A237930(n) + A000244(n+1).
a(n) = 13*A003462(n) + 6.
G.f.: (6-5*x)/((1-x)*(1-3*x)).
E.g.f.: exp(x)*(13*exp(2*x) - 1)/2. - Stefano Spezia, Aug 28 2023

A238206 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(0,k) is A007494(k) and T(n,k) = 3*T(n-1,k) + 1 for n>0.

Original entry on oeis.org

0, 2, 1, 3, 7, 4, 5, 10, 22, 13, 6, 16, 31, 67, 40, 8, 19, 49, 94, 202, 121, 9, 25, 58, 148, 283, 607, 364, 11, 28, 76, 175, 445, 850, 1822, 1093, 12, 34, 85, 229, 526, 1336, 2551, 5467, 3280, 14, 37, 103, 256, 688, 1579, 4009, 7654, 16402, 9841, 15, 43, 112, 310
Offset: 0

Views

Author

Philippe Deléham, Feb 20 2014

Keywords

Comments

Permutation of nonnegative integers.

Examples

			Square array begins:
0, 2, 3, 5, 6, 8, 9, ...
1, 7, 10, 16, 19, 25, 28, ...
4, 22, 31, 49, 58, 76, 85, ...
13, 67, 94, 148, 175, 229, 256, ...
40, 202, 283, 445, 523, 688, 769, ...
121, 607, 850, 1336, 1579, 2065, 2308, ...
364, 1822, 2551, 4009, 4738, 6196, 6925, ...
1093, 5467, 7654, 12028, 14215, 18589, 20776, ...
3280, 16402, 22963, 36085, 42646, 55768, 62329, ...
9841, 49207, 68890, 108256, 127939, 167305, 186988, ...
...
		

Crossrefs

Formula

T(n,k) = T(0,k)*3^n + T(n,0) where T(0,k) = (6*k + 1 -(-1)^k)/4 = A007494(k) and T(n,0) = (3^n - 1)/2 = A003462(n).

A370481 a(0) = 33. a(n) = 3*a(n-1) + 2*n + 1 for n >= 1.

Original entry on oeis.org

33, 102, 311, 940, 2829, 8498, 25507, 76536, 229625, 688894, 2066703, 6200132, 18600421, 55801290, 167403899, 502211728, 1506635217, 4519905686, 13559717095, 40679151324, 122037454013, 366112362082, 1098337086291, 3295011258920, 9885033776809, 29655101330478
Offset: 0

Views

Author

Paul Curtz, Mar 31 2024

Keywords

Comments

Last digit is of period 10: repeat [3, 2, 1, 0, 9, 8, 7, 6, 5, 4].

Examples

			a(1) = 3*33 + 3 = 102, a(2) = 3*102 + 5 = 311.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -7, 3}, {33, 102, 311}, 26] (* Amiram Eldar, Apr 01 2024 *)

Formula

a(n) = 4*a(n-1) - 3*a(n-2) + 2 with a(0) = 33 and a(1) = 102 for n >= 2.
a(n) = 10*A237930(n) + 3 - n.
a(n) = 35*3^n - n - 2. - Hugo Pfoertner, Mar 31 2024
Showing 1-8 of 8 results.