A018930
a(1)=3; for n>1, a(n) is smallest positive integer such that a(1)^2+...+a(n)^2 = m^2 for some m.
Original entry on oeis.org
3, 4, 12, 84, 132, 12324, 1836, 105552, 255084, 197580, 10358340, 13775220, 1936434780, 51299286012, 123205977516, 862441842612, 1310543298204, 667510076211780, 207181940072172, 110912831751840, 1698410314006284
Offset: 1
Charles Reed (charles.reed(AT)bbs.ewgateway.org)
-
f[n_]:=Module[{a={3}}, Do[AppendTo[a,First[y/. {ToRules[Reduce[{y^2+a.a == x^2,x>0,y>0}, {y,x},Integers]]}]], {n-1}]; a]; f[21]//Timing (* Jean-François Alcover, Jan 26 2007 *)
-
print1("3, "); s=9; for(n=1,30, d=divisors(s); t=d[#d\2]; q=(s\t-t)/2; print1(q,", "); s+=q^2); \\ Max Alekseyev, Nov 23 2012
A053630
Pythagorean spiral: a(n-1), a(n)-1 and a(n) are sides of a right triangle.
Original entry on oeis.org
3, 5, 13, 85, 3613, 6526885, 21300113901613, 226847426110843688722000885, 25729877366557343481074291996721923093306518970391613
Offset: 1
a(3)=13 because 5,12,13 is a Pythagorean triple and a(2)=5.
- R. Gelca and T. Andreescu, Putnam and Beyond, Springer 2007, p. 121.
See also
A018928,
A180313 and
A239381 for similar sequences with a(n) a leg and a(n+1) the hypotenuse of a Pythagorean triangle.
-
A:= proc(n) option remember; (procname(n-1)^2+1)/2 end proc: A(1):= 3:
seq(A(n),n=1..10); # Robert Israel, Jul 14 2014
-
NestList[(#^2+1)/2&,3,10] (* Harvey P. Dale, Sep 15 2011 *)
-
{a(n) = if( n>1, (a(n-1)^2 + 1) / 2, 3)}; /* Michael Somos, May 15 2011 */
A018929
Define {b(n)} by b(1) = 3, b(n) (n >= 2) is smallest number such that b(1)^2 + ... + b(n)^2 = m^2 for some m and all b(i) are distinct. Sequence gives values of m^2.
Original entry on oeis.org
9, 25, 169, 7225, 24649, 151905625, 155276521, 11296501225, 76364348281, 115402204681, 107410609760281, 297167295808681, 3750076824489457081, 2635366822165468321225, 17815079717838565851481, 761621011605820344834025
Offset: 1
Charles Reed (charles.reed(AT)bbs.ewgateway.org)
A239381
a(0) = 3, the least length of a Primitive Pythagorean Triangle (PPT). a(n) is the least hypotenuse of a PPT which has a(n-1) as one of its legs.
Original entry on oeis.org
3, 5, 13, 85, 157, 12325, 90733, 2449525, 28455997, 295742792965, 171480834409967437, 656310093705697045, 1616599508725767821225590944157, 4461691012090851100342993272805, 115366949386695884000892071602798585632943213, 12002377162350258332845595301471273220420939451301220405
Offset: 0
a(0)=3 by definition,
a(1)=5 because it is the hypotenuse of a 3-4-5 PPT,
a(2)=13 because it is the hypotenuse of a 5-12-13 PPT,
a(3)=85 because it is the hypotenuse of a 13-84-85 PPT,
a(4)=157 because it is the hypotenuse of a 85-132-157 PPT, 85 is also the leg of a 85-3612-3613 PPT but its hypotenuse is larger, etc.
-
f[s_List] := Block[{x = s[[-1]]}, Append[s, Transpose[ Solve[x^2 + y^2 == z^2 && GCD[x, y, z] == 1 && y > 0 && z > 0, {y, z}, Integers]][[-1, 1, 2]]]]; lst = Nest[f, {3}, 15]
A180313
A sequence a(n) such that a(n+1)^2 - a(n)^2 are perfect squares.
Original entry on oeis.org
3, 5, 13, 85, 221, 1445, 3757, 24565, 63869, 417605, 1085773, 7099285, 18458141, 120687845, 313788397, 2051693365, 5334402749, 34878787205, 90684846733, 592939382485, 1541642394461, 10079969502245, 26207920705837, 171359481538165, 445534651999229, 2913111186148805
Offset: 1
Valentin Tiriac (valtron2000(AT)gmail.com), Aug 26 2010
After a(1)=3, p=3 (again) and a(2) = 3*sqrt(1+ (8/6)^2) = 5.
After a(4)=85, p=5 and a(5) = 85*sqrt(1+ (24/10)^2) = 85*sqrt(169/25) = 221.
-
A020639 := proc(n) min(op(numtheory[factorset](n))) ; end proc:
A180313 := proc(n) option remember; if n = 1 then 3; else aprev := procname(n-1) ; p := A020639(aprev) ; aprev* sqrt(1+((p^2-1)/2/p)^2) ; end if; end proc:
for n from 1 to 30 do printf("%d,",A180313(n)) ; end do: # R. J. Mathar, Sep 23 2010
-
spd[n_] := FactorInteger[n][[1, 1]];
a[n_] := a[n] = If[n == 1, 3, aprev = a[n-1];
p = spd[aprev]; aprev*Sqrt[1+((p^2-1)/2/p)^2]];
Table[a[n], {n, 1, 26}] (* Jean-François Alcover, Feb 28 2024, after R. J. Mathar *)
-
# use 5.12.0; use warnings; use Math::Prime::TiedArray; tie my @primes, 'Math::Prime::TiedArray';
sub SmallestPrimeDivisor ($) { my ($n) = @_; for my $p (@primes) { if ($n % $p == 0) { return $p; } } }
sub FindIncrement ($) { my ($n) = @_; my $p = SmallestPrimeDivisor $n; my $k = $n / $p; return $k * ($p ** 2 - 1) / 2; }
my $n = 3; say $n; for my $i (0 .. 23) { my $d = FindIncrement $n; $n = sqrt($d ** 2 + $n ** 2); say $n; }
Corrected indexing error introduced with previous edit -
R. J. Mathar, Oct 01 2010
Showing 1-5 of 5 results.
Comments