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.

A114756 Smallest prime of the form: n successive positive integers in ascending order followed by a 7.

Original entry on oeis.org

17, 127, 1237, 12347, 123457, 56789107, 456789107, 3456789107, 4567891011127, 616263646566676869707, 13141516171819202122237, 2021222324252627282930317, 151617181920212223242526277
Offset: 1

Views

Author

Amarnath Murthy, Jan 01 2006

Keywords

Examples

			a(4) = 12347, four successive positive integers 1,2,3,4 in ascending order followed by a 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(For[m=1, (v={};Do[v=Join[v, IntegerDigits[k]], {k, m, m+n-1}]);!PrimeQ[10FromDigits[v]+7], m++ ];10FromDigits[v]+7);Table[a[n], {n, 14}] - Farideh Firoozbakht
    f[n_] := Block[{t = Range@n}, While[p = FromDigits@Flatten@IntegerDigits@Join[t, {7}]; !PrimeQ@p, t++ ]; p]; Array[f, 14] (* Robert G. Wilson v *)
    Table[SelectFirst[10 FromDigits[Flatten[IntegerDigits/@#]]+7&/@ Partition[ Range[1000],n,1],PrimeQ],{n,20}] (* Harvey P. Dale, Jan 29 2022 *)

Extensions