OFFSET
1,1
COMMENTS
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
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