OFFSET
1,3
EXAMPLE
a(3) = 4 because there are four prime substrings in the circle: 2, 3, 23 and 31.
a(6) = 7. The seven prime substrings are 2, 3, 5, 23, 61, 4561 and 56123.
PROG
(Python)
from sympy import isprime
def a(n):
c = ("".join(str(i) for i in range(1, n+1)))*2
return sum(1 for i in range(len(c)//2) if c[i] != "0" for j in range(1, len(c)//2+1) if isprime(int(c[i:i+j])))
print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Dec 17 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tamas Sandor Nagy, Dec 17 2022
EXTENSIONS
a(10) and beyond from Michael S. Branicky, Dec 17 2022
STATUS
approved