login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115259 Difference between the sum of digits in odd positions and the sum of digits in even positions of prime numbers. 3

%I #16 Sep 15 2023 11:56:45

%S 2,3,5,7,0,2,6,8,1,7,-2,4,-3,-1,3,-2,4,-5,1,-6,-4,2,-5,1,-2,2,4,8,10,

%T 3,6,-1,5,7,6,-3,3,-2,2,-3,3,-6,-7,-5,-1,1,2,3,7,9,2,8,-1,-2,4,-1,5,

%U -4,2,-5,-3,-4,10,3,5,9,1,7,6,8,1,7,4,-1,5,-2,4,1,5,13,12,3,2,4,10,3,9,6,-1,1,5,6,3,-4,4,8,14,4,6,2,8,7,2,8,-1,5,4,-1,5,7

%N Difference between the sum of digits in odd positions and the sum of digits in even positions of prime numbers.

%C Zero corresponds to the prime 11. It is easy to show that there is no other zero: if the difference of odd-even digits of a number is zero, the number is a multiple of 11, i.e., it is not a prime.

%C Positions are counted from the least to the most significant digit, so for prime 17 the odd digit is 7 and the even digit is 1. - _Harvey P. Dale_, Dec 15 2022

%H Harvey P. Dale, <a href="/A115259/b115259.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A055017(A000040(n)). - _R. J. Mathar_, Aug 26 2011

%e a(37) = 3 because 37th prime = 157, (7+1) - 5 = 3.

%p A115259 := proc(n) A055017(ithprime(n)) ; end proc: # _R. J. Mathar_, Aug 26 2011

%t Table[Total[Take[Reverse[IntegerDigits[p]],{1,-1,2}]]-Total[Take[Reverse[IntegerDigits[p]],{2,-1,2}]],{p,Prime[Range[120]]}] (* _Harvey P. Dale_, Dec 15 2022 *)

%Y Cf. A040997, A055017, A063792, A087593, A042939, A041000, A040164, A115260, A115261.

%K base,sign

%O 1,1

%A _Giorgio Balzarotti_ and _Paolo P. Lava_, Jan 20 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)