login
Integers of the form c(n)/b(n) where c(n+1)=c(n)+(n+1)^4 with c(0)=1 and b(n+1)=b(n)+(n+1)^2 with b(0)=1.
11

%I #19 Mar 17 2023 11:23:38

%S 1,7,25,43,79,109,163,205,277,331,421,487,595,673,799,889,1033,1135,

%T 1297,1411,1591,1717,1915,2053,2269,2419,2653,2815,3067,3241,3511,

%U 3697,3985,4183,4489,4699,5023,5245,5587,5821,6181,6427,6805,7063,7459,7729

%N Integers of the form c(n)/b(n) where c(n+1)=c(n)+(n+1)^4 with c(0)=1 and b(n+1)=b(n)+(n+1)^2 with b(0)=1.

%C The sequence is the union of A134153 and A134154 (without the first term of A134154): A134153(0)=1, A134154(1)=7, A134153(1)=25, A134154(2)=43, A134153(2)=79 and so on.

%H Vincenzo Librandi, <a href="/A119617/b119617.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).

%F From _Bruno Berselli_, Jun 27 2011: (Start)

%F G.f.: x*(1+6*x+16*x^2+6*x^3+x^4)/((1+x)^2*(1-x)^3).

%F a(n) = (30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8. (End)

%e c(0)/b(0) = 1/1 =1.

%e c(3)/b(3) = (1+2^4+3^4)/(1+2^2+3^2)= (1+16+81)/(1+4+9) = 98/14 = 7.

%p P:=proc(n) local f,i,j,nu,de; nu:=0; de:=0; for i from 1 by 1 to n do nu:=nu+i^4; de:=de+i^2; f:=nu/de; if trunc(f)=f then print(f); fi; od; end: P(1000);

%t LinearRecurrence[{1,2,-2,-1,1},{1,7,25,43,79},50] (* _Harvey P. Dale_, Jan 21 2017 *)

%o From _Bruno Berselli_, Jun 27 2011: (Start)

%o (Magma) [(30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8: n in [1..46]];

%o (PARI) for(n=1,46, print1((30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8", "));

%o (Maxima) makelist((30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8,n,1,46); (End)

%Y Cf. A000538, A000330.

%K easy,nonn

%O 1,2

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Jun 06 2006