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.

This page as a plain text file.
%I A110778 #13 Nov 14 2021 12:34:49
%S A110778 3,7,3,777,333,777777777777777777777,3333333,
%T A110778 7777777777777777777777777777777,33333
%N A110778 Copies of 3 and 7 alternately such that every partial concatenation is a prime.
%e A110778 3, 37, 373, 373777, ... are all prime.
%t A110778 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 *)
%Y A110778 Cf. A110774, A110775, A110776, A110777.
%Y A110778 Cf. A112534. - _Sean A. Irvine_, Mar 21 2010
%K A110778 base,nonn
%O A110778 1,1
%A A110778 _Amarnath Murthy_, Aug 12 2005
%E A110778 More terms from _Joshua Zucker_, Jan 11 2006
%E A110778 The next term has 480 7's and is too large to include.