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.

A069881 Numbers n such that n and 2n+1 are both palindromes.

This page as a plain text file.
%I A069881 #12 Jan 22 2018 03:59:30
%S A069881 1,2,3,4,5,55,151,161,171,181,191,252,262,272,282,292,353,363,373,383,
%T A069881 393,454,464,474,484,494,555,5555,15051,15151,15251,15351,15451,16061,
%U A069881 16161,16261,16361,16461,17071,17171,17271,17371,17471,18081,18181
%N A069881 Numbers n such that n and 2n+1 are both palindromes.
%C A069881 Note that any number with all digits = 5 (A002279) is part of this sequence. - Jim McCann (jmccann(AT)umich.edu), Jul 16 2002
%H A069881 Ivan Neretin, <a href="/A069881/b069881.txt">Table of n, a(n) for n = 1..15636</a> (all terms up to 10^12)
%e A069881 151 is a member as 2*151 + 1 = 303 is also a palindrome.
%t A069881 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 *)
%o A069881 (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) { }
%o A069881 (PARI) isok(n) = (d=digits(n)) && (Vecrev(d)==d) && (dd=digits(2*n+1)) && (Vecrev(dd)==dd); \\ _Michel Marcus_, Jan 22 2018
%Y A069881 Subsequence of A002113.
%K A069881 nonn,base
%O A069881 1,2
%A A069881 _Amarnath Murthy_, Apr 30 2002
%E A069881 More terms from Jim McCann (jmccann(AT)umich.edu), Jul 16 2002