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.

Previous Showing 81-90 of 100 results. Next

A337513 G.f. A(x) satisfies: A(x) = 1 - Sum_{k=1..4} (x * A(x))^k.

Original entry on oeis.org

1, -1, 0, 1, 0, -1, -5, 13, 5, -43, 4, 98, 122, -638, -246, 2912, -537, -9419, -1648, 47005, 2243, -232237, 87988, 904267, -351692, -4123026, 1726126, 20257940, -14035151, -86846040, 73352891, 387126945, -358259621, -1853868355, 2081413376
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 30 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 34; A[] = 0; Do[A[x] = 1 - Sum[(x A[x])^k, {k, 1, 4}] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    nmax = 35; CoefficientList[(1/x) InverseSeries[Series[x/(1 - x - x^2 - x^3 - x^4), {x, 0, nmax}], x], x]
    b[m_, r_, k_] := b[m, r, k] = If[m + r == 0, 1, Sum[b[m - j, r + j - 1, k], {j, 1, Min[1, m]}] - Sum[b[m + j - 1, r - j, k], {j, 1, Min[k, r]}]]; a[n_] := b[0, n, 4]; Table[a[n], {n, 0, 34}]

Formula

G.f.: A(x) = (1/x) * Series_Reversion(x / (1 - x - x^2 - x^3 - x^4)).

A351656 Dirichlet g.f.: Product_{p prime} 1 / (1 - p^(-s) - p^(-2*s) - p^(-3*s) - p^(-4*s)).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 8, 1, 2, 1, 2, 1, 1, 1, 4, 2, 1, 4, 2, 1, 1, 1, 15, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 8, 2, 2, 1, 2, 1, 4, 1, 4, 1, 1, 1, 2, 1, 1, 2, 29, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 2, 2, 1, 1, 1, 8, 8, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 16 2022

Keywords

Crossrefs

Programs

  • Mathematica
    t[e_] := t[e] = If[e < 5, 2^(e-1), t[e-1] + t[e-2] + t[e-3] + t[e-4]]; a[1] = 1; a[n_] := Times @@ t /@ Last @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 23 2023 *)
  • PARI
    for(n=1, 87, print1(direuler(p=2, n, 1/(1 - X - X^2 - X^3 - X^4))[n], ", "))

Formula

Multiplicative with a(p^e) = A000078(e+3).

A101350 Triangle read by rows: T(n,k) = number of k-matchings in the graph obtained by a zig-zag triangulation of a convex n-gon, T(0,0)=T(1,0)=T(2,0)=T(2,1)=1 (n > 2, 0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 5, 2, 1, 7, 7, 1, 9, 16, 3, 1, 11, 29, 15, 1, 13, 46, 43, 5, 1, 15, 67, 95, 30, 1, 17, 92, 179, 104, 8, 1, 19, 121, 303, 271, 58, 1, 21, 154, 475, 591, 235, 13, 1, 23, 191, 703, 1140, 705, 109, 1, 25, 232, 995, 2010, 1746, 506, 21, 1, 27, 277, 1359, 3309, 3780
Offset: 0

Views

Author

Emeric Deutsch, Dec 25 2004

Keywords

Examples

			T(5,2)=7 because in the triangulation of the convex pentagon ABCDEA with diagonals AD and AC we have seven 2-matchings: {AB,CD},{AB,DE},{BC,AD},{BC,DE},{BC,EA},{CD,EA} and {DE,AC}.
Triangle begins:
  1;
  1;
  1,  1;
  1,  3;
  1,  5,  2;
  1,  7,  7;
  1,  9, 16,  3;
  1, 11, 29, 15;
  1, 13, 46, 43, 5;
  ...
		

Crossrefs

Row sums yield A000078 (the tetranacci numbers). T(2n+1, n) = A023610(n) (n > 0). T(2n, n) = A000045(n+1) (the Fibonacci numbers).

Programs

  • Maple
    G:=1/(1-z-t*z^2-t*z^3-t^2*z^4):Gserz:=simplify(series(G,z=0,18)):P[0]:=1: for n from 1 to 16 do P[n]:=sort(coeff(Gserz,z^n)) od:for n from 0 to 16 do seq(coeff(t*P[n],t^k),k=1..1+floor(n/2)) od;# yields the sequence in triangular form
  • PARI
    s(n) = 1/(1-x-y*x^2-y*x^3-y^2*x^4) + O(x^n);
    my(gf=Pol(s(20))); for(n=0, poldegree(gf), my(p=polcoeff(gf,n)); for(k=0, poldegree(p), print1(polcoeff(p,k), ", ")); print) \\ Andrew Howroyd, Nov 04 2017

Formula

G.f.: 1/(1 - z - tz^2 - tz^3 - t^2z^4).

A111427 Tribonacci(tetranacci(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 24, 1705, 8646064, 120879712950776, 6984325661199418257711189170, 2037364946117781220616409939151494028465982215442078400
Offset: 0

Views

Author

Jonathan Vos Post, Nov 13 2005

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <1|1|1>>^((<<0|1|0|0>,
            <0|0|1|0>, <0|0|0|1>, <1|1|1|1>>^n)[1, 4]))[1, 3]:
    seq(a(n), n=0..12);  # Alois P. Heinz, Nov 07 2018

Formula

a(n) = A000073(A000078(n)).

A112677 Sum of digits of the sum of the previous 4 terms.

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 4, 7, 4, 4, 10, 7, 7, 10, 7, 4, 10, 4, 7, 7, 10, 10, 7, 7, 7, 4, 7, 7, 7, 7, 10, 4, 10, 4, 10, 10, 7, 4, 4, 7, 4, 10, 7, 10, 4, 4, 7, 7, 4, 4, 4, 10, 4, 4, 4, 4, 7, 10, 7, 10, 7, 7, 4, 10, 10, 4, 10, 7, 4, 7, 10, 10, 4, 4, 10, 10, 10, 7, 10, 10, 10, 10
Offset: 0

Views

Author

Jonathan Vos Post, Dec 30 2005

Keywords

Comments

This is to the tetranacci sequence as A112661 is to the tribonacci and as A030132 is to Fibonacci. A000288 is the tetranacci sequence (A000078) but starting with values (1,1,1,1). Andrew Carmichael Post (andrewpost(AT)gmail.com) wrote the program that generated this sequence and showed that for any 4 initial integers a(0),a(1),a(2),a(3) the length of the cycle eventually entered is a factor of 312. For instance, starting with (6,6,6,6) continues in a cycle of length 1 since SOD(6+6+6+6) = SOD(24) = 6; and 1 divides 312. For the SOD(tribonacci) which is A112661, the length of any cycle eventually entered is a factor of 78.
All terms for n >= 4 are 4, 7, or 10. The sequence has period 78; the 78 terms after the initial 1,1,1,1 repeat forever. - Nathaniel Johnston, May 04 2011

Examples

			a(0)=a(1)=a(2)=a(3)=1.
a(4) = SOD(1+1+1+1) = SOD(4) = 4.
a(5) = SOD(1+1+1+4) = SOD(7) = 7.
a(10) = SOD(4+7+4+4) = SOD(19) = 10, note that we do not iterate SOD to reduce 10 to 1.
		

Crossrefs

Programs

  • Maple
    A112677 := proc(n) option remember: if(n<=3)then return 1:fi: return add(d,d=convert(procname(n-1) + procname(n-2) + procname(n-3) + procname(n-4),base,10)): end: seq(A112677(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,Total[IntegerDigits[a+b+c+d]]}; Transpose[ NestList[ nxt,{1,1,1,1},90]][[1]] (* or *) PadRight[{1,1,1,1},120,{10,10,10,10,4,7,4,7,4,4,10,7,7,10,7,4,10,4,7,7,10,10,7,7,7,4,7,7,7,7,10,4,10,4,10,10,7,4,4,7,4,10,7,10,4,4,7,7,4,4,4,10,4,4,4,4,7,10,7,10,7,7,4,10,10,4,10,7,4,7,10,10,4,4,10,10,10,7}](* Harvey P. Dale, Mar 05 2016 *)

Formula

a(0)=a(1)=a(2)=a(3)=1. a(n) = SumDigits(a(n-1) + a(n-2) + a(n-3) + a(n-4)).
a(n) = SumDigits(A000288(n)).
a(n) = A007953(a(n-1) + a(n-2) + a(n-3) + a(n-4)). - Nathaniel Johnston, May 04 2011

Extensions

Name corrected by Nathaniel Johnston, May 04 2011

A116849 Number of permutations of length n which avoid the patterns 213, 51432.

Original entry on oeis.org

1, 2, 5, 14, 41, 121, 356, 1044, 3057, 8948, 26192, 76674, 224465, 657137, 1923817, 5632105, 16488346, 48270655, 141315320, 413709331, 1211159679, 3545745012, 10380388294, 30389230117, 88966354626, 260454516946, 762496740130
Offset: 1

Views

Author

Lara Pudwell, Feb 26 2006

Keywords

Comments

a(n) is the binomial transform of the tetranacci numbers (A007318 transform of A000078). For example: a(6) = 121 = 1*1 + 5*1 + 10*2 + 10*4 + 5*8 + 1*15. - Bob Selcoe, Jun 28 2014
From Bob Selcoe, Jul 06 2014: (Start)
In general, the equation for the binomial transform of m-nacci numbers is: a(n) = 2*a(n-1) + sum_({i=0..n-2}, {j=0..m-2}) a(n-i-2)*sum_(i!/(j!*(i-j)!), where i>=j and a(0)=1. So in this sequence, where m=4 (therefore m-2=2) and the offset is 1 (rather than 0): a(n) = 2*a(n-1) + sum_{i=0..n-3} a(n-i-2)*[(i*(i+1)/2)+1].
Another general equation for the binomial transform of m-nacci numbers (when a(0)=1) is: a(n) = 2*a(n-1) + sum_{i=2..m} a(n-i)*2^(i-2) + sum_({i=m+1..n}, {j=0..i-m-1}) a(n-i)*(2^(i-2) - sum_((i-2)!/(j!*(i-2-j)!). Thus, when m=4 and offset is 1: a(n) = 2*a(n-1) + sum_{i=2..4} a(n-i)*2^(i-2) + sum_({i=5..n-1}, {j=0..i-5}) a(n-i)*(2^(i-2) - sum_[(i-2)!/(j!*(i-2-j)!)]). (End)

Examples

			From _Bob Selcoe_, Jul 06 2014: (Start)
a(7) = 356 = 2*121 + 41*(0*1/2 + 1) + 14*(1*2/2 + 1) + 5*(2*3/2 + 1) + 2*(3*4/2 + 1) + 1*(4*5/2 + 1)
a(8) = 1044 = 2*356 + 121*2^0 + 41*2^1 + 14*2^2 + 5*(2^3 - 3!/(0!*3!)) + 2*(2^4 - [4!/(0!*4!) + 4!/(1!*3!)]) + 1*(2^5 - [5!/(0!*5!) + 5!/(1!*4!) + 5!/(2!*3!)]). (End)
		

Programs

  • Maple
    A116849 := proc(n) coeftayl( -(x*(x-1)^3)/(-6*x^3+x^4+8*x^2-5*x+1), x=0, n); end proc: seq(A116849(n), n=1..30); # Wesley Ivan Hurt, Jul 06 2014
  • Mathematica
    Rest[CoefficientList[Series[-(x (x - 1)^3)/(- 6 x^3 + x^4 + 8 x^2 - 5 x + 1), {x, 0, 40}], x] ](* Vincenzo Librandi, Jun 29 2014 *)

Formula

G.f.: -(x*(x-1)^3)/(-6*x^3+x^4+8*x^2-5*x+1).
a(n) = 5*a(n-1) -8*a(n-2) +6*a(n-3) -a(n-4) for n>3. - Vincenzo Librandi, Jun 29 2014
From Bob Selcoe, Jul 06 2014: (Start)
a(n) = 2*a(n-1) + sum_{i=1..n-3} a(n-i-2)*[(i*(i+1)/2)+1].
a(n) = 2*a(n-1) + sum_{i=2..4} a(n-i)*2^(i-2) + sum_({i=5..n-1}, {j=0..i-5}) a(n-i)*(2^(i-2) - sum_[(i-2)!/(j!*(i-2-j)!)]). (End)

A181190 Maximal length of chain-addition sequence mod 10 with window of size n.

Original entry on oeis.org

1, 60, 124, 1560, 4686, 1456, 18744, 585936, 4882810, 212784
Offset: 1

Views

Author

Alexander Dashevsky (atanvarnoalda(AT)gmail.com), Oct 10 2010

Keywords

Comments

Chain addition mod 10 with window n: take an n-digit 'seed'. Take the sum of its digits mod 10 and append to the seed. Repeat with the last n digits of the string, until the seed appears again.
This sequence shows the lengths of the longest sequences for different window sizes.
a(1)-a(10) all occur for seed 1 (among others). If this is always true, the sequence continues: 406224, 12695306, 4272460934, 380859180, 122070312496, 518798826, 3433227539058. - Lars Blomberg, Feb 12 2013
Comment from Michel Lagneau, Jan 20 2017, edited by N. J. A. Sloane, Jan 24 2017: (Start)
If seed 1 is always as good as or better than any other, as seems likely, then this sequence has the following alternative description.
Consider the n initial terms of an infinite sequence S(k, n) of decimal digits given by 0, 0,..., 0, 1. The succeeding terms are given by the final digits in the sum of the n immediately preceding terms. The sequence lists the period of each sequence corresponding to n = 2, 3, ...
a(2) = period of A000045 mod 10 (Fibonacci numbers mod 10) = A001175(10).
a(3) = period of A000073 mod 10 (tribonacci numbers mod 10) = A046738(10).
a(4) = period of A000078 mod 10 (tetranacci numbers mod 10) = A106295(10).
a(5) = period of A001591 mod 10 (pentanacci numbers mod 10) = A106303(10).
a(6) = period of A001592 mod 10 (hexanacci numbers mod 10).
a(7) = period of A122189 mod 10 (heptanacci numbers mod 10).
a(8) = period of A079262 mod 10 (octanacci numbers mod 10).
a(4) = 1560 because the four initial terms 0, 0, 0, 1 => S(k, 4) = 0, 0, 0, 1, 1, 2, 4, 8, 5, 9, 6, 8, 8, 1, 3, 0, 2, 6, 1, 9, 8, ... (tetranacci numbers mod 10). This sequence is periodic with period 1560:
S(1560 + 1, 4) = S(1, 4) = 0,
S(1560 + 2, 4) = S(2, 4) = 0,
S(1560 + 3, 4) = S(3, 4) = 0,
S(1560 + 4, 4) = S(4, 4) = 1.
(End)

Examples

			For n=2, the longest sequence begins with '01' (among others):
01123583145943707741561785381909987527965167303369549325729101.
It is 60 digits long (not counting the second '01' at the end).
For n=3, one of the longest sequences begins again with '001':
00112473441944756893025746770415061742394699425184352079627546556679289964992013
48570291225960516297849144970639807524172091001 (124 digits long without the second '001').
		

Crossrefs

Extensions

a(8)-a(10) from Lars Blomberg, Feb 12 2013

A196875 a(n) = a(n-4) + a(n-3) + a(n-2) + a(n-1) + (n-5).

Original entry on oeis.org

1, 1, 1, 1, 4, 8, 16, 32, 64, 125, 243, 471, 911, 1759, 3394, 6546, 12622, 24334, 46910, 90427, 174309, 335997, 647661, 1248413, 2406400, 4638492, 8940988, 17234316, 33220220, 64034041, 123429591, 237918195, 458602075, 883983931, 1703933822, 3284438054
Offset: 1

Views

Author

Aditya Subramanian, Oct 07 2011

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix(6, (i, j)-> `if`(i=j-1, 1, `if`(i=6, [1, -1, 0, 0, -2, 3][j], 0)))^n. <<-1, 1, 1, 1, 1, 4>>)[1, 1]: seq(a(n), n=1..50); # Alois P. Heinz, Oct 15 2011
  • Mathematica
    nn = 40; a[1] = a[2] = a[3] = a[4] = 1; Do[a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + (n - 5), {n, 5, nn}]; Table[a[n], {n, nn}] (* T. D. Noe, Oct 07 2011 *)
    RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==1,a[n]==a[n-1]+a[n-2]+a[n-3]+a[n-4]+(n-5)},a,{n,40}] (* or *) LinearRecurrence[{3,-2,0,0,-1,1},{1,1,1,1,4,8},40] (* Harvey P. Dale, Aug 25 2014 *)

Formula

G.f.: (x^5-3*x^4+2*x-1)*x / ((x^4+x^3+x^2+x-1)*(x-1)^2 ).
a(n) = +3*a(n-1) -2*a(n-2) -a(n-5) +a(n-6).
a(n) = 5/9-n/3 +(10*A000078(n) +17*A000078(n+1) +21*A000078(n+2) -14*A000078(n+3))/9. - R. J. Mathar, Oct 16 2011

A202193 Triangle read by rows: T(n,m) = coefficient of x^n in expansion of (x/(1 - x - x^2 - x^3 - x^4))^m.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 8, 12, 9, 4, 1, 15, 28, 25, 14, 5, 1, 29, 62, 66, 44, 20, 6, 1, 56, 136, 165, 129, 70, 27, 7, 1, 108, 294, 401, 356, 225, 104, 35, 8, 1, 208, 628, 951, 944, 676, 363, 147, 44, 9, 1, 401, 1328, 2211, 2424, 1935, 1176, 553, 200, 54, 10, 1
Offset: 1

Views

Author

Vladimir Kruchinin, Dec 14 2011

Keywords

Comments

From Philippe Deléham, Feb 16 2014: (Start)
As a Riordan array, this is (1/(1 - x - x^2 - x^3 - x^4), x/(1 - x - x^2 - x^3 - x^4)).
T(n,0) = A000078(n+3); T(n+1,1) = A118898(n+4).
Row sums are A103142(n).
Diagonal sums are A077926(n)*(-1)^n.
Tetranacci convolution triangle. (End)

Examples

			Triangle begins:
   1;
   1,  1;
   2,  2,  1;
   4,  5,  3,  1;
   8, 12,  9,  4,  1;
  15, 28, 25, 14,  5,  1;
  29, 62, 66, 44, 20,  6,  1;
		

Crossrefs

Similar sequences : A037027 (Fibonacci convolution triangle), A104580 (tribonacci convolution triangle). - Philippe Deléham, Feb 16 2014

Programs

  • Maxima
    T(n,m):=if n=m then 1 else sum(sum((-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1),i,0,(n-m-k)/4)*binomial(k+m-1,m-1),k,1,n-m);

Formula

T(n,m) = Sum_{k=1..n-m} (Sum_{i=0..floor((n-m-k)/4)} (-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1))*binomial(k+m-1,m-1), n > m, T(n,n)=1.
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-3,k) + T(n-4,k), T(0,0) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Feb 16 2014
G.f. for column m: (x/(1 - x - x^2 - x^3 - x^4))^m. - Jason Yuen, Feb 17 2025

A202805 a(n) is the largest k in an n_nacci(k) sequence (Fibonacci(k) for n=2, tribonacci(k) for n=3, etc.) such that n_nacci(k) >= 2^(k-n-1).

Original entry on oeis.org

6, 12, 25, 48, 94, 184, 363, 719, 1430, 2851, 5691, 11371, 22728, 45443, 90870, 181724, 363429, 726839, 1453658, 2907295, 5814566, 11629107
Offset: 2

Views

Author

Frank M Jackson, Dec 24 2011

Keywords

Comments

From Frank M Jackson, Jul 02 2023: (Start)
Define the n_nacci sequence, basically row n in A092921, with an offset of 0, n_nacci(k) = 0 for 0 <= k <= n-2 and n_nacci(n-1) = 1. Thereafter, n_nacci(k) for k >= n continues as the sum of its previous n terms.
This means that n_nacci(k) = 2^(k-n) for n <= k <= 2n-1. In the limit as n tends to infinity the n_nacci sequence after an initial large set of zeros followed by 1 has successive terms of ascending powers of 2.
As the n-acci constants, (A001622, A058265, A086088, A103814,...) are smaller than 2, for each n_nacci sequence there is a largest k such that n_nacci(k) >= 2^(k-n-1). (End)

Examples

			For n=3, the tribonacci sequence is 0,0,1,1,2,4,7,...,149,274,504,... and the 13th term is 504 < 512 so a(n)=12 because 274 is greatest term >= 2^(12-3-1) = 256.
		

Crossrefs

Programs

  • Maple
    nAcci := proc(n,k)
        option remember ;
        if k <= n-2 then
            0;
        elif k = n-1 then
            1;
        else
            add( procname(n,i),i=k-n..k-1) ;
        end if;
    end proc:
    A202805 := proc(n)
        local k ;
        for k from n do
            if nAcci(n,k) < 2^(k-n-1) then
                return k-1;
            end if;
        end do:
    end proc:
    for n from 2 do
        print(n,A202805(n)) ;
    end do: # R. J. Mathar, Mar 11 2024
  • Mathematica
    fib[n_, m_] := (Block[{nacci}, (Do[nacci[g]=0, {g, 0, m - 2}];
    nacci[m-1]=1;nacci[p_] := (nacci[p]=Sum[nacci[h], {h, p-m, p-1}]);nacci[n])]);
    crossover[q_] := (Block[{$RecursionLimit=Infinity}, (k=0;While[fib[k+q+1, q]>=2^k, k++];k+q)]);
    Table[crossover[j], {j, 2, 12}]
  • Python
    def nacci(n): # generator of n_nacci terms
        window = [0]*(n-1) + [1]
        yield from window
        while True:
            an = sum(window)
            yield an
            window = window[1:] + [an]
    def a(n):
        pow2 = 1
        for k, t in enumerate(nacci(n)):
            if k > n + 1: pow2 <<= 1
            if 0 < t < pow2: return k-1
    print([a(n) for n in range(2, 12)]) # Michael S. Branicky, Jan 29 2025

Extensions

Edited by N. J. A. Sloane, May 20 2023
There seems to be an error in the Comment. See "History" tab. - N. J. A. Sloane, Jun 24 2023
Removed musing about what might define "complete" sequences. - R. J. Mathar, Mar 11 2024
a(17)-a(23) from Michael S. Branicky, Jan 29 2025
Previous Showing 81-90 of 100 results. Next