A076114
a(n) = start of the smallest string of n consecutive positive integers with a square sum, or 0 if no such number exists.
Original entry on oeis.org
1, 4, 2, 0, 3, 11, 4, 1, 5, 18, 6, 0, 7, 25, 8, 0, 9, 4, 10, 0, 11, 39, 12, 2, 4, 46, 14, 0, 15, 53, 16, 9, 17, 60, 18, 0, 19, 67, 20, 3, 21, 74, 22, 0, 23, 81, 24, 0, 1, 16, 26, 0, 27, 11, 28, 4, 29, 102, 30, 0, 31, 109, 32, 0, 33, 116, 34, 0, 35, 123, 36, 5, 37, 130, 11, 0, 39
Offset: 1
a(2) = 4, 4+5 = 9 = 3^2. a(8) = 1, 1+2+3+4+5+6+7+8 = 36 = 6^2.
A076708
Numbers n such that triangular numbers T(n) and T(n+1) sum to another triangular number (that is also a perfect square).
Original entry on oeis.org
0, 5, 34, 203, 1188, 6929, 40390, 235415, 1372104, 7997213, 46611178, 271669859, 1583407980, 9228778025, 53789260174, 313506783023, 1827251437968, 10650001844789, 62072759630770, 361786555939835, 2108646576008244, 12290092900109633, 71631910824649558
Offset: 1
Bruce Corrigan (scentman(AT)myfamily.com), Oct 26 2002
a(1) = (sqrt(2)*((3+2*sqrt(2))^2-(3-2*sqrt(2))^2)-8)/8 = (sqrt(2)*(9+12*sqrt(2)+8-9+12*sqrt(2)-8)-8)/8 = (sqrt(2)*24*sqrt(2)-8)/8 = (48-8)/8 = 40/8 = 5.
T(5) + T(6) = 15 + 21 = 36 = T(8).
-
Table[((3 + 2 Sqrt[2])^n - (3 - 2 Sqrt[2])^n)/(4 Sqrt[2]) - 1, {n, 1, 20}] (* Zerinvary Lajos, Jul 14 2009 *)
-
concat(0, Vec(x^2*(x-5)/((x-1)*(x^2-6*x+1)) + O(x^100))) \\ Colin Barker, May 15 2015
A108051
a(n+1) = 4*(a(n)+a(n-1)) for n>1, a(1)=1, a(2)=6.
Original entry on oeis.org
0, 1, 6, 28, 136, 656, 3168, 15296, 73856, 356608, 1721856, 8313856, 40142848, 193826816, 935878656, 4518821888, 21818802176, 105350496256, 508677193728, 2456110759936, 11859151814656, 57261050298368, 276480808452096
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
- Robert Munafo, Sequences Related to Floretions
- Index entries for linear recurrences with constant coefficients, signature (4,4).
-
I:=[0, 1, 6]; [n le 3 select I[n] else 4*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 26 2012
-
CoefficientList[Series[x*(1+2*x)/(1-4*x-4*x^2),{x,0,40}],x] (* Vincenzo Librandi, Jun 26 2012 *)
A125651
Numbers k such that A125650(k) is a perfect square.
Original entry on oeis.org
1, 3, 24, 147, 864, 5043, 29400, 171363, 998784, 5821347, 33929304, 197754483, 1152597600, 6717831123, 39154389144, 228208503747, 1330096633344, 7752371296323, 45184131144600, 263352415571283, 1534930362283104, 8946229758127347, 52142448186480984
Offset: 1
a(2)=3 because A125650(3)=9=3^2; a(3)=24 because A125650(24)=81=9^2.
-
I:=[1, 3, 24, 147]; [n le 4 select I[n] else 7*Self(n-1)-7*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, May 21 2012
-
Join[{1},LinearRecurrence[{7,-7,1},{3,24,147},35]] (* or *) CoefficientList[Series[(-1+x(4+(-10+x)x))/((-1+x)(1+(-6+x) x)),{x,0,35}],x] (* Harvey P. Dale, May 15 2011 *)
A182439
Table a(k,i), read by antidiagonals, in which the n-th row comprises A214206(n) in position 0 followed by a second order recursive series G in which each product G(i)*G(i+1) lies in the same row of A001477 (interpreted as a square array - see below).
Original entry on oeis.org
0, 0, 4, 14, 1, 7, 110, 14, 2, 8, 672, 95, 14, 3, 10, 3948, 568, 84, 14, 4, 11, 23042, 3325, 492, 81, 14, 5, 12, 134330, 19394, 2870, 472, 74, 14, 6, 13, 782964, 113051, 16730, 2751, 424, 71, 14, 7, 14, 4563480, 658924, 97512, 16034, 2464, 404, 68, 14, 8, 15
Offset: 0
0, 0, 14, 110, 672, 3948, 23042,134330,782964,
4, 1, 14, 95, 568, 3325, 19394,113051,658924,
7, 2, 14, 84, 492, 2870, 16730, 97512,568344,
8, 3, 14, 81, 472, 2751, 16034, 93453,544684,
10, 4, 14, 74, 424, 2464, 14354, 83654,487564,
11, 5, 14, 71, 404, 2345, 13658, 79595,463904,
12, 6, 14, 68, 384, 2226, 12962, 75536,440244.
Note that 0*14, 14*110, 110*672, etc. are all triangular numbers and thus appear in row 0 of square array A001477; while, 1*14, 14*95, 95*568, 568*3325, etc. are all 4 more than a triangular number and appear in row 4 of square array A001477.
-
A182439 := proc(n,k)
if k = 0 then
A003056(14*n) ;
elif k = 1 then
n;
elif k = 2 then
14;
else
6*procname(n,k-1)-procname(n,k-2)+ 28+2*n-2-4*procname(n,0) ;
end if;
end proc: # R. J. Mathar, Jul 09 2012
-
highTri = Compile[{{S1,_Integer}}, Module[{xS0=0, xS1=S1}, While[xS1-xS0*(xS0+1)/2 > xS0, xS0++]; xS0]];
overTri = Compile[{{S2,_Integer}}, Module[{xS0=0, xS2=S2}, While[xS2-xS0*(xS0+1)/2 > xS0, xS0++]; xS2 - (xS0*(1+xS0)/2)]];
K1 = 0; m = 14; tab=Reap[While[K1<16,J1=highTri[m*K1]; X = 2*(m+K1-(J1*2+1)); K2 = (6 m - K1 + X); K3 = 6 K2 - m + X;
K4 = 6 K3 - K2 + X; K5 = 6 K4 -K3 + X; K6 = 6*K5 - K4 + X; K7 = 6*K6-K5+X; K8 = 6*K7-K6+X; Sow[J1,c]; Sow[K1,d]; Sow[m,e];
Sow[K2,f]; Sow[K3,g]; Sow[K4,h];
Sow[K5,i]; Sow[K6,j]; Sow[K7,k]; Sow[K8,l]; K1++]][[2]]; a=1; list5 = Reap[While[a<11, b=a; While[b>0,
Sow[tab[[b,a+1-b]]]; b--]; a++]][[2,1]]; list5
(* Second program: *)
A003056[n_] := Floor[(Sqrt[1 + 8n] - 1)/2];
T[n_, k_] := Switch[k, 0, A003056[14n], 1, n, 2, 14, _, 6T[n, k-1] - T[n, k-2] + 28 + 2n - 2 - 4T[n, 0]];
Table[T[n-k, k], {n, 0, 9}, {k, n, 0, -1}] (* Jean-François Alcover, May 09 2023, after R. J. Mathar *)
A115598
Consider all Pythagorean triples (X,X+1,Z) ordered by increasing Z; sequence gives Z-(X+1) values.
Original entry on oeis.org
1, 8, 49, 288, 1681, 9800, 57121, 332928, 1940449, 11309768, 65918161, 384199200, 2239277041, 13051463048, 76069501249, 443365544448, 2584123765441, 15061377048200, 87784138523761, 511643454094368, 2982076586042449, 17380816062160328, 101302819786919521
Offset: 1
Essentially a duplicate of
A001108.
-
LinearRecurrence[{7,-7,1},{1,8,49},30] (* Harvey P. Dale, Oct 27 2013 *)
CoefficientList[Series[-(x + 1)/((x - 1) (x^2 - 6 x + 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Jul 28 2014 *)
A175497
Numbers k with the property that k^2 is a product of two distinct triangular numbers.
Original entry on oeis.org
0, 6, 30, 35, 84, 180, 204, 210, 297, 330, 546, 840, 1170, 1189, 1224, 1710, 2310, 2940, 2970, 3036, 3230, 3900, 4914, 6090, 6930, 7134, 7140, 7245, 7440, 8976, 10710, 12654, 14175, 14820, 16296, 16380, 17220, 19866, 22770, 25172, 25944, 29103
Offset: 1
Many terms are in common with
A147779.
Cf.
A152005 (two distinct tetrahedral numbers).
-
isA175497 := proc(n)
local i,Ti,Tj;
if n = 0 then
return true;
end if;
for i from 1 do
Ti := i*(i+1)/2 ;
if Ti > n^2 then
return false;
else
Tj := n^2/Ti ;
if Tj <> Ti and type(Tj,'integer') then
if isA000217(Tj) then # code in A000217
return true;
end if;
end if;
end if;
end do:
end proc:
for n from 0 do
if isA175497(n) then
printf("%d,\n",n);
end if;
end do: # R. J. Mathar, May 26 2016
-
triangularQ[n_] := IntegerQ[Sqrt[8n + 1]];
okQ[n_] := Module[{i, Ti, Tj}, If[n == 0, Return[True]]; For[i = 1, True, i++, Ti = i(i+1)/2; If[Ti > n^2, Return[False], Tj = n^2/Ti; If[Tj != Ti && IntegerQ[Tj], If[ triangularQ[Tj], Return[True]]]]]];
Reap[For[k = 0, k < 30000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 13 2023, after R. J. Mathar *)
-
from itertools import count, islice, takewhile
from sympy import divisors
from sympy.ntheory.primetest import is_square
def A175497_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda k:not k or any(map(lambda d: is_square((d<<3)+1) and is_square((k**2//d<<3)+1), takewhile(lambda d:d**2A175497_list = list(islice(A175497_gen(),20)) # Chai Wah Wu, Mar 13 2023
-
def A175497_list(n):
def A322699_A(k, n):
p, q, r, m = 0, k, 4*k*(k+1), 0
while m < n:
p, q, r = q, r, (4*k+3)*(r-q) + p
m += 1
return p
def a(k, n, j):
if n == 0: return 0
p = A322699_A(k, n)*(A322699_A(k, n)+1)*(2*k+1) - a(k, n-1, 1)
q = (4*k+2)*p - A322699_A(k, n)*(A322699_A(k, n)+1)//2
m = 1
while m < j: p, q = q, (4*k+2)*q - p; m += 1
return p
A = set([a(k, 1, 1) for k in range(n+1)])
k, l, m = 1, 1, 2
while True:
x = a(k, l, m)
if x < max(A):
A |= {x}
A = set(sorted(A)[:n+1])
m += 1
else:
if m == 1 and l == 1:
if k > n:
return sorted(A)
k += 1
elif m > 1:
l += 1; m = 1
elif l > 1:
k += 1; l, m = 1, 1
# Onur Ozkan, Mar 15 2023
A182435
a(n) = 6*a(n-1) - a(n-2) - 2 with n>1, a(0)=0, a(1)=1.
Original entry on oeis.org
0, 1, 4, 21, 120, 697, 4060, 23661, 137904, 803761, 4684660, 27304197, 159140520, 927538921, 5406093004, 31509019101, 183648021600, 1070379110497, 6238626641380, 36361380737781, 211929657785304, 1235216565974041, 7199369738058940, 41961001862379597
Offset: 0
Essentially a duplicate of
A046090.
-
[n le 2 select n-1 else 6*Self(n-1)-Self(n-2)-2: n in [1..24]]; // Bruno Berselli, May 15 2012
-
m = -20;
n = -3;
c = 0;
list3 = Reap[While[c < 20,t = 6 n - m - 2;Sow[t];m = n;n = t; c++]][[2,1]]
LinearRecurrence[{7,-7,1},{0,1,4},30] (* Harvey P. Dale, May 11 2018 *)
-
concat(0,Vec((1-3*x)/(1-x)/(1-6*x+x^2)+O(x^98))) \\ Charles R Greathouse IV, Jun 11 2013
A182440
Table, read by antidiagonals, in which the n-th row comprises A214206(n) in position 0 followed by a second order recursive series G in which each product G(i)*G(i+1) lies in the same row of A001477 (interpreted as a square array).
Original entry on oeis.org
0, 14, 4, 0, 14, 7, 16, 1, 14, 8, 126, 40, 2, 14, 10, 770, 287, 60, 3, 14, 11, 4524, 1730, 420, 72, 4, 14, 12, 26404, 10141, 2522, 497, 88, 5, 14, 13, 153930, 59164, 14774, 2978, 602, 100, 6, 14, 14, 897206
Offset: 0
For i = 1,2,3,4 ..., a(1,i)*a(1,i+1) = 14*1,1*40,40*287,287*1730, ...; and, each product is 4 more than a triangular number and thus lies in row 4 of square array A001477.
-
highTri = Compile[{{S1,_Integer}},Module[{xS0=0,xS1=S1},
While[xS1-xS0*(xS0+1)/2>xS0,xS0++];
xS0]];
overTri = Compile[{{S2,_Integer}},Module[{xS0=0,xS2=S2},
While[xS2-xS0*(xS0+1)/2>xS0,xS0++];
xS2 - (xS0*(1+xS0)/2)]];
K1 = 0;
m = 14;table=Reap[While[K1<16,J1=highTri[m*K1];X = 2*(m+K1+(J1*2+1));K2 = (6 K1 - m + X);K3 = 6 K2 - K1 + X;
K4 = 6 K3 - K2 + X; K5 = 6 K4 -K3 + X; K6 = 6*K5 - K4 + X;K7 = 6*K6-K5+X; K8 = 6*K7-K6+X; Sow[J1,c];Sow[m,d];
Sow[K1,e];Sow[K2,f];Sow[K3,g];Sow[K4,h];
Sow[K5,i]; Sow[K6,j];Sow[K7,k];Sow[K8,l];
K1++]][[2]];
a=1;
list5 = Reap[While[a<11,b=a;
While[b>0,Sow[table[[b,a+1-b]]];b--];a++]][[2,1]];
list5
A221073
Simple continued fraction expansion of an infinite product.
Original entry on oeis.org
2, 4, 1, 8, 1, 32, 1, 56, 1, 196, 1, 336, 1, 1152, 1, 1968, 1, 6724, 1, 11480, 1, 39200, 1, 66920, 1, 228484, 1, 390048, 1, 1331712, 1, 2273376, 1, 7761796, 1, 13250216, 1, 45239072, 1, 77227928, 1, 263672644, 1, 450117360, 1, 1536796800, 1, 2623476240, 1
Offset: 0
Product {n >= 0} {1 - sqrt(2)*(sqrt(2) - 1)^(4*n+3)}/{1 - sqrt(2)*(sqrt(2) - 1)^(4*n+1)} = 2.20409 39255 78752 05766 ...
= 2 + 1/(4 + 1/(1 + 1/(8 + 1/(1 + 1/(32 + 1/(1 + 1/(56 + ...))))))).
We have (sqrt(2) - 1)^3 = 5*sqrt(2) - 7 so product {n >= 0} {1 - sqrt(2)*(5*sqrt(2) - 7)^(4*n+3)}/{1 - sqrt(2)*(5*sqrt(2) - 7)^(4*n+1)} = 1.11117 34981 94843 98511 ... = 1 + 1/(8 + 1/(1 + 1/(196 + 1/(1 + 1/(1968 + 1/(1 + 1/(39200 + ...))))))).
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- P. Bala, Some simple continued fraction expansions for an infinite product, Part 1
- Index entries for linear recurrences with constant coefficients, signature (0,1,0,6,0,-6,0,-1,0,1).
-
m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((x^10-2*x^8-6*x^6+12*x^4-4*x^3+x^2-4*x-2)/((x-1)*(x+1)*(x^4-2*x^2-1)*(x^4+2*x^2-1)))); // G. C. Greubel, Jul 15 2018
-
NProduct[( Sqrt[2]*(Sqrt[2] - 1)^(4*n + 3) - 1)/( Sqrt[2]*(Sqrt[2] - 1)^(4*n + 1) - 1), {n, 0, Infinity}, WorkingPrecision -> 200] // ContinuedFraction[#, 37] & (* Jean-François Alcover, Mar 06 2013 *)
Join[{2},LinearRecurrence[{0,1,0,6,0,-6,0,-1,0,1},{4,1,8,1,32,1,56,1,196,1},60]] (* Harvey P. Dale, Feb 16 2014 *)
-
x='x+O('x^30); Vec((x^10-2*x^8-6*x^6+12*x^4-4*x^3+x^2-4*x-2)/((x-1)*(x+1)*(x^4-2*x^2-1)*(x^4+2*x^2-1))) \\ G. C. Greubel, Jul 15 2018
Comments