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.

A256081 Non-palindromic balanced primes in base 2.

This page as a plain text file.
%I A256081 #9 May 29 2018 20:40:49
%S A256081 397,1427,1459,1483,1613,1693,4657,4721,4931,5077,5273,5581,5651,5749,
%T A256081 6043,6329,6637,6701,6791,7127,7211,7547,10069,10937,10979,12011,
%U A256081 12757,13597,13789,18121,18217,18307,18947,19013,19141,19237,19267,19813,19861
%N A256081 Non-palindromic balanced primes in base 2.
%C A256081 Here a number is called balanced if the sum of digits weighted by their arithmetic distance from the "center" is zero. Obviously, all palindromic numbers are balanced; cf. A016041 for base-2 palindromic primes.
%C A256081 These are the primes in A256082. This is the binary variant of the decimal version A256076 suggested by Eric Angelini.
%H A256081 Robert Israel, <a href="/A256081/b256081.txt">Table of n, a(n) for n = 1..10000</a>
%p A256081 filter:= proc(n) local L, m;
%p A256081   L:= convert(n, base, 2);
%p A256081   m:= (1+nops(L))/2;
%p A256081   add(L[i]*(i-m), i=1..nops(L))=0 and isprime(n) and L <> ListTools:-Reverse(L)
%p A256081 end proc: select(filter, [seq(i,i=3..20000,2)]);# _Robert Israel_, May 29 2018
%o A256081 (PARI) is(n,b=2,d=digits(n,b),o=(#d+1)/2)=!(vector(#d,i,i-o)*d~)&&d!=Vecrev(d)&&isprime(n)
%Y A256081 Cf. A016041, A256076, A256075, A256082 - A256089.
%K A256081 nonn,base
%O A256081 1,1
%A A256081 _M. F. Hasler_, Mar 14 2015