OFFSET
1,2
COMMENTS
Note that any number with all digits = 5 (A002279) is part of this sequence. - Jim McCann (jmccann(AT)umich.edu), Jul 16 2002
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..15636 (all terms up to 10^12)
EXAMPLE
151 is a member as 2*151 + 1 = 303 is also a palindrome.
MATHEMATICA
isPalin[n_]:=(n==FromDigits[Reverse[IntegerDigits[n]]]); Do[m = 2 n + 1; If[isPalin[n]&&isPalin[m], Print[n]], {n, 1, 10^5}] (* Vincenzo Librandi, Jan 22 2018 *)
PROG
(Perl) $a = 1; while((@b = split("|", $a) and @c = split("|", 2*$a+1) and (join("", reverse(@b)) eq join("", @b) and join("", reverse(@c)) eq join("", @c) and eval("print \"\$a \"; return 0; "))) or ++$a) { }
(PARI) isok(n) = (d=digits(n)) && (Vecrev(d)==d) && (dd=digits(2*n+1)) && (Vecrev(dd)==dd); \\ Michel Marcus, Jan 22 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 30 2002
EXTENSIONS
More terms from Jim McCann (jmccann(AT)umich.edu), Jul 16 2002
STATUS
approved