login
Numbers n such that 3*n+1 and 4*n+1 are both squares.
4

%I #36 Mar 04 2016 02:35:06

%S 0,56,10920,2118480,410974256,79726887240,15466605150360,

%T 3000441672282656,582070217817684960,112918621814958599640,

%U 21905630561884150645256,4249579410383710266580080,824396499983877907565890320,159928671417461930357516142056

%N Numbers n such that 3*n+1 and 4*n+1 are both squares.

%H Colin Barker, <a href="/A059989/b059989.txt">Table of n, a(n) for n = 1..400</a>

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

%F a(n) = (A001570(n)^2 - 1)/3.

%F G.f.: 56*x^2 / (1-195*x+195*x^2-x^3).

%F From _Colin Barker_, Mar 03 2016: (Start)

%F a(n) = 195*a(n-1)-195*a(n-2)+a(n-3) for n>3.

%F a(n) = (-1)*((97+56*sqrt(3))^(-n)*(-1+(97+56*sqrt(3))^n)*(7+4*sqrt(3)+(-7+4*sqrt(3))*(97+56*sqrt(3))^n))/48.

%F (End)

%e 3*56+1=13^2 and 4*56+1=15^2.

%p f:= proc(n) local u;

%p u:= <<7,8>|<6,7>>^n . <1,-1>;

%p (u[1]^2-1)/3

%p end proc:

%p map(f, [$1..30]); # _Robert Israel_, Mar 03 2016

%t CoefficientList[Series[56 x/(1 - 195 x + 195 x^2 - x^3), {x, 0, 13}], x] (* _Michael De Vlieger_, Mar 03 2016 *)

%o (PARI) isok(n) = issquare(3*n+1) && issquare(4*n+1) \\ _Michel Marcus_, Jun 08 2013

%o (PARI) concat(0, Vec(56*x^2/((1-x)*(1-194*x+x^2)) + O(x^20))) \\ _Colin Barker_, Mar 03 2016

%Y Cf. A245031.

%K nonn,easy

%O 1,2

%A _David Radcliffe_, Mar 07 2001

%E Offset changed to 1 by _Joerg Arndt_, Mar 03 2016