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 31-35 of 35 results.

A320452 Number of possible states when placing n tokens of 2 alternating types on 2 piles.

Original entry on oeis.org

1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2030, 3732, 6858, 12600, 23144, 42504, 78048, 143296, 263068, 482904, 886392, 1626912, 2985943, 5480012, 10056946, 18456056, 33868851, 62151788, 114050884, 209284710, 384034660, 704690938, 1293071688, 2372700708
Offset: 0

Views

Author

Bert Dobbelaere, Oct 20 2018

Keywords

Comments

Piles start empty and have no height limit. A token can only be placed on top of a pile. The starting token is fixed.
Up to a(11) the terms are matching A008937(n+1).

Examples

			With alternating symbols A and B on two piles (starting with A), the following states emerge after placing 4 symbols in all 2^4 possible ways:
  B                                                            B
  A   A   B       B            B  B            B       B   A   A
  B   B   B   BB  A   AB  BA   A  A   AB  BA   A  BB   B   B   B
  A_  AB  AA  AA  AB  AB  AB  AB  BA  BA  BA  BA  AA  AA  BA  _A
All states are different, except the 13th state is a duplicate of the 4th.
Hence a(4)=15.
		

Crossrefs

For 2 token types on 3 piles, see A320731.

Programs

  • Python
    def fill(patterns, state_in, ply_nr, n_plies, n_players, n_stacks):
        if ply_nr>=n_plies:
            patterns.add(tuple(state_in))
        else:
            symbol=chr(ord('A')+ply_nr%n_players)
            for st in range(n_stacks):
                state_out=list(state_in)
                state_out[st]+=symbol
                fill(patterns, state_out, ply_nr+1, n_plies, n_players, n_stacks)
    def A320452(n):
        n_plies, n_players, n_stacks = n, 2, 2
        patterns=set()
        state=[""]*n_stacks
        fill(patterns, state, 0, n_plies, n_players, n_stacks)
        return len(patterns)

Extensions

a(33) onwards from Martin Fuller, Apr 09 2025

A141435 a(1) = 1, a(2) = 2; a(n) = a(n-a(1)) + a(n-a(2)) + a(n-a(3)) + a(n-a(4)) + ...

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 38, 71, 132, 247, 461, 861, 1609, 3005, 5613, 10485, 19584, 36581, 68330, 127632, 238404, 445314, 831798, 1553712, 2902170, 5420945, 10125754, 18913838, 35329048, 65990929, 123264078, 230244265, 430071949, 803328933
Offset: 1

Views

Author

Raes Tom (tommy1729(AT)hotmail.com), Aug 06 2008

Keywords

Comments

Thus we get a self-reference sequence that grows exponentially. a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-6) + a(n-11) + a(n-20) + ...
A Fibonacci-like sequence, even closer to the tribonacci numbers.
Lim n-> oo log (a(n))/n converges.

Examples

			a(6) = 20 because 20 = a(5) + a(4) + a(3) = 11 + 6 + 3
a(8) = 71 because 71 = a(7) + a(6) + a(5) + a(2) = 38 + 20 + 11 + 2
		

Crossrefs

Programs

  • Maple
    A141435 := proc(n) option remember; local a,i; if n <= 3 then RETURN(n); else a :=0 ; for i from 1 to n-1 do if n-procname(i) < 1 then RETURN(a); else a := a+procname(n-procname(i)) ; fi; od; RETURN(a); fi; end: for n from 1 to 80 do printf("%d,",A141435(n)) ; od: # R. J. Mathar, Nov 03 2008
  • Python
    def A141435(terms):
        seq = [1, 2]
        for n in range(3, terms):
            s = 0
            for m in seq:
                if (n - m) > 0:
                    s += seq[n - m - 1] #fix for python indexing
            seq.append(s)
        return seq
    print(A141435(40)) # Andres Cruz y Corro A, Jun 19 2019

Extensions

More terms from R. J. Mathar, Nov 03 2008

A202012 Expansion of (1-x+x^2)/((1-x)(1-x-x^2-x^3)).

Original entry on oeis.org

1, 1, 3, 6, 11, 21, 39, 72, 133, 245, 451, 830, 1527, 2809, 5167, 9504, 17481, 32153, 59139, 108774, 200067, 367981, 676823, 1244872, 2289677, 4211373, 7745923, 14246974, 26204271, 48197169, 88648415, 163049856
Offset: 0

Views

Author

Philippe Deléham, Dec 08 2011

Keywords

Comments

Antidiagonal sums of triangle T(n,k) = A104040(n,k)*(-1)^floor(k/2). - Philippe Deléham, Dec 11 2011

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1-x+x^2)/((1-x)(1-x-x^2-x^3)),{x,0,40}],x] (* or *) LinearRecurrence[{2,0,0,-1},{1,1,3,6},40] (* Harvey P. Dale, Apr 21 2014 *)

Formula

a(n) = 2*a(n-1) - a(n-4), n>3.
a(n) = A008937(n-1) - A008937(n) + A008937(n+1). - R. J. Mathar, Dec 10 2011
a(n+1)-a(n) = A081172(n+2). - Philippe Deléham, Dec 11 2011

A136337 Triangular sequence from both a quartic expansion polynomial and a four deep polynomial recursion: Expansion polynomial: f(x,t)=1/(1 - 2*x*t + t^4); Recursion polynomials: p(x, n) = 2*x*p(x, n - 1) - p(x, n - 4);.

Original entry on oeis.org

1, 0, 2, 0, 0, 4, 0, 0, 0, 8, -1, 0, 0, 0, 16, 0, -4, 0, 0, 0, 32, 0, 0, -12, 0, 0, 0, 64, 0, 0, 0, -32, 0, 0, 0, 128, 1, 0, 0, 0, -80, 0, 0, 0, 256, 0, 6, 0, 0, 0, -192, 0, 0, 0, 512, 0, 0, 24, 0, 0, 0, -448, 0, 0, 0, 1024
Offset: 1

Views

Author

Roger L. Bagula, Apr 12 2008

Keywords

Comments

Row sums are A008937.
This sequence was a designed experiment in Umbral Calculus
using a quartic polynomial for the expansion base.
I was testing the recursion form in the polynomial as:
f(x,t)=1/(1-p(x,1)*t +t^m): m the depth of the recursion.
as a recursion of the form:
p(x,n)=p(x,1)*p(x,n-1)-p(x,n-m).

Crossrefs

Cf. A008937.

Programs

  • Mathematica
    (*expansion polynomial*) Clear[p, a] p[t_] = 1/(1 - 2*x*t + t^4) g = Table[ ExpandAll[SeriesCoefficient[ Series[p[t], {t, 0, 30}], n]], {n, 0, 10}]; a = Table[ CoefficientList[SeriesCoefficient[ Series[p[t], {t, 0, 30}], n], x], {n, 0, 10}]; Flatten[a] (* recursion polynomial*) Clear[p] p[x,-1]=0;p[x, 0] = 1; p[x, 1] = 2x; p[x, 2] = 4x^2; p[x_, n_] := p[x, n] = 2*x*p[x, n - 1] - p[x, n - 4]; Table[ExpandAll[p[x, n]], {n, 0, Length[g] - 1}]; Flatten[Table[CoefficientList[p[x, n], x], {n, 0, Length[g] - 1}]]

Formula

f(x,t)=1/(1 - 2*x*t + t^4); f(x,t)=Sum[q(x,n)*t^n,{n,1,Infinity}]; p(x,-1)=0;p(x,0)=1;p(x,1)=2*x;p(x,2)=4*x^2; p(x, n) = 2*x*p(x, n - 1) - p(x, n - 4);

A136438 Hypertribonacci number array read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 1, 3, 4, 4, 0, 0, 1, 4, 7, 8, 7, 0, 0, 1, 5, 11, 15, 15, 13, 0, 0, 1, 6, 16, 26, 30, 28, 24, 0, 0, 1, 7, 22, 42, 56, 58, 52, 44, 0, 0, 1, 8, 29, 64, 98, 114, 110, 96, 81, 0, 0, 1, 9, 37, 93, 162, 212, 224, 206, 177, 149
Offset: 1

Views

Author

Jonathan Vos Post, Apr 13 2008

Keywords

Comments

The hypertribonacci numbers are to the hyperfibonacci array of A136431 as the tribonacci numbers A000073 are to the Fibonacci numbers A000045.

Examples

			The array a(k,n) begins:
========================================
n=0..|.1.|.2.|...3.|..4.|...5.|....6.|...7..|.....8.|.....9.|....10.|
========================================
k=0..|.0.|.0.|...1.|..2.|...4.|....7.|..13..|....24.|....44.|....81.| A000073
k=1..|.0.|.0.|...2.|..4.|...8.|...15.|..28..|....52.|....96.|...177.| A008937
k=2..|.0.|.0.|...3.|..7.|..15.|...30.|..58..|...110.|...206.|...383.| A062544
k=3..|.0.|.0.|...4.|.11.|..26.|...56.|..114.|...224.|...430.|...813.|
k=4..|.0.|.0.|...5.|.16.|..42.|...98.|..212.|...436.|...866.|..1679.|
k=5..|.0.|.0.|...6.|.22.|..64.|..162.|..374.|...810.|..1676.|..3355.|
k=6..|.0.|.0.|...7.|.29.|..93.|..255.|..629.|..1439.|..3115.|..6470.|
k=7..|.0.|.0.|...8.|.37.|.130.|..385.|.1014.|..2453.|..5568.|.12038.|
k=8..|.0.|.0.|...9.|.46.|.176.|..561.|.1575.|..4028.|..9596.|.21634.|
k=9..|.0.|.0.|..10.|.56.|.232.|..793.|.2368.|..6396.|.15992.|.37626.|
k=10.|.0.|.0.|..11.|.67.|.299.|.1092.|.3460.|..9856.|.25848.|.63474.|
========================================
		

Crossrefs

Programs

  • PARI
    \\ create the n X n matrix of nonzero values
    hypertribo(n)={ local(M=matrix(n,n)); M[1,]=Vec(1/(1-x-x^2-x^3)+O(x^n));
    M[,1]=vector(n,i,1)~; for(i=2,n, for(j=2,n, M[i,j]=M[i-1,j]+M[i,j-1])); M}
    { hypertribo(10) }

Formula

a(k,n) = apply partial sum operator k times to tribonacci numbers A000073.
M. F. Hasler notes that the 8th column = vector(25,n,binomial(n+5,6)+binomial(n+5,4)+2*binomial(n+3,1)). R. J. Mathar points out that the repeated partial sums are quickly computed from their o.g.f.s (-1)^(k+1)*x^2/(-1+x+x^2+x^3)/(-1+x)^k, k=1,2,3,...

Extensions

Examples corrected by R. J. Mathar, Apr 21 2008
Previous Showing 31-35 of 35 results.