OFFSET
1,2
COMMENTS
This is to squarefree numbers what A061783 is to primes.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
14 is a term since it's squarefree and so is 14 + 41 = 55.
MAPLE
R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
q:= n-> andmap(numtheory[issqrfree], [n, n+R(n)]):
select(q, [$1..200])[]; # Alois P. Heinz, Jan 07 2022
MATHEMATICA
okQ[n_] := SquareFreeQ[n] && SquareFreeQ[n + IntegerReverse[n]];
Select[Range[200], okQ]
PROG
(PARI) isok(m) = issquarefree(m) && issquarefree(m+fromdigits(Vecrev(digits(m)))); \\ Michel Marcus, Jan 07 2022
(Python)
from sympy.ntheory.factor_ import core
def squarefree(n): return core(n, 2) == n
def ok(n): return squarefree(n) and squarefree(n + int(str(n)[::-1]))
print([k for k in range(1, 200) if ok(k)]) # Michael S. Branicky, Jan 07 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jean-François Alcover, Jan 07 2022
STATUS
approved