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.

A112534 Number of digits in A110778(n).

Original entry on oeis.org

1, 1, 1, 3, 3, 21, 7, 31, 5, 480, 1526, 294, 1615
Offset: 1

Views

Author

Joshua Zucker, Jan 12 2006

Keywords

Examples

			A110778(4) = 777 hence a(4) = 3.
		

Crossrefs

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[#]&]; 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 *)
  • 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

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