login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112534 Number of digits in A110778(n). 6
1, 1, 1, 3, 3, 21, 7, 31, 5, 480, 1526, 294, 1615 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
A110778(4) = 777 hence a(4) = 3.
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[#]&]; le[n_]:=Length[id[n]]; d[x_, y_]:=x-FromDigits[PadRight[id[y], le[x]]]; x=3; t={1}; Do[y=a[x, 7]; AppendTo[t, le[d[y, x]]]; x=a[y, 3]; AppendTo[t, le[d[x, y]]], {n, 5}]; t (* Jayanta Basu, May 20 2013 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
s = ""
while True:
for d in "37":
for k in count(1):
if isprime(int(s+d*k)): break
yield k
s += d*k
print(list(islice(agen(), 10))) # Michael S. Branicky, Aug 23 2022
CROSSREFS
Sequence in context: A346750 A292953 A292221 * A006656 A367995 A205452
KEYWORD
base,nonn
AUTHOR
Joshua Zucker, Jan 12 2006
EXTENSIONS
Typo in example fixed by Sean A. Irvine, Mar 21 2010
a(11)-a(12) from Sean A. Irvine, Mar 22 2010
a(13) from Michael S. Branicky, Aug 23 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)