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.

A256076 Non-palindromic balanced primes.

This page as a plain text file.
%I A256076 #9 May 29 2018 16:40:28
%S A256076 1823,1933,2141,2251,2633,2963,3061,3391,4091,4253,4363,4583,5393,
%T A256076 5717,5827,6637,6857,6967,7829,8147,8419,8969,9067,9397,14303,14503,
%U A256076 15013,15313,15413,15913,16223,16823,17033,17333,18043,18143,18443,18743,19553,19753,19853
%N A256076 Non-palindromic balanced primes.
%C A256076 Here a number is called balanced if the sum of digits weighted by their arithmetic distance from the "center" is zero. Palindromic primes (A002385) are "trivially" balanced, so they are excluded here.
%C A256076 These are the primes in A256075, see there for further information.
%C A256076 See A256081 for the binary version and A256090 for the hexadecimal version.
%H A256076 Robert Israel, <a href="/A256076/b256076.txt">Table of n, a(n) for n = 1..10000</a>
%e A256076 a(1)=1823 is balanced because 1*3/2 + 8*1/2 = 2*1/2 + 3*3/2.
%p A256076 filter:= proc(n) local L,m;
%p A256076   L:= convert(n,base,10);
%p A256076   m:= (1+nops(L))/2;
%p A256076 add(L[i]*(i-m),i=1..nops(L))=0  and isprime(n) and L <> ListTools:-Reverse(L)
%p A256076 end proc:
%p A256076 select(filter, [seq(i,i=1001..20000,2)]); # _Robert Israel_, May 29 2018
%o A256076 (PARI) is(n,d=digits(n),o=(#d+1)/2)=!(vector(#d,i,i-o)*d~)&&d!=Vecrev(d)&&isprime(n)
%Y A256076 Cf. A256075, A256081, A256090, A002385.
%K A256076 nonn,base
%O A256076 1,1
%A A256076 _Eric Angelini_ and _M. F. Hasler_, Mar 14 2015