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.

User: Gerald McGarvey

Gerald McGarvey's wiki page.

Gerald McGarvey has authored 110 sequences. Here are the ten most recent ones:

A165992 Triangle read by rows: T(n,0) = 3^n, T(n,k) = T(n,k-1) + T(n-1,k) for 0 < k < n, and T(n,n) = T(n,n-1).

Original entry on oeis.org

1, 3, 3, 9, 12, 12, 27, 39, 51, 51, 81, 120, 171, 222, 222, 243, 363, 534, 756, 978, 978, 729, 1092, 1626, 2382, 3360, 4338, 4338, 2187, 3279, 4905, 7287, 10647, 14985, 19323, 19323, 6561, 9840, 14745, 22032, 32679, 47664, 66987, 86310, 86310, 19683
Offset: 0

Author

Gerald McGarvey, Oct 03 2009

Keywords

Crossrefs

A007854 (main diagonal)

Programs

  • PARI
    s=10;M=matrix(s,s);for(n=1,s,M[n,1]=3^(n-1)); for(n=2,s,for(k=2,n,M[n,k]=M[n,k-1]+M[n-1,k])); for(n=1,10,for(k=1,n,print1(M[n,k],", ")))

A165996 Triangle read by rows: T(n,0) = (n+1)^2, T(n,k) = T(n,k-1) + T(n-1,k) for 0 < k < n, and T(n,n) = T(n,n-1).

Original entry on oeis.org

1, 4, 4, 9, 13, 13, 16, 29, 42, 42, 25, 54, 96, 138, 138, 36, 90, 186, 324, 462, 462, 49, 139, 325, 649, 1111, 1573, 1573, 64, 203, 528, 1177, 2288, 3861, 5434, 5434, 81, 284, 812, 1989, 4277, 8138, 13572, 19006, 19006, 100, 384, 1196, 3185, 7462, 15600
Offset: 0

Author

Gerald McGarvey, Oct 03 2009

Keywords

Crossrefs

A070031 (main diagonal), A071736 (is 1, 3, then diagonal T(n, n-2))

Programs

  • PARI
    s=10;M=matrix(s,s);for(n=1,s,M[n,1]=n^2); for(n=2,s,for(k=2,n,M[n,k]=M[n,k-1]+M[n-1,k])); for(n=1,s,for(k=1,n,print1(M[n,k],", ")))

A165999 Triangle read by rows: T(0,0) = 1, T(n,k) = T(n-1,k-1) + T(n-1,k) for n > 0, 0 < k <= trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2), and entries outside triangle are 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 1, 4, 5, 1, 5, 9, 1, 6, 14, 9, 1, 7, 20, 23, 1, 8, 27, 43, 1, 9, 35, 70, 1, 10, 44, 105, 70, 1, 11, 54, 149, 175, 1, 12, 65, 203, 324, 1, 13, 77, 268, 527, 1, 14, 90, 345, 795, 1, 15, 104, 435, 1140, 795, 1, 16, 119, 539, 1575, 1935, 1, 17, 135, 658, 2114
Offset: 0

Author

Gerald McGarvey, Oct 03 2009

Keywords

Comments

There are trinv(n) terms in row n (see A002024). Related to A136730.

Examples

			Triangle begins: [1] [1, 1] [1, 2] [1, 3, 2] [1, 4, 5] [1, 5, 9] [1, 6, 14, 9] [1, 7, 20, 23] [1, 8, 27, 43] [1, 9, 35, 70] [1, 10, 44, 105, 70] [1, 11, 54, 149, 175] [1, 12, 65, 203, 324] [1, 13, 77, 268, 527] [1, 14, 90, 345, 795] [1, 15, 104, 435, 1140, 795]
		

Crossrefs

A101482 (diagonal T(A000217(n), n))

Programs

  • PARI
    trinv(n) = floor((1+sqrt(1+8*n))/2); f(n) = trinv(n-1); s=19;M=matrix(s,s);for(n=1,s,M[n,1]=1); for(n=2,s,for(k=2,f(n),M[n,k]=M[n-1,k-1]+M[n-1,k])); for(n=1,s,for(k=1,f(n),print1(M[n,k],", ")))

A166279 Triangle, read by rows: T(0,0) = 1, T(n,k) = T(n-1,k-1) (mod 2) + T(n-1,k) (mod 2), T(n,k) = 0 if k < 0 or k > n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 2, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 0, 0, 0, 0, 0, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1
Offset: 0

Author

Gerald McGarvey, Oct 10 2009

Keywords

Examples

			Triangle begins:
1,
1,1,
1,2,1,
1,1,1,1,
1,2,2,2,1,
1,1,0,0,1,1,
1,2,1,0,1,2,1,
1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,1,
1,1,0,0,0,0,0,0,1,1,
1,2,1,0,0,0,0,0,1,2,1,
1,1,1,1,0,0,0,0,1,1,1,1,
1,2,2,2,1,0,0,0,1,2,2,2,1,
1,1,0,0,1,1,0,0,1,1,0,0,1,1,
1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
		

Crossrefs

A007318 (Pascal's triangle), A047999 (Sierpinski's triangle, Pascal's triangle mod 2).

Programs

  • PARI
    p = 2; s = 13; T=matrix(s,s); T[1,1]=1; for(n=2,s,T[n,1]=1;for(k=2,n,T[n,k]=T[n-1,k-1]%p+T[n-1,k]%p)); for(n=1,s,for(k=1,n,print1(T[n,k],", ")))

A167293 Long legs of Pythagorean triangles that are not divisible by any other long leg of a Pythagorean triangle.

Original entry on oeis.org

4, 15, 21, 35, 55, 77, 91, 99, 117, 143, 153, 171, 187, 209, 221, 247, 253, 299, 323, 325, 377, 391, 403, 425, 437, 475, 493, 527, 551, 575, 589, 621, 629, 667, 697, 703, 713, 725, 775, 779, 783, 817, 837, 851, 899, 925, 943, 957, 989, 999, 1023, 1025, 1073
Offset: 1

Author

Gerald McGarvey, Nov 01 2009

Keywords

Comments

All long legs of Pythagorean triangles (A009023) are multiples of these values, so these values can be thought of as "primes" of the sequence of long legs.

Crossrefs

Programs

  • PARI
    llp = vector(60); np = 1; llp[np] = 4;
    notdiv(k) = for(j=1,np,if(k%llp[j],1,return(0)));return(1);
    isLongLeg(n) = local(b);b=0;for(k=1,n-1,if(issquare(k^2+n^2),b=1));return(b);
    for(k=4,1175,if(notdiv(k),if(isLongLeg(k),np+=1;llp[np]=k)))
    for(n=1,60,print1(llp[n],", "))

Extensions

Comments and PARI program corrected by Gerald McGarvey, Nov 03 2009

A167230 The matrix exponential of Sierpiński's triangle (A047999) scaled by exp(-1).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 2, 0, 1, 0, 1, 0, 1, 5, 2, 2, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 5, 2, 2, 1, 0, 0, 0, 0, 2, 1, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 1, 1
Offset: 0

Author

Gerald McGarvey, Oct 30 2009

Keywords

Comments

Conjecture: All the nonzero entries in this triangle are Bell numbers (A000110).

Examples

			Triangle begins:
1
1 1
1 0 1
2 1 1 1
1 0 0 0 1
2 1 0 0 1 1
2 0 1 0 1 0 1
5 2 2 1 2 1 1 1
1 0 0 0 0 0 0 0 1
2 1 0 0 0 0 0 0 1 1
2 0 1 0 0 0 0 0 1 0 1
5 2 2 1 0 0 0 0 2 1 1 1
2 0 0 0 1 0 0 0 1 0 0 0 1
5 2 0 0 2 1 0 0 2 1 0 0 1 1
		

Crossrefs

Programs

  • PARI
    matexp(M) = sum(k=0,99,1./k!*M^k); matexps(M) = matexp(M)/exp(1);
    matexpsb(M) = bestappr(matexps(M),9999);
    P = matpascal(13); S = matrix(14,14, n,k, P[n,k]%p);
    SS = matexpsb(S);
    for(n=1,14,for(k=1,n,print1(SS[n,k]," "));print(""))

A166282 Matrix inverse of Sierpinski's triangle (A047999, Pascal's triangle mod 2).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 0, 0, 0, 1, 1, -1, 0, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, -1, 0, 0, 0, 0, 0, -1, 0, 1, -1, 1, 1, -1, 0, 0, 0, 0, 1, -1, -1, 1, 1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 1
Offset: 0

Author

Gerald McGarvey, Oct 10 2009

Keywords

Comments

In absolute values equal to A047999. - M. F. Hasler, Jun 06 2016

Examples

			Triangle begins:
    1,
   -1, 1,
   -1, 0, 1,
    1,-1,-1, 1,
   -1, 0, 0, 0, 1,
    1,-1, 0, 0,-1, 1,
    1, 0,-1, 0,-1, 0, 1,
   -1, 1, 1,-1, 1,-1,-1, 1,
   -1, 0, 0, 0, 0, 0, 0, 0, 1,
    1,-1, 0, 0, 0, 0, 0, 0,-1, 1,
    1, 0,-1, 0, 0, 0, 0, 0,-1, 0, 1,
   -1, 1, 1,-1, 0, 0, 0, 0, 1,-1,-1, 1,
    1, 0, 0, 0,-1, 0, 0, 0,-1, 0, 0, 0, 1,
   ...
		

Crossrefs

Programs

  • PARI
    p=2; s=13; P=matpascal(s); PM=matrix(s+1,s+1,n,k,P[n,k]%p); IPM = 1/PM;
    for(n=1,s,for(k=1,n,print1(IPM[n,k],","));print())

A166280 Stirling2 triangle mod 2, T(n,k) = A008277(n,k) mod 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1
Offset: 0

Author

Gerald McGarvey, Oct 10 2009

Keywords

Examples

			Triangle begins:
1,
1,1,
1,1,1,
1,1,0,1,
1,1,1,0,1,
1,1,0,1,1,1,
1,1,1,0,0,1,1,
1,1,0,1,0,0,0,1,
1,1,1,0,1,0,0,0,1,
1,1,0,1,1,1,0,0,1,1,
1,1,1,0,0,1,1,0,1,1,1,
1,1,0,1,0,0,0,1,1,1,0,1,
1,1,1,0,1,0,0,0,0,1,1,0,1,
...
		

Crossrefs

Cf. A008277, A047999 (Sierpinski's triangle, Pascal's triangle mod 2).

Programs

  • PARI
    p = 2; s=14; S2T = matrix(s,s,n,k, if(k==1,1)); for(n=2,s,for(k=2,n, S2T[n,k]=k*S2T[n-1,k]+S2T[n-1,k-1]));
    S2TMP = matrix(s,s,n,k, S2T[n,k]%p);
    for(n=1,s,for(k=1,n,print1(S2TMP[n,k]," "));print())

A165997 Irregular triangle read by rows: T(0,0) = 1, T(n,k) = T(n,k-1) + T(n-1,k) for n > 0, 0 < k <= f(n), where f(n) = floor((2*n+3)/3), and entries outside triangle are 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 3, 5, 1, 4, 9, 9, 1, 5, 14, 23, 23, 1, 6, 20, 43, 66, 1, 7, 27, 70, 136, 136, 1, 8, 35, 105, 241, 377, 377, 1, 9, 44, 149, 390, 767, 1144, 1, 10, 54, 203, 593, 1360, 2504, 2504, 1, 11, 65, 268, 861, 2221, 4725, 7229, 7229, 1, 12, 77, 345, 1206
Offset: 0

Author

Gerald McGarvey, Oct 03 2009

Keywords

Comments

There are f(n) = floor((2*n+3)/3) = A004396(n+1) terms in row n.

Examples

			Triangle begins:
       k=0   1   2    3     4     5     6      7      8
  n=0:   1
  n=1:   1
  n=2:   1,  1
  n=3:   1,  2,  2
  n=4:   1,  3,  5
  n=5:   1,  4,  9,   9
  n=6:   1,  5, 14,  23,   23
  n=7:   1,  6, 20,  43,   66
  n=8:   1,  7, 27,  70,  136,  136
  n=9:   1,  8, 35, 105,  241,  377,  377
  n=10:  1,  9, 44, 149,  390,  767, 1144
  n=11:  1, 10, 54, 203,  593, 1360, 2504,  2504
  n=12:  1, 11, 65, 268,  861, 2221, 4725,  7229,  7229
  n=13:  1, 12, 77, 345, 1206, 3427, 8152, 15381, 22610
  ...
		

Crossrefs

Cf. A004396 (row lengths).
Cf. A060941 (diagonal T(3*n, 2*n)).

Programs

  • PARI
    f(n) = floor((2*(n-1)+3)/3); s=14; M=matrix(s,s); for(n=1,s,M[n,1]=1); for(n=2,s,for(k=2,f(n),M[n,k]=M[n,k-1]+M[n-1,k])); for(n=1,s,for(k=1,f(n),print1(M[n,k],", ")))

A166106 a(n) = a(n-1) + a(n-2) + F(n), with a(0) = 0, a(1) = 1, a(2) = a(1) + a(0), a(3) = a(2) + a(1), a(4) = a(3) + a(2) + 2.

Original entry on oeis.org

0, 1, 1, 2, 5, 12, 25, 50, 96, 180, 331, 600, 1075, 1908, 3360, 5878, 10225, 17700, 30509, 52390, 89664, 153000, 260375, 442032, 748775, 1265832, 2136000, 3598250, 6052061, 10164540, 17048641, 28559450, 47786400, 79870428, 133359715, 222457608, 370747675
Offset: 0

Author

Gerald McGarvey, Oct 06 2009

Keywords

Comments

Consider the recursive call tree for Fibonacci numbers shown in the Wilson, Abelson et al., and Bloch links. This type of tree is a variant of Fibonacci trees shown/defined elsewhere. Here, let us refer it as a recursive Fibonacci tree. A Fibonacci number F(n) is the weight of the root of a weighted recursive Fibonacci tree of order n in which the leafs have a weight of 1, and the weight of a node equals the sum of the weights of its two children. If instead we weight each leaf by the number of nodes above it (considering the root as the topmost node), then for n > 2, a(n) is the weight of the root of such a weighted tree of order n. For example, a(5) = 2+2+2+3+3.

Crossrefs

Cf. A000045.

Programs

  • Mathematica
    a[n_] := a[n] = a[n-1] + a[n-2] + Fibonacci[n]; a[0] = 0; a[1] = 1; a[2] = 1; a[3] = 2; a[4] = 5; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Oct 03 2011 *)
  • PARI
    s = 33; a = concat([0,1,1,2,5],vector(s-5)); for(n=6,s,a[n]=a[n-1]+a[n-2]+fibonacci(n)); for(n=1,s,print1(a[n],", "))
    
  • PARI
    concat(0, Vec(x*(x^5+3*x^4+2*x^3-x^2-x+1)/(x^2+x-1)^2 + O(x^100))) \\ Colin Barker, May 25 2014

Formula

For n > 1, a(n) = A067331(n-2).
From Colin Barker, May 25 2014: (Start)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) for n > 6.
G.f.: x*(x^5 + 3*x^4 + 2*x^3 - x^2 - x + 1) / (x^2+x-1)^2. (End)
a(n) = (1/25)*2^(-n-1)*(5*((1 - sqrt(5))^(n+1) + (1 + sqrt(5))^(n+1))*n - (25 + sqrt(5))*(1 + sqrt(5))^n + (sqrt(5) - 25)*(1 - sqrt(5))^n), n > 2. - Ilya Gutkovskiy, Apr 26 2016

Extensions

More terms from Colin Barker, May 25 2014