login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224502 Prime numbers (together with one) whose representation in balanced ternary are palindromes. 1

%I

%S 1,7,13,43,61,73,103,367,421,457,547,601,613,757,859,1039,1093,3823,

%T 4021,4561,4723,4759,5743,6211,6373,6481,6949,7219,7489,7933,8563,

%U 8941,9103,9679,29527,30013,31147,31741,33037,35251,36061,36097,36583,37717,39607,41011,42667,43963,44773,45691,47581,49201

%N Prime numbers (together with one) whose representation in balanced ternary are palindromes.

%C Intersection of A006005 and A134027.

%H 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 Wikipedia, <a href="http://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a>

%e For n=5, a(5)=61 and in balanced ternary notation is 1ī1ī1.

%o (PARI)

%o bt(k,n)={

%o sum(i=0,(n-1)\2,

%o my(t=k%3-1);

%o k\=3;

%o n--;

%o if(n==i,3^n,3^i+3^n)*t

%o )

%o };

%o do(N)={

%o my(v=List([1]),t);

%o for(n=1,N,

%o forstep(k=2,3^((n+1)\2)-1,3,

%o t=bt(k,n);

%o if(isprime(t),listput(v,t))

%o )

%o );

%o vecsort(Vec(v))

%o }; \\ _Charles R Greathouse IV_, Apr 08 2013

%K nonn,base

%O 1,2

%A _Malachi de Ælfweald_, Apr 08 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 24 03:21 EDT 2017. Contains 286937 sequences.