login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A180313
A sequence a(n) such that a(n+1)^2 - a(n)^2 are perfect squares.
2
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,1
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.
EXAMPLE
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.
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 *)
PROG
(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; }
CROSSREFS
Sequence in context: A268021 A018928 A239381 * A053630 A155012 A121533
KEYWORD
nonn
AUTHOR
Valentin Tiriac (valtron2000(AT)gmail.com), Aug 26 2010
EXTENSIONS
Nomenclature normalized by R. J. Mathar, Sep 23 2010
Corrected indexing error introduced with previous edit - R. J. Mathar, Oct 01 2010
STATUS
approved