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.

A323784 Prime numbers such that the reverse of the balanced ternary representation is neither prime nor a negated prime.

This page as a plain text file.
%I A323784 #20 Jan 01 2025 22:33:28
%S A323784 3,19,23,41,47,67,79,97,107,109,113,127,131,151,157,167,191,197,211,
%T A323784 227,229,239,251,257,271,281,283,293,307,317,337,349,359,397,409,419,
%U A323784 431,433,439,461,463,491,503,521,523,557,563,571,577,587,593,617,619,631,641,647,653,659,661,673,683,701,733,743,769,787,797
%N A323784 Prime numbers such that the reverse of the balanced ternary representation is neither prime nor a negated prime.
%H A323784 Github, <a href="https://github.com/sneakyweasel/WarpPrimes">Python code repository</a>
%H A323784 Rosetta Code, <a href="http://www.rosettacode.org/wiki/Balanced_ternary">Balanced Ternary Code</a>
%H A323784 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced Ternary</a>
%e A323784 79 is a term:
%e A323784 79 is +00-+ in balanced ternary notation
%e A323784 +00-+ reversed is +-00+
%e A323784 +-00+ is 55 in balanced ternary notation
%e A323784 55 prime factors are 5 and 11
%e A323784 Therefore 55 is not prime.
%e A323784 Therefore the prime number 79 "warps" to the nonprime number 55.
%e A323784 This operation is reversible: 55 "warps" to 79.
%o A323784 (Python) # See Github link.
%o A323784 (PARI) d3(n) = if ((n%3)==2, n\3+1, n\3);
%o A323784 m3(n) = if ((n%3)==2, -1, n % 3);
%o A323784 t(n) = if (n==0, [0], if (abs(n) == 1, [n], concat(m3(n), t(d3(n)))));
%o A323784 f(n) = subst(Pol(Vec(t(n))), x, 3);
%o A323784 isok(n) = isprime(n) && !isprime(abs(f(n))); \\ _Michel Marcus_, Jan 29 2019
%Y A323784 Cf. A134028, A323782.
%Y A323784 Complement of A323782 among primes.
%K A323784 nonn,base
%O A323784 1,1
%A A323784 _Philippe Cochin_, Jan 28 2019