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.
%I A107241 #19 Feb 16 2025 08:32:57 %S A107241 1,2,3,4,20,69,238,863,3264,12100,44861,166662,619591,2301800,8551800, %T A107241 31774561,118060082,438649107,1629796276,6055504952,22499207241, %U A107241 83595676570,310599326171,1154030334396,4287794153932,15931278338957 %N A107241 Sum of squares of first n tetranacci numbers (A000288). %C A107241 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). %H A107241 Harvey P. Dale, <a href="/A107241/b107241.txt">Table of n, a(n) for n = 1..1000</a> %H A107241 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Fibonaccin-StepNumber.html">Fibonacci n-Step Number.</a> %H A107241 <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (3,2,2,6,-16,-2,6,-2,2,1,-1). %F A107241 a(n) = Sum_{i=1..n} A000288(i)^2. %F A107241 From _R. J. Mathar_, Aug 11 2009: (Start) %F A107241 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). %F A107241 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) %e A107241 a(1) = 1^2 = 1. %e A107241 a(2) = 1^2 + 1^2 = 1. %e A107241 a(3) = 1^2 + 1^2 + 1^2 = 3, prime. %e A107241 a(4) = 1^2 + 1^2 + 1^2 + 1^2 = 4 = 2^2, semiprime. %e A107241 a(5) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 = 20. %e A107241 a(6) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 = 69 = 3 * 23, semiprime. %e A107241 a(8) = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 7^2 + 13^2 + 25^2 = 863, prime. %p A107241 T:= proc(n) option remember; %p A107241 if n=0 then 0 %p A107241 elif n<5 then 1 %p A107241 else add(T(n-j), j=1..4) %p A107241 fi; end: %p A107241 seq( add(T(k)^2, k=1..n), n=1..30); # _G. C. Greubel_, Dec 18 2019 %t A107241 Accumulate[LinearRecurrence[{1,1,1,1},{1,1,1,1},30]^2] (* _Harvey P. Dale_, Feb 14 2012 *) %t A107241 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 A107241 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 *) %o A107241 (Sage) %o A107241 @CachedFunction %o A107241 def T(n): %o A107241 if (n==0): return 0 %o A107241 elif (n<5): return 1 %o A107241 else: return sum(T(n-j) for j in (1..4)) %o A107241 def a(n): return sum(T(j)^2 for j in (1..n)) %o A107241 [a(n) for n in (1..30)] # _G. C. Greubel_, Dec 18 2019 %Y A107241 Cf. A000288, A107239, A107240, A107241, A107242, A107243, A107244, A107245, A107246, A107247, A107248. %K A107241 easy,nonn %O A107241 1,2 %A A107241 _Jonathan Vos Post_, May 14 2005