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

A107239 Sum of squares of tribonacci numbers (A000073).

Original entry on oeis.org

0, 0, 1, 2, 6, 22, 71, 240, 816, 2752, 9313, 31514, 106590, 360606, 1219935, 4126960, 13961456, 47231280, 159782161, 540539330, 1828631430, 6186215574, 20927817799, 70798300288, 239508933824, 810252920400, 2741065994769, 9272959837818, 31370198430718
Offset: 0

Views

Author

Jonathan Vos Post, May 17 2005

Keywords

Examples

			a(7) = 71 = 0^2 + 0^2 + 1^2 + 1^2 + 2^2 + 4^2 + 7^2
		

References

  • R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0,0] cat Coefficients(R!( x^2*(1-x-x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)*(1-x)) )); // G. C. Greubel, Nov 20 2021
    
  • Maple
    b:= proc(n) option remember; `if`(n<3, [n*(n-1)/2$2],
         (t-> [t, t^2+b(n-1)[2]])(add(b(n-j)[1], j=1..3)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 22 2021
  • Mathematica
    Accumulate[LinearRecurrence[{1,1,1},{0,0,1},30]^2] (* Harvey P. Dale, Sep 11 2011 *)
    LinearRecurrence[{3,1,3,-7,1,-1,1}, {0,0,1,2,6,22,71}, 30] (* Ray Chandler, Aug 02 2015 *)
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A107231(n): return sum(T(j)^2 for j in (0..n))
    [A107239(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021

Formula

a(n) = T(0)^2 + T(1)^2 + ... + T(n)^2 where T(n) = A000073(n).
From R. J. Mathar, Aug 19 2008: (Start)
a(n) = Sum_{i=0..n} A085697(i).
G.f.: x^2*(1-x-x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)*(1-x)). (End)
a(n+1) = A000073(n)*A000073(n+1) + ( (A000073(n+1) - A000073(n-1))^2 - 1 )/4 for n>0 [Jakubczyk]. - R. J. Mathar, Dec 19 2013

A107243 Sum of squares of pentanacci numbers (A001591).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 6, 22, 86, 342, 1303, 5024, 19424, 75120, 290416, 1122160, 4337009, 16762634, 64787534, 250400910, 967783566, 3740437902, 14456621263, 55874162432, 215950971648, 834640190272, 3225844698176, 12467736540480
Offset: 0

Views

Author

Jonathan Vos Post, May 19 2005

Keywords

Examples

			a(0) = 0 = 0^2 since F_5(0) = A001591(0) = 0.
a(1) = 0 = 0^2 + 0^2
a(2) = 0 = 0^2 + 0^2 + 0^2
a(3) = 0 = 0^2 + 0^2 + 0^2 + 0^2
a(4) = 1 = 0^2 + 0^2 + 0^2 + 0^2 + 1^2
a(5) = 2 = 0^2 + 0^2 + 0^2 + 0^2 + 1^2 + 1^2
a(6) = 6 = 0^2 + 0^2 + 0^2 + 0^2 + 1^2 + 1^2 + 2^2
a(7) = 22 = 0^2 + 0^2 + 0^2 + 0^2 + 1^2 + 1^2 + 2^2 + 4^2
a(8) = 86 = 8^2 + 22
a(9) = 342 = 16^2 + 86
		

Crossrefs

Programs

  • Mathematica
    Accumulate[LinearRecurrence[{1,1,1,1,1},{0,0,0,0,1},30]^2] (* Harvey P. Dale, Jan 04 2015 *)
    LinearRecurrence[{3, 2, 3, 7, 14, -32, -2, 6, -4, -6, 10, 1, -1, 0, 1, -1},{0, 0, 0, 0, 1, 2, 6, 22, 86, 342, 1303, 5024, 19424, 75120, 290416, 1122160},28] (* Ray Chandler, Aug 02 2015 *)

Formula

a(n) = F_5(1)^2 + F_5(1)^2 + F_5(2)^2 + ... F_5(n)^2 where F_5(n) = A001591(n). a(0) = 0, a(n+1) = a(n) + A001591(n)^2.
a(n)= 3*a(n-1) +2*a(n-2) +3*a(n-3) +7*a(n-4) +14*a(n-5) -32*a(n-6) -2*a(n-7) +6*a(n-8) -4*a(n-9) -6*a(n-10) +10*a(n-11) +a(n-12) -a(n-13) +a(n-15) -a(n-16). [R. J. Mathar, Aug 11 2009]
G.f.: x^4*(x^10 +x^9 +x^7 +x^6 -6*x^5 -5*x^4 -3*x^3 -2*x^2 -x +1) / ((x -1)*(x^5 +x^4 +x^3 +3*x^2 +3*x -1)*(x^10 -x^9 -x^7 +x^6 -6*x^5 +3*x^4 +3*x^3 +2*x^2 +x +1)). - Colin Barker, May 08 2013

Extensions

a(26) and a(27) corrected by R. J. Mathar, Aug 11 2009

A107241 Sum of squares of first n tetranacci numbers (A000288).

Original entry on oeis.org

1, 2, 3, 4, 20, 69, 238, 863, 3264, 12100, 44861, 166662, 619591, 2301800, 8551800, 31774561, 118060082, 438649107, 1629796276, 6055504952, 22499207241, 83595676570, 310599326171, 1154030334396, 4287794153932, 15931278338957
Offset: 1

Views

Author

Jonathan Vos Post, May 14 2005

Keywords

Comments

Tetranacci numbers are also called Fibonacci 4-step numbers. a(n) is prime for n = 2, 3, 8, 26, ... a(n) is semiprime for n = 4, 6, 11, 13, ... a(10) = 12100 = 94^2 + 3264 = 110^2 = 2^2 * 5^2 * 11^2. For Fibonacci numbers (A000045) F(i) we have Sum_{i=1..n} F(i) = F(n)*F(n+1).

Examples

			a(1) = 1^2 = 1.
a(2) = 1^2 + 1^2 = 1.
a(3) = 1^2 + 1^2 + 1^2 = 3, prime.
a(4) = 1^2 + 1^2 + 1^2 + 1^2 = 4 = 2^2, semiprime.
a(5) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 = 20.
a(6) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 = 69 = 3 * 23, semiprime.
a(8) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 + 13^2 + 25^2 = 863, prime.
		

Crossrefs

Programs

  • Maple
    T:= proc(n) option remember;
          if n=0 then 0
        elif n<5 then 1
        else add(T(n-j), j=1..4)
          fi; end:
    seq( add(T(k)^2, k=1..n), n=1..30); # G. C. Greubel, Dec 18 2019
  • Mathematica
    Accumulate[LinearRecurrence[{1,1,1,1},{1,1,1,1},30]^2] (* Harvey P. Dale, Feb 14 2012 *)
    LinearRecurrence[{3,2,2,6,-16,-2,6,-2,2,1,-1}, {1,2,3,4,20,69,238,863,3264, 12100,44861}, 30] (* Ray Chandler, Aug 02 2015 *)
    T[n_]:= T[n]= If[n == 0, 0, If[n < 5, 1, Sum[T[n-j], {j,4}]]]; a[n_]:= Sum[T[j]^2, {j,n}]; Table[a[n], {n, 30}] (* G. C. Greubel, Dec 18 2019 *)
  • Sage
    @CachedFunction
    def T(n):
        if (n==0): return 0
        elif (n<5): return 1
        else: return sum(T(n-j) for j in (1..4))
    def a(n): return sum(T(j)^2 for j in (1..n))
    [a(n) for n in (1..30)] # G. C. Greubel, Dec 18 2019

Formula

a(n) = Sum_{i=1..n} A000288(i)^2.
From R. J. Mathar, Aug 11 2009: (Start)
a(n) = 3*a(n-1) + 2*a(n-2) + 2*a(n-3) + 6*a(n-4) - 16*a(n-5) - 2*a(n-6) + 6*a(n-7) - 2*a(n-8) + 2*a(n-9) + a(n-10) - a(n-11).
G.f.: (1 - x - 5*x^2 - 11*x^3 - 8*x^4 - x^5 - x^6 - 7*x^7 + x^8 + 4*x^9)/((1 - x)*(1 - 3*x - 3*x^2 + x^3 + x^4)(1 + x + 2*x^2 + 2*x^3 - 2*x^4 + x^5 - x^6)). (End)
Showing 1-3 of 3 results.