login
A032789
Numbers k such that (k*(k+1)*(k+2)) / (k+(k+1)+(k+2)) is a palindrome.
2
0, 1, 3, 4, 9, 21, 42, 99, 154, 237, 405, 999, 9999, 18991, 19291, 22021, 23587, 40293, 45072, 99999, 137652, 999999, 1278343, 1360456, 3162199, 3162499, 4029705, 4365396, 4418236, 6052891, 9999999, 31496589, 40289205, 41276535, 44295036, 56353251, 99999999
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
Sequence in context: A232955 A116868 A049976 * A299123 A245455 A296265
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