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.
%I A224502 #22 May 13 2013 01:54:23 %S A224502 1,7,13,43,61,73,103,367,421,457,547,601,613,757,859,1039,1093,3823, %T A224502 4021,4561,4723,4759,5743,6211,6373,6481,6949,7219,7489,7933,8563, %U A224502 8941,9103,9679,29527,30013,31147,31741,33037,35251,36061,36097,36583,37717,39607,41011,42667,43963,44773,45691,47581,49201 %N A224502 Prime numbers (together with one) whose representation in balanced ternary are palindromes. %C A224502 Intersection of A006005 and A134027. %H A224502 Malachi de Ælfweald and Charles R Greathouse IV, <a href="/A224502/b224502.txt">Table of n, a(n) for n = 1..10000</a> (first 199 terms from Malachi de Ælfweald) %H A224502 Wikipedia, <a href="http://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a> %e A224502 For n=5, a(5)=61 and in balanced ternary notation is 1ī1ī1. %o A224502 (PARI) %o A224502 bt(k,n)={ %o A224502 sum(i=0,(n-1)\2, %o A224502 my(t=k%3-1); %o A224502 k\=3; %o A224502 n--; %o A224502 if(n==i,3^n,3^i+3^n)*t %o A224502 ) %o A224502 }; %o A224502 do(N)={ %o A224502 my(v=List([1]),t); %o A224502 for(n=1,N, %o A224502 forstep(k=2,3^((n+1)\2)-1,3, %o A224502 t=bt(k,n); %o A224502 if(isprime(t),listput(v,t)) %o A224502 ) %o A224502 ); %o A224502 vecsort(Vec(v)) %o A224502 }; \\ _Charles R Greathouse IV_, Apr 08 2013 %K A224502 nonn,base %O A224502 1,2 %A A224502 _Malachi de Ælfweald_, Apr 08 2013