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.
%I A111309 #14 Nov 13 2024 16:59:28 %S A111309 2,3,5,7,2,4,8,10,1,7,4,10,3,1,3,8,14,5,1,8,10,16,5,1,16,2,4,8,10,5,6, %T A111309 5,11,13,6,7,13,2,2,11,17,6,11,13,17,19,0,1,3,5,4,10,5,4,10,5,1,6,12, %U A111309 9,7,10,10,5,7,11,7,13,6,8,11,17,4,13,19,2,4,19,3,5,6,5,0,2,8,5,1,8,9,7,3 %N A111309 Absolute difference between the sum of the odd digits and the sum of the even digits of the n-th prime. %H A111309 Robert Israel, <a href="/A111309/b111309.txt">Table of n, a(n) for n = 1..10000</a> %H A111309 Ivars Peterson, <a href="http://mathtourist.blogspot.com/2010/06/light-rings.html">Light Rings</a> %e A111309 a(9)=1 because the 9th prime is 23 and the absolute difference between 2 & 3 is 1. %p A111309 f:= proc(n) local Lo,Le; %p A111309 Lo,Le:= selectremove(type,convert(n,base,10),odd); %p A111309 abs(convert(Lo,`+`)-convert(Le,`+`)) %p A111309 end proc: %p A111309 map(f, [seq(ithprime(i),i=1..100)]); # _Robert Israel_, Nov 12 2024 %t A111309 f[n_] := (id = IntegerDigits[ Prime[n]]; Abs[(Plus @@ id) - 2Plus @@ Select[id, OddQ]]); Table[f[n], {n, 91}] %Y A111309 Cf. A071650, A076167. %K A111309 nonn,base %O A111309 1,1 %A A111309 _Zak Seidov_ and _Robert G. Wilson v_, Mar 02 2005 %E A111309 Edited by _Charles R Greathouse IV_, Aug 04 2010