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

A125714 Alfred Moessner's factorial triangle.

Original entry on oeis.org

1, 2, 3, 6, 11, 6, 24, 50, 35, 10, 120, 274, 225, 85, 15, 720, 1764, 1624, 735, 175, 21, 5040, 13068, 13132, 6769, 1960, 322, 28, 40320, 109584, 118124, 67284, 22449, 4536, 546, 36, 362880, 1026576, 1172700, 723680, 269325, 63273, 9450, 870, 45, 3628800
Offset: 1

Views

Author

Gary W. Adamson, Dec 01 2006

Keywords

Comments

Successive numbers arising from the Moessner construction of the factorial numbers. - N. J. A. Sloane, Jul 27 2021
Row sums of the triangle = 1, 5, 23, 119, 719, ...(matching the terms 0, 0, 1, 5, 23, 119, 719, ...; of A033312).
The name of the triangle derives from the fact that A125714(A000124(n)) = A000142(n) for n > 0. Moessner's method uses only additions to compute the factorial n!. - Peter Luschny, Jan 27 2009
If n = (m^2+m+2)/2 then a(n) = (m+1)!. For example, taking m = 3, n = 7, and indeed a(7) = 4! = 24. - N. J. A. Sloane, Jul 27 2021

Examples

			An "x" prefaced before each term will indicate the term following the x being circled.
x1 2 x3 4 5 x6 7 8 9 x10 11 12 13 14 x15 ...
__x2 6 x11 18 26 x35 46 58 71 x85 ...
_____________x6 24 x50 96 154 x225 ...
_________________________x24 120 x274 ...
___________________________________________x120 ...
...
i.e., circle the triangular terms in row 1. In row 2, take partial sums of the uncircled terms and circle the terms offset one place to the left of the triangular terms in row 1. Continue in subsequent rows with analogous operations. The triangle consists of the infinite set of terms prefaced with the x (circled on page 64 of "The Book of Numbers").
		

References

  • J. H. Conway and R. K. Guy, "The Book of Numbers", Springer-Verlag, 1996. Sequence can be seen by reading the successive circled numbers in the "factorial" section on page 64 (based on the work of Alfred Moessner).

Crossrefs

Programs

  • Maple
    a := proc(n) local s,m,k,i; s := array(0..n); s[0] := 1;
    for m from 1 to n do s[m] := 0; for k from m by - 1 to 1 do
    for i from 1 to k do s[i] := s[i] + s[i - 1] od; lprint(s[k]);
    if k = n then return(s[n]) fi od; lprint("-") od end: # Peter Luschny, Jan 27 2009
    with(combinat);
    s:=stirling1;
    A003056 := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc:
    T:=n->n*(n+1)/2; # A000217
    g:=proc(n) local i,j,t; global T,A003056;
    j:=A003056(n-1)+1;
    t:=T(j);
    for i from 0 to t-1 do
    if ((n+i) mod t) = 0 then return(abs(s(j+1,j-i))); fi;
    od;
    end;
    [seq(g(n),n=1..80)]; # N. J. A. Sloane, Jul 27 2021
  • Mathematica
    n = 10; A125714 = Reap[ ClearAll[s]; s[0] = 1; For[m = 1, m <= n, m++, s[m] = 0; For[k = m, k >= 1, k--, For[i = 1, i <= k, i++, s[i] = s[i] + s[i-1]]; Sow[s[k]]; If[k == n, Print[n, "! = ", s[n]]; Break[]]]]][[2, 1]] (* Jean-François Alcover, Jun 29 2012, after Peter Luschny *)
  • PARI
    T(n, k)={ my( s=vector(n)); for( m=1, n, forstep( j=m,1,-1, s[1]++; for( i=2, j, s[i] += s[i-1]));
    k<0 && print(vecextract(s,Str(m"..1"))));
    if( k>0,s[n+1-k],vecextract(s,"-1..1"))} /* returns T[n,k], or the whole n-th row if k is not given, prints row 1...n of the triangle if k<0 */ \\ M. F. Hasler, Dec 03 2010

Formula

Starting with the natural numbers, circle each triangular number. Underneath, take partial sums of the uncircled terms and circle the terms in this row which are offset one place to the left of the circled 1, 3, 6, 10, ... in the first row. Repeat with analogous operations in succeeding rows. The circled terms in the infinite set become the triangle.
Given n, let j = A003056(n-1)+1 and set t = j*(j+1)/2. Then, for 0 <= i < t, if n == -i (mod t), a(n) = abs(Stirling_1(j+1,j-i)). - N. J. A. Sloane, Jul 27 2021

Extensions

More terms from Joshua Zucker, Jun 17 2007

A346004 If n even then n otherwise ((n+1)/2)^2.

Original entry on oeis.org

0, 1, 2, 4, 4, 9, 6, 16, 8, 25, 10, 36, 12, 49, 14, 64, 16, 81, 18, 100, 20, 121, 22, 144, 24, 169, 26, 196, 28, 225, 30, 256, 32, 289, 34, 324, 36, 361, 38, 400, 40, 441, 42, 484, 44, 529, 46, 576, 48, 625, 50, 676, 52, 729, 54, 784, 56, 841, 58, 900, 60, 961, 62, 1024, 64, 1089
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2021

Keywords

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. Sequence can be seen in the circled numbers at foot of page 63.

Crossrefs

Programs

  • Mathematica
    A346004[n_] := If[OddQ[n], (n+1)^2/4, n]; Array[A346004, 100, 0] (* or *)
    Riffle[#-2, #^2/4] & [Range[2, 100, 2]] (* Paolo Xausa, Aug 28 2024 *)
  • Python
    def A346004(n): return ((n+1)//2)**2 if n % 2 else n # Chai Wah Wu, Jul 25 2021

Formula

G.f.: x*(-1-2*x-x^2+2*x^3) / ( (x-1)^3*(1+x)^3 ). - R. J. Mathar, Aug 05 2021
a(n) = ((n^2 + 6*n + 1) - (n-1)^2*(-1)^n)/8. - Aaron J Grech, Aug 27 2024

A346005 Successive numbers arising from the Moessner construction of the cubes on page 64 of Conway-Guy's "Book of Numbers".

Original entry on oeis.org

0, 1, 3, 3, 8, 12, 6, 27, 27, 9, 64, 48, 12, 125, 75, 15, 216, 108, 18, 343, 147, 21, 512, 192, 24, 729, 243, 27, 1000, 300, 30, 1331, 363, 33, 1728, 432, 36, 2197, 507, 39, 2744, 588, 42, 3375, 675, 45, 4096, 768, 48, 4913, 867, 51, 5832, 972, 54, 6859, 1083, 57, 8000, 1200
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2021

Keywords

Comments

a(3*k+1) = (k+1)^3 for k >= 0.

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. Sequence can be seen in the successive circled numbers at the top of page 64.

Crossrefs

Programs

  • Maple
    f:=proc(n) if (n mod 3) = 0 then n
    elif (n mod 3) = 1 then ((n+2)/3)^3;
    else (n+1)^2/3; fi; end;
    [seq(f(n),n=0..100)];
  • Python
    def A346005(n): return n if n % 3 == 0 else ((n+2)//3)**3 if n % 3 == 1 else (n+1)**2//3 # Chai Wah Wu, Jul 25 2021

Formula

a(n) = n if n mod 3 = 0, = ((n+2)/3)^3 if n mod 3 = 1, and otherwise (n+1)^2/3.

A346007 Let b=5. If n == -i (mod b) for 0 <= i < b, then a(n) = binomial(b,i+1)*((n+i)/b)^(i+1).

Original entry on oeis.org

0, 1, 5, 10, 10, 5, 32, 80, 80, 40, 10, 243, 405, 270, 90, 15, 1024, 1280, 640, 160, 20, 3125, 3125, 1250, 250, 25, 7776, 6480, 2160, 360, 30, 16807, 12005, 3430, 490, 35, 32768, 20480, 5120, 640, 40, 59049, 32805, 7290, 810, 45, 100000, 50000, 10000, 1000, 50
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2021

Keywords

Comments

These are the numbers that would arise if the Moessner construction on page 64 of Conway-Guy's "Book of Numbers" were extended to the fifth powers.

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. See pp. 63-64.

Crossrefs

Setting b = 2, 3, or 4 gives A346004, A346005, and A346006.

Programs

  • Maple
    f:=proc(n,b) local i;
    for i from 0 to b-1 do
    if ((n+i) mod b) = 0 then return(binomial(b,i+1)*((n+i)/b)^(i+1)); fi;
    od;
    end;
    [seq(f(n,5),n=0..80)];
  • Python
    from sympy import binomial
    def A346007(n):
        i = (5-n)%5
        return binomial(5,i+1)*((n+i)//5)**(i+1) # Chai Wah Wu, Jul 25 2021

A346006 Successive numbers arising from the Moessner construction of the sequence of fourth powers on page 64 of Conway-Guy's "Book of Numbers".

Original entry on oeis.org

0, 1, 4, 6, 4, 16, 32, 24, 8, 81, 108, 54, 12, 256, 256, 96, 16, 625, 500, 150, 20, 1296, 864, 216, 24, 2401, 1372, 294, 28, 4096, 2048, 384, 32, 6561, 2916, 486, 36, 10000, 4000, 600, 40, 14641, 5324, 726, 44, 20736, 6912, 864, 48, 28561, 8788, 1014, 52, 38416, 10976, 1176, 56, 50625, 13500, 1350, 60
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2021

Keywords

Comments

a(4*k+1) = (k+1)^2 for k >= 0.

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. Sequence can be obtained by reading the successive circled numbers in the second display on page 64.

Crossrefs

Programs

  • Maple
    f:=proc(n,b) local i;
    for i from 0 to b-1 do
    if ((n+i) mod b) = 0 then return(binomial(b,i+1)*((n+i)/b)^(i+1)); fi;
    od;
    end;
    [seq(f(n,3),n=0..60)];
  • Python
    from sympy import binomial
    def A346006(n):
        i = (4-n)%4
        return binomial(4,i+1)*((n+i)//4)**(i+1) # Chai Wah Wu, Jul 25 2021

Formula

Let b=4. If n == -i (mod b) for 0 <= i < b, then a(n) = binomial(b,i+1)*((n+i)/b)^(i+1).
Showing 1-5 of 5 results.