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

A008301 Poupard's triangle: triangle of numbers arising in enumeration of binary trees.

Original entry on oeis.org

1, 1, 2, 1, 4, 8, 10, 8, 4, 34, 68, 94, 104, 94, 68, 34, 496, 992, 1420, 1712, 1816, 1712, 1420, 992, 496, 11056, 22112, 32176, 40256, 45496, 47312, 45496, 40256, 32176, 22112, 11056, 349504, 699008, 1026400, 1309568, 1528384, 1666688, 1714000
Offset: 0

Views

Author

Keywords

Comments

The doubloon polynomials evaluated at q=1. [Note the error in (D1) of the Foata-Han article in the Ramanujan journal which should read d_{1,j}(q) = delta_{2,j}.] - R. J. Mathar, Jan 27 2011
T(n,k), 0 <= k <= 2n-2, is the number of increasing 0-2 trees on vertices [0,2n] in which the parent of 2n is k (Poupard). A little more generally, for fixed m in [k+1,2n], T(n,k) is the number of trees in which m is a leaf with parent k. (The case m=2n is Poupard's result.) T(n,k) is the number of increasing 0-2 trees on vertices [0,2n] in which the minimal path from the root ends at k+1 (Poupard). - David Callan, Aug 23 2011

Examples

			[1],
[1, 2, 1],
[4, 8, 10, 8, 4],
[34, 68, 94, 104, 94, 68, 34],
[496, 992, 1420, 1712, 1816, 1712, 1420, 992, 496],
[11056, 22112, 32176, 40256, 45496, 47312, 45496, 40256, 32176, 22112, 11056],
[349504, 699008, 1026400, 1309568, 1528384, 1666688, 1714000, 1666688, 1528384, 1309568, 1026400, 699008, 349504], ...
		

Crossrefs

Cf. A107652. Leading diagonal and row sums = A002105.
Cf. A210108 (left half).

Programs

  • Haskell
    a008301 n k = a008301_tabf !! n !! k
    a008301_row n = a008301_tabf !! n
    a008301_tabf = iterate f [1] where
       f zs = zs' ++ tail (reverse zs') where
         zs' = (sum zs) : h (0 : take (length zs `div` 2) zs) (sum zs) 0
         h []        = []
         h (x:xs) y' y = y'' : h xs y'' y' where y'' = 2*y' - 2*x - y
    -- Reinhard Zumkeller, Mar 17 2012
  • Maple
    doubloon := proc(n,j,q) option remember; if n = 1 then if j=2 then 1; else 0; end if; elif j >= 2*n+1 or ( n>=1 and j<=1 ) then 0 ; elif j=2 and n>=1 then add(q^(k-1)*procname(n-1,k,q),k=1..2*n-2) ; elif n>=2 and 3<=j and j<=2*n then 2*procname(n,j-1,q)-procname(n,j-2,q)-(1-q)*add( q^(n+i+1-j)*procname(n-1,i,q),i=1..j-3) - (1+q^(n-1))*procname(n-1,j-2,q)+(1-q)*add(q^(i-j+1)*procname(n-1,i,q),i=j-1..2*n-1) ; else error; end if; expand(%) ; end proc:
    A008301 := proc(n,k) doubloon(n+1,k+2,1) ; end proc:
    seq(seq(A008301(n,k),k=0..2*n),n=0..12) ; # R. J. Mathar, Jan 27 2011
    # Second program based on the Poupard numbers g_n(k) (A236934).
    T := proc(n,k) option remember; local j;
      if n = 1 then 1
    elif k = 1 then 0
    elif k = 2 then 2*add(T(n-1, j), j=1..2*n-3)
    elif k > n then T(n, 2*n-k)
    else 2*T(n, k-1)-T(n, k-2)-4*T(n-1, k-2)
      fi end:
    A008301 := (n,k) -> T(n+1,k+1)/2^n;
    seq(print(seq(A008301(n,k), k=1..2*n-1)), n=1..6); # Peter Luschny, May 12 2014
  • Mathematica
    doubloon[1, 2, q_] = 1; doubloon[1, j_, q_] = 0; doubloon[n_, j_, q_] /; j >= 2n+1 || n >= 1 && j <= 1 = 0; doubloon[n_ /; n >= 1, 2, q_] := doubloon[n, 2, q] = Sum[ q^(k-1)*doubloon[n-1, k, q], {k, 1, 2n-2}]; doubloon[n_, j_, q_] /; n >= 2 <= j && j <= 2n := doubloon[n, j, q] = 2*doubloon[n, j-1, q] - doubloon[n, j-2, q] - (1-q)*Sum[ q^(n+i+1-j)*doubloon[n-1, i, q], {i, 1, j-3}] - (1 + q^(n-1))*doubloon[n-1, j-2, q] + (1-q)* Sum[ q^(i-j+1)*doubloon[n-1, i, q], {i, j-1, 2n-1}]; A008301[n_,k_] := doubloon[n+1, k+2, 1]; Flatten[ Table[ A008301[n, k], {n, 0, 6}, {k, 0, 2n}]] (* Jean-François Alcover, Jan 23 2012, after R. J. Mathar *)
    T[n_, k_] := T[n, k] = Which[n==1, 1, k==1, 0, k==2, 2*Sum[T[n-1, j], {j, 1, 2*n-3}], k>n, T[n, 2*n-k], True, 2*T[n, k-1] - T[n, k-2] - 4*T[n-1, k - 2]]; A008301[n_, k_] := T[n+1, k+1]/2^n; Table[A008301[n, k], {n, 1, 6}, {k, 1, 2*n-1}] // Flatten (* Jean-François Alcover, Nov 28 2015, after Peter Luschny *)

Formula

Recurrence relations are given on p. 370 of the Poupard paper; however, in line -5 the summation index should be k and in line -4 the expression 2_h^{k-1} should be replaced by 2d_h^(k-1). - Emeric Deutsch, May 03 2004
If we write the triangle like this:
0, 1, 0
0, 1, 2, 1, 0
0, 4, 8, 10, 8, 4, 0
0, 34, 68, 94, 104, 94, 68, 34, 0
then the first nonzero term is the sum of the previous row and the remaining terms in each row are obtained by the rule illustrated by 104 = 2*94 - 2*8 - 1*68. - N. J. A. Sloane, Jun 10 2005
Continuing Sloane's remark: If we also set the line "... 1 ..." on the top of the pyramid, then we obtain T(n,k) = A236934(n+1,k+1)/2^n for n >= 1 and 1 <= k <= 2n-1 (see the second Maple program). - Peter Luschny, May 12 2014

Extensions

More terms from Emeric Deutsch, May 03 2004

A107651 Numbers n such that phi(sigma(n)) + phi(phi(n)) = n.

Original entry on oeis.org

3, 28, 108, 2352, 2544, 7936, 13632, 26736, 209904, 256608, 1394112, 2052864, 2169456, 2490864, 11942400, 18884416, 258072480, 415272960, 2064579840, 3737456640, 3963371520, 4672512000
Offset: 1

Views

Author

Farideh Firoozbakht, May 26 2005

Keywords

Comments

If both (3^n-1)/2 and 2*3^n-1 are prime then 48*(2*3^n-1) is in the sequence (the proof is easy). So if n is in the intersection of A028491 and A003307 then 48*(2*3^n-1) is in this sequence. Conjecture: There exist only two such terms, namely 2544 and 209904.
If both (3^n*31-1)/2 and 2*3^n*31-1 are prime then 48*(2*3^n*31-1) is in the sequence (the proof is easy). Conjecture: There exist only three such terms, namely 26736, 2169456, and 26376103844085843261484656.

Examples

			18884416 is in the sequence because phi(sigma(18884416)) + phi(phi(18884416)) = 18884416.
		

Crossrefs

Programs

  • Mathematica
    Do[If[n == EulerPhi[DivisorSigma[1, n]] + EulerPhi[EulerPhi[n]], Print[n] ], {n, 10000000}]
  • PARI
    is(n)=eulerphi(sigma(n))+eulerphi(eulerphi(n))==n \\ Charles R Greathouse IV, Mar 06 2013

Extensions

a(17)-a(22) from Donovan Johnson, Mar 06 2013
Showing 1-2 of 2 results.