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.

A113118 a(1) = 2. a(n) is smallest integer > a(n-1) which is a multiple of the largest prime <= a(n-1).

This page as a plain text file.
%I A113118 #10 Apr 09 2014 10:12:20
%S A113118 2,4,6,10,14,26,46,86,166,326,634,1262,2518,5006,10006,19946,39874,
%T A113118 79738,159398,318778,637502,1274998,2549978,5099902,10199786,20399534,
%U A113118 40799062,81598082,163196134,326392258,652784498,1305568942,2611137838
%N A113118 a(1) = 2. a(n) is smallest integer > a(n-1) which is a multiple of the largest prime <= a(n-1).
%C A113118 It appears that A113117 and this sequence agree except for the 5th term.
%H A113118 Harvey P. Dale, <a href="/A113118/b113118.txt">Table of n, a(n) for n = 1..1000</a>
%F A113118 a(n) = 2 * (largest prime <= a(n-1)), by Bertrand's postulate.
%e A113118 The greatest prime <= a(4) (= 10) is 7. The smallest multiple of 7 which is > 10 is 14. So a(5)= 14.
%t A113118 sim[n_]:=Module[{pr=If[PrimeQ[n],n,NextPrime[n,-1]]},pr*( Floor[ n/pr]+1)]; NestList[ sim,2,40] (* _Harvey P. Dale_, Sep 07 2012 *)
%o A113118 (PARI) {m=33;print1(a=2,",");for(n=2,m,p=precprime(a);k=a+1;while(k%p>0,k++);print1(a=k,","))} - (Brockhaus)
%K A113118 nonn
%O A113118 1,1
%A A113118 _Leroy Quet_, Jan 03 2006
%E A113118 a(8) to a(33) from _Klaus Brockhaus_, Jan 07 2006