OFFSET
1,3
COMMENTS
Equivalently, numbers k such that (2k + k^2)/3 is a palindrome. - Harvey P. Dale, Sep 02 2015
For all i >= 1, 9^i is a term with corresponding quotient 3^{2*i}, where ^ is repeated concatenation. - Michael S. Branicky, Jan 24 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..48
MATHEMATICA
palQ[n_]:=Module[{c=(2n+n^2)/3, id}, id=If[IntegerQ[c], IntegerDigits[c], {1, 2}]; id==Reverse[id]]; Select[Range[0, 10^7], palQ] (* Harvey P. Dale, Sep 02 2015 *)
PROG
(Python)
from itertools import count, islice
def ispal(n): s = str(n); return s == s[::-1]
def agen():
for k in count(0):
q, r = divmod(k*(k+2), 3)
if r == 0 and ispal(q):
yield k, q
print([k for k, q in islice(agen(), 31)]) # Michael S. Branicky, Jan 24 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 02 2015
a(32) and beyond from Michael S. Branicky, Jan 24 2022
STATUS
approved