login
A028570
Numbers k such that k*(k + 9) is a palindrome.
2
0, 2, 12, 44, 137, 157, 167, 248, 258, 1639, 1664, 1694, 5392, 15904, 16997, 160187, 487619, 1547147, 14674184, 14790532, 15019614, 15336644, 25234083, 26132578, 26211438, 26216753, 48675319, 49407017, 52030352, 54072524, 151698472, 164399727, 497665874
OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..42
Erich Friedman, What's Special About This Number? (See entries 258, 1664.)
MATHEMATICA
Select[Range[0, 9999], PalindromeQ[#^2 + 9#] &] (* Alonso del Arte, Nov 10 2019 *)
PROG
(Scala) def palQ(n: Int, b: Int = 10): Boolean = n - Integer.parseInt(n.toString.reverse) == 0
(0 to 9999).filter((n: Int) => palQ(n * n + 9 * n)) // Alonso del Arte, Nov 10 2019
(Magma) f:=func<n| Intseq(n) eq Reverse(Intseq(n))>; [k:k in [0..2*10^7]| f(k*(k+9))]; // Marius A. Burtea, Nov 11 2019
(Python)
from itertools import count, islice
def ispal(n): s = str(n); return s == s[::-1]
def agen():
for k in count(0):
if ispal(k*(k+9)):
yield k
print(list(islice(agen(), 18))) # Michael S. Branicky, Jan 25 2022
CROSSREFS
Sequence in context: A203278 A013704 A025495 * A009074 A371487 A356868
KEYWORD
nonn,base
EXTENSIONS
a(27) and beyond from Michael S. Branicky, Jan 25 2022
STATUS
approved