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
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, 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, -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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.
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
LINKS
FORMULA
a(n) = A055017(A000040(n)). - R. J. Mathar, Aug 26 2011
EXAMPLE
a(37) = 3 because 37th prime = 157, (7+1) - 5 = 3.
MAPLE
A115259 := proc(n) A055017(ithprime(n)) ; end proc: # R. J. Mathar, Aug 26 2011
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A041000 A185107 A042939 * A039709 A346512 A104250
KEYWORD
base,sign
AUTHOR
STATUS
approved

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)