OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
MAPLE
A002378 := proc(n) n*(n+1) ; end:
A163599 := proc(n) ndgs := convert(n, base, 10) ; for i from 1 do wrks := true ; prd := convert( A002378(i), base, 10) ; for d from 1 to nops(ndgs) do if op(-d, ndgs) <> op(-d, prd) then wrks := false; break; fi; od: if wrks then RETURN( A002378(i) ) ; fi; od: end:
seq(A163599(n), n=1..80) ; # R. J. Mathar, Aug 07 2009
PROG
(Python)
from sympy import isprime
def a(n):
s, k = str(n), 1
while not str(k*(k+1)).startswith(s): k += 1
return k*(k+1)
print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Dec 02 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Aug 01 2009
STATUS
approved