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.

User: Malachi de Ælfweald

Malachi de Ælfweald's wiki page.

Malachi de Ælfweald has authored 1 sequences.

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

Original entry on oeis.org

1, 7, 13, 43, 61, 73, 103, 367, 421, 457, 547, 601, 613, 757, 859, 1039, 1093, 3823, 4021, 4561, 4723, 4759, 5743, 6211, 6373, 6481, 6949, 7219, 7489, 7933, 8563, 8941, 9103, 9679, 29527, 30013, 31147, 31741, 33037, 35251, 36061, 36097, 36583, 37717, 39607, 41011, 42667, 43963, 44773, 45691, 47581, 49201
Offset: 1

Author

Malachi de Ælfweald, Apr 08 2013

Keywords

Comments

Intersection of A006005 and A134027.

Examples

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

Programs

  • PARI
    bt(k,n)={
        sum(i=0,(n-1)\2,
            my(t=k%3-1);
            k\=3;
            n--;
            if(n==i,3^n,3^i+3^n)*t
        )
    };
    do(N)={
        my(v=List([1]),t);
        for(n=1,N,
            forstep(k=2,3^((n+1)\2)-1,3,
                t=bt(k,n);
                if(isprime(t),listput(v,t))
            )
        );
        vecsort(Vec(v))
    }; \\ Charles R Greathouse IV, Apr 08 2013