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.

A114759 Smallest prime of the form: n successive positive integers in descending order followed by a 3. a(3k) = 0 as no such prime exists.

Original entry on oeis.org

13, 433, 0, 54323, 654323, 0, 292827262524233, 987654323, 0, 1716151413121110983, 181716151413121110983, 0, 1413121110987654323, 27262524232221201918171615143, 0, 1716151413121110987654323
Offset: 1

Views

Author

Amarnath Murthy, Jan 01 2006

Keywords

Examples

			a(4) = 54323, four successive positive integers 5,4,3,2 in descending order followed by a 3.
		

Crossrefs

Programs

  • Mathematica
    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]+3], m++ ];10FromDigits[v] +3)];Table[a[n], {n, 17}] - Farideh Firoozbakht
    f[n_] := Block[{t = Reverse@Range@n}, If[Mod[n, 3] == 0, 0, While[p = FromDigits@Flatten@IntegerDigits@Join[t, {3}]; ! PrimeQ@p, t++ ]; p]]; Array[f, 18] (* Robert G. Wilson v *)

Extensions