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 A106738 #23 Jul 02 2024 07:18:57 %S A106738 13,251,4031,52017,652039,7746369,89721621,1019145113,11401770915, %T A106738 126048548239 %N A106738 Difference between the sums of odd-indexed primes and even-indexed primes up to and including index 10^n. %F A106738 a(n) = Sum2 - Sum1, where Sum1 = prime(1) + prime(3) + ... + prime(10^n-1), and Sum2 = prime(2) + prime(4) + ... + prime(10^n). %F A106738 a(n) = Sum_{i=1..10^n} (-1)^i*A000040(i). - _R. J. Mathar_, Feb 13 2008 %F A106738 a(n) = A077133(10^n/2). - _Amiram Eldar_, Jul 02 2024 %p A106738 A106738 := proc(n) local a,i ; a :=0 ; for i from 1 to 10^n do a := a+(-1)^i*ithprime(i) ; od: RETURN(a) ; end: for n from 1 do print(A106738(n)) ; od: # _R. J. Mathar_, Feb 13 2008 %t A106738 a[n_] := Module[{a = 0}, For[i = 1, i <= 10^n, i++, a = a + (-1)^i*Prime[i]]; a]; Table[Print[an = a[n]]; an, {n, 1, 8}] (* _Jean-François Alcover_, Dec 17 2012, after _R. J. Mathar_ *) %o A106738 (PARI) lista(pmax) = {my(pow = 10, k = 0, s = 0); forprime(p = 1, pmax, k++; s += ((-1)^k * p); if(k == pow, print1(s, ", "); pow *= 10));} \\ _Amiram Eldar_, Jul 02 2024 %Y A106738 Cf. A000040, A031215, A031368, A077126, A077131, A077133. %K A106738 nonn,more %O A106738 1,1 %A A106738 _Cino Hilliard_, May 15 2005 %E A106738 Edited by _R. J. Mathar_, Feb 13 2008 %E A106738 a(7)-a(8) from _Donovan Johnson_, Nov 30 2008 %E A106738 a(9)-a(10) from _Amiram Eldar_, Jul 02 2024