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.

A125838 a(n) is the smallest number m such that k*m - 1 for k=2,3,...,n is prime.

This page as a plain text file.
%I A125838 #9 Mar 29 2017 19:43:13
%S A125838 2,2,2,6,120,120,2894220,397073040,1236161850,764907546690,
%T A125838 8955490023480,138393712627170,8047290924923250
%N A125838 a(n) is the smallest number m such that k*m - 1 for k=2,3,...,n is prime.
%H A125838 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_379.htm">Problems & Puzzles</a>.
%e A125838 a(7)=120 because 2*120-1, 3*120-1, 4*120-1, 5*120-1, 6*120-1 & 7*120-1 are prime and 120 is the smallest such number.
%t A125838 a[n_] := Block[{k=2}, While[! AllTrue[k Range[2, n] - 1, PrimeQ], k += 2]; k]; a /@
%t A125838 Range[2, 8] (* _Giovanni Resta_, Mar 29 2017 *)
%Y A125838 Cf. A125839, A088651, A088250.
%K A125838 hard,more,nonn
%O A125838 2,1
%A A125838 _Carlos Rivera_, Jan 01 2007
%E A125838 a(8) from Luke Pebody (luke.pebody(AT)gmail.com)
%E A125838 a(9)-a(10) from Vladimir Trushkov (vladimir(AT)trushkov.botik.ru)
%E A125838 a(11) from _Farideh Firoozbakht_
%E A125838 a(5) corrected by and a(12)-a(14) from _Giovanni Resta_, Mar 29 2017