Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A185107
a(n) is the first digit of prime(n) minus the sum of the other digits.
1
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, 0, -2, -6, -8, -3, -8, -3, -9, -11, -12, -5, -11, -8, -12, -9, -15, -8, -9, -11, -15, -17, 0, -3, -7, -9, -4, -10, -3, -4, -10, -7, -13
OFFSET
1,1
COMMENTS
Absolute terms are the same as A042939.
LINKS
MATHEMATICA
Table[With[{id=IntegerDigits[Prime[n]]}, id[[1]]-Total[Rest[id]]], {n, 60}] (* Harvey P. Dale, Oct 04 2024 *)
PROG
(PARI) a(n) = {digs = digits(prime(n)); digs[1] - sum(i=2, #digs, digs[i]); } \\ Michel Marcus, Aug 30 2013
CROSSREFS
KEYWORD
sign,base,less
AUTHOR
Dario Piazzalunga, Dec 27 2012
EXTENSIONS
a(38) corrected by Michel Marcus, Jun 14 2022
STATUS
approved