cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A032789 Numbers k such that (k*(k+1)*(k+2)) / (k+(k+1)+(k+2)) is a palindrome.

This page as a plain text file.
%I A032789 #22 Jan 25 2022 08:30:38
%S A032789 0,1,3,4,9,21,42,99,154,237,405,999,9999,18991,19291,22021,23587,
%T A032789 40293,45072,99999,137652,999999,1278343,1360456,3162199,3162499,
%U A032789 4029705,4365396,4418236,6052891,9999999,31496589,40289205,41276535,44295036,56353251,99999999
%N A032789 Numbers k such that (k*(k+1)*(k+2)) / (k+(k+1)+(k+2)) is a palindrome.
%C A032789 Equivalently, numbers k such that (2k + k^2)/3 is a palindrome. - _Harvey P. Dale_, Sep 02 2015
%C A032789 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
%H A032789 Michael S. Branicky, <a href="/A032789/b032789.txt">Table of n, a(n) for n = 1..48</a>
%t A032789 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 *)
%o A032789 (Python)
%o A032789 from itertools import count, islice
%o A032789 def ispal(n): s = str(n); return s == s[::-1]
%o A032789 def agen():
%o A032789     for k in count(0):
%o A032789         q, r = divmod(k*(k+2), 3)
%o A032789         if r == 0 and ispal(q):
%o A032789             yield k, q
%o A032789 print([k for k, q in islice(agen(), 31)]) # _Michael S. Branicky_, Jan 24 2022
%Y A032789 Cf. A002113, A032790.
%K A032789 nonn,base
%O A032789 1,3
%A A032789 _Patrick De Geest_, May 15 1998
%E A032789 Definition clarified by _Harvey P. Dale_, Sep 02 2015
%E A032789 a(32) and beyond from _Michael S. Branicky_, Jan 24 2022