login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A256081
Non-palindromic balanced primes in base 2.
4
397, 1427, 1459, 1483, 1613, 1693, 4657, 4721, 4931, 5077, 5273, 5581, 5651, 5749, 6043, 6329, 6637, 6701, 6791, 7127, 7211, 7547, 10069, 10937, 10979, 12011, 12757, 13597, 13789, 18121, 18217, 18307, 18947, 19013, 19141, 19237, 19267, 19813, 19861
OFFSET
1,1
COMMENTS
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.
These are the primes in A256082. This is the binary variant of the decimal version A256076 suggested by Eric Angelini.
LINKS
MAPLE
filter:= proc(n) local L, m;
L:= convert(n, base, 2);
m:= (1+nops(L))/2;
add(L[i]*(i-m), i=1..nops(L))=0 and isprime(n) and L <> ListTools:-Reverse(L)
end proc: select(filter, [seq(i, i=3..20000, 2)]); # Robert Israel, May 29 2018
PROG
(PARI) is(n, b=2, d=digits(n, b), o=(#d+1)/2)=!(vector(#d, i, i-o)*d~)&&d!=Vecrev(d)&&isprime(n)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Mar 14 2015
STATUS
approved