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.

A185107 a(n) is the first digit of prime(n) minus the sum of the other digits.

This page as a plain text file.
%I A185107 #49 Oct 04 2024 14:34:41
%S A185107 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,
%T A185107 -8,-3,-8,-3,-9,-11,-12,-5,-11,-8,-12,-9,-15,-8,-9,-11,-15,-17,0,-3,
%U A185107 -7,-9,-4,-10,-3,-4,-10,-7,-13
%N A185107 a(n) is the first digit of prime(n) minus the sum of the other digits.
%C A185107 Absolute terms are the same as A042939.
%H A185107 Harvey P. Dale, <a href="/A185107/b185107.txt">Table of n, a(n) for n = 1..1000</a>
%t A185107 Table[With[{id=IntegerDigits[Prime[n]]},id[[1]]-Total[Rest[id]]],{n,60}] (* _Harvey P. Dale_, Oct 04 2024 *)
%o A185107 (PARI) a(n) = {digs = digits(prime(n)); digs[1] - sum(i=2, #digs, digs[i]);} \\ _Michel Marcus_, Aug 30 2013
%Y A185107 Cf. A000040, A042939, A007605.
%K A185107 sign,base,less
%O A185107 1,1
%A A185107 _Dario Piazzalunga_, Dec 27 2012
%E A185107 a(38) corrected by _Michel Marcus_, Jun 14 2022