cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

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

Views

Author

Charles Reed (charles.reed(AT)bbs.ewgateway.org)

Keywords

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Extensions

More terms from David W. Wilson.

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

Views

Author

Henry Bottomley, Mar 21 2000

Keywords

Comments

Least prime factors of a(n): 3, 5, 13, 5, 3613, 5, 233, 5, 3169, 5, 101, 5, 29, 5, 695838629, 5, 1217, 5, 2557, 5, 101, 5, 769, 5. - Zak Seidov, Nov 11 2013

Examples

			a(3)=13 because 5,12,13 is a Pythagorean triple and a(2)=5.
		

References

  • R. Gelca and T. Andreescu, Putnam and Beyond, Springer 2007, p. 121.

Crossrefs

See also A018928, A180313 and A239381 for similar sequences with a(n) a leg and a(n+1) the hypotenuse of a Pythagorean triangle.
Cf. A077125, A117191 (4^(1/Pi)).

Programs

  • Maple
    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
  • Mathematica
    NestList[(#^2+1)/2&,3,10] (* Harvey P. Dale, Sep 15 2011 *)
  • PARI
    {a(n) = if( n>1, (a(n-1)^2 + 1) / 2, 3)}; /* Michael Somos, May 15 2011 */

Formula

a(1) = 3, a(n) = (a(n-1)^2 + 1)/2 for n > 1.
a(n) = 2*A000058(n)-1 = A053631(n)+1 = floor(2 * 1.597910218031873...^(2^n)). Constructing the spiral as a sequence of triangles with one vertex at the origin, then for large n the other vertices are close to lying on the doubly logarithmic spiral r = 2*2.228918357655...^(1.5546822754821...^theta) where theta(n) = n*Pi/2 - 1.215918200344... and 1.5546822754821... = 4^(1/Pi).
a(1) = 3, a(n+1) = (1/4)*((a(n)-1)^2 + (a(n)+1)^2). - Amarnath Murthy, Aug 17 2005
a(n)^2 - (a(n)-1)^2 = a(n-1)^2, so 2*a(n)-1 = a(n-1)^2 (see the first formula). - Thomas Ordowski, Jul 13 2014
a(n) = (A006892(n+2) + 3)/2. - Thomas Ordowski, Jul 14 2014
a(n)^2 = A006892(n+3) + 2. - Thomas Ordowski, Jul 19 2014

Extensions

Corrected and extended by James Sellers, Mar 22 2000

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

Views

Author

Charles Reed (charles.reed(AT)bbs.ewgateway.org)

Keywords

Crossrefs

Formula

a(n) = A018928(n+1)^2 - A018930(n+1)^2. - César Aguilera, Nov 02 2018

Extensions

More terms from David W. Wilson

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

Views

Author

Robert G. Wilson v, Mar 17 2014

Keywords

Comments

a(0)=3 because A042965(3)=3 with comments.
If we relax the Primitive restriction, i.e., GCD(x,y,z) can exceed 1, then we have A018928.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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

Views

Author

Valentin Tiriac (valtron2000(AT)gmail.com), Aug 26 2010

Keywords

Comments

The lexically smallest sequence with a(n+1)^2-a(n)^2 representing perfect squares is A018928.
This version here is constructed via a(n+1) = a(n)* sqrt( 1+((p^2-1)/(2p))^2) where p = A020639(a(n)) is the smallest prime divisor of the previous term.

Examples

			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.
		

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • Perl
    # 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; }

Extensions

Nomenclature normalized by R. J. Mathar, Sep 23 2010
Corrected indexing error introduced with previous edit - R. J. Mathar, Oct 01 2010
Showing 1-5 of 5 results.