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.

A110778 Copies of 3 and 7 alternately such that every partial concatenation is a prime.

Original entry on oeis.org

3, 7, 3, 777, 333, 777777777777777777777, 3333333, 7777777777777777777777777777777, 33333
Offset: 1

Views

Author

Amarnath Murthy, Aug 12 2005

Keywords

Examples

			3, 37, 373, 373777, ... are all prime.
		

Crossrefs

Cf. A112534. - Sean A. Irvine, Mar 21 2010

Programs

  • Mathematica
    id[n_]:=IntegerDigits[n]; f[x_,y_]:=FromDigits[Flatten[Append[{x},y]]]; a[x_,y_]:=NestWhile[f[id[#],y]&,f[id[x],y],!PrimeQ[#]&]; d[x_, y_]:=x-FromDigits[PadRight[id[y],Length[id[x]]]]; t={3}; x=3; Do[y=a[x,7]; AppendTo[t,d[y,x]]; x=a[y,3]; AppendTo[t,d[x,y]],{n,4}]; t (* Jayanta Basu, May 20 2013 *)

Extensions

More terms from Joshua Zucker, Jan 11 2006
The next term has 480 7's and is too large to include.