|
|
A119368
|
|
Palindromes whose smallest palindromic proper multiple is the number concatenated with itself.
|
|
2
|
|
|
5, 6, 7, 8, 9, 656, 757, 767, 828, 838, 989, 57275, 58085, 65056, 65356, 65456, 65556, 68086, 69296, 73537, 74447, 75057, 75157, 75557, 76067, 76567, 76667, 79197, 82228, 82328, 82428, 83238, 85058, 86068, 86168, 86568, 87278, 87778, 89098
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
First term with an even number of digits is a(389) = 66800866. - Chai Wah Wu, Apr 08 2016
|
|
LINKS
|
|
|
EXAMPLE
|
The smallest palindromic proper multiple of 4 is 8, not the concatenation of 4 with itself, so 4 is not a term.
The smallest palindromic proper multiple of 5 is 55, the concatenation of 5 with itself, so 5 is a term.
|
|
PROG
|
(Python)
from itertools import count, islice
def A119368_gen(): # generator of terms
for n in count(2):
p = (c:=n-x)*x+int(str(c)[-2::-1] or 0) if n<(x:=10**(len(str(n>>1))-1))+(y:=10*x) else (c:=n-y)*y+int(str(c)[::-1] or 0)
for i in count(n+1):
if not (q:=(c:=i-x)*x+int(str(c)[-2::-1] or 0) if i<(x:=10**(len(str(i>>1))-1))+(y:=10*x) else (c:=i-y)*y+int(str(c)[::-1] or 0))%p:
if (s:=str(q)) == (t:=str(p))*(len(s)//len(t)):
yield p
break
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|