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.

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

Original entry on oeis.org

19, 239, 0, 23459, 345679, 0, 23456789, 234567899, 0, 2345678910119, 6789101112131415169, 0, 313233343536373839404142439, 36373839404142434445464748499, 0, 123456789101112131415169
Offset: 1

Views

Author

Amarnath Murthy, Jan 01 2006

Keywords

Examples

			a(4) = 23459, four successive positive integers 2,3,4,5 in ascending order followed by a 9.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[Mod[n, 3]==0, 0, (For[m=1, (v={};Do[v=Join[v, IntegerDigits[k]], {k, m, m+n-1}]);!PrimeQ[10FromDigits[v]+9], m++ ];10FromDigits[v]+9)];Table[a[n], {n, 17}] - Farideh Firoozbakht
    f[n_] := Block[{t = 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 *)

Extensions