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.

A100016 a(0) = 1; a(n+1) = a(n) * (next prime larger than a(n)).

This page as a plain text file.
%I A100016 #18 Mar 19 2024 11:49:07
%S A100016 1,2,6,42,1806,3270666,10697259354222,114431357691543566765996394,
%T A100016 13094535623129987017538646614449662873664453962869814,
%U A100016 171466863185420237392391564368967506501628543653753176958938044126997508808439363294403869833497610468982
%N A100016 a(0) = 1; a(n+1) = a(n) * (next prime larger than a(n)).
%C A100016 Terms are very close to A007018(n), with equality for the first 5 terms. Indeed, sequence A007018 is defined like the present sequence, with nextprime(a(n)) replaced by a(n)+1. - _M. F. Hasler_, May 20 2019
%e A100016 If n=1, then the prime immediately greater than n is 2. Hence the next number is n*p = 1*2 = 2.
%e A100016 If n=2, then the next prime is 3, so the next number in the sequence is 2*3=6.
%e A100016 If n=6, then the next prime is 7, so the next number in the sequence is 6*7=42.
%t A100016 a[0] = 1; a[n_] := a[n - 1]*NextPrime[a[n - 1]]; Table[ a[n], {n, 0, 9}] (* _Robert G. Wilson v_, Nov 23 2004 *)
%t A100016 NestList[# NextPrime[#]&,1,10] (* _Harvey P. Dale_, Oct 15 2016 *)
%o A100016 (PARI) (nxt_A100016(n)=n*nextprime(n+1)); A100016_vec=vector(10,i,t=if(i>1,nxt_A100016(t),1)) \\ _M. F. Hasler_, May 20 2019
%o A100016 (Python)
%o A100016 from itertools import islice
%o A100016 from sympy import nextprime
%o A100016 def A100016_gen(): # generator of terms
%o A100016     yield (a:=1)
%o A100016     while (a:=a*nextprime(a)): yield a
%o A100016 A100016_list = list(islice(A100016_gen(),10)) # _Chai Wah Wu_, Mar 19 2024
%Y A100016 Similar to A074839.
%Y A100016 Even more similar to A007018.
%K A100016 nonn
%O A100016 0,2
%A A100016 _Parthasarathy Nambi_, Nov 18 2004
%E A100016 More terms from _Robert G. Wilson v_, Nov 23 2004