OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..208
EXAMPLE
a(11) = 111 because A002113(11) = 22 and 111 = 5*22+1.
PROG
(Python)
from itertools import count
def A083477(n):
if n==1: return 2
q =(c:=n+1-x)*x+int(str(c)[-2::-1] or 0) if n+1<(x:=10**(len(str(n+1>>1))-1))+(y:=10*x) else (c:=n+1-y)*y+int(str(c)[::-1] or 0)
for k in count(n+2):
if (p:=int((c:=k-x)*x+int(str(c)[-2::-1] or 0) if k<(x:=10**(len(str(k>>1))-1))+(y:=10*x) else (c:=k-y)*y+int(str(c)[::-1] or 0)))%q==1:
return p # Chai Wah Wu, Jul 12 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 03 2003
EXTENSIONS
Corrected and extended by David Wasserman, Nov 16 2004
STATUS
approved