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.

A108145 Smallest prime consisting of n successive positive integers in descending order followed by a 9. a(3*k) = 0 as no such prime exists.

This page as a plain text file.
%I A108145 #15 Aug 05 2025 22:56:06
%S A108145 19,439,0,262524239,765439,0,109876549,1098765439,0,
%T A108145 504948474645444342419,27262524232221201918179,0,
%U A108145 2019181716151413121110989,64636261605958575655545352519,0
%N A108145 Smallest prime consisting of n successive positive integers in descending order followed by a 9. a(3*k) = 0 as no such prime exists.
%e A108145 a(2) = 439, two successive positive integers 4,3 in descending order followed by a 9.
%e A108145 a(4) = 262524239 four successive positive integers 26,25,24,23 in descending order followed by a 9.
%t A108145 a[n_]:=If[Mod[n, 3]==0, 0, (For[m=1, (v={};Do[v=Join[v, IntegerDigits[k]], {k, m+n-1, m, -1}]);!PrimeQ[10FromDigits[v]+9], m++ ];10FromDigits[v]+9)];Table[a[n], {n, 16}] (* _Farideh Firoozbakht_ *)
%t A108145 f[n_] := Block[{t = Reverse@Range@n}, If[ Mod[n, 3] == 0, 0, While[p = FromDigits@Flatten@IntegerDigits@Join[t, {9}]; !PrimeQ@p, t++ ]; p]]; Array[f, 16] (* _Robert G. Wilson v_ *)
%Y A108145 Cf. A114754, A114755, A114756, A114757, A114758, A114759, A112716.
%K A108145 base,nonn
%O A108145 1,1
%A A108145 _Amarnath Murthy_, Jan 01 2006
%E A108145 Extended by _Robert G. Wilson v_, _Ray Chandler_ and _Farideh Firoozbakht_, Jan 02 2006