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.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Mar 14 2015

Keywords

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.

Crossrefs

Programs

  • 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
  • PARI
    is(n,b=2,d=digits(n,b),o=(#d+1)/2)=!(vector(#d,i,i-o)*d~)&&d!=Vecrev(d)&&isprime(n)