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 A007442 M0065 #95 Jun 27 2025 22:10:59 %S A007442 2,1,1,-1,3,-9,23,-53,115,-237,457,-801,1213,-1389,445,3667,-15081, %T A007442 41335,-95059,195769,-370803,652463,-1063359,1570205,-1961755,1560269, %U A007442 1401991,-11023119,36000427,-93408425,214275735,-450374071,879254493,-1599245737,2695465017 %N A007442 Inverse binomial transform of primes. %C A007442 a(n) is the (n-1)-st difference of the first n primes. Although the magnitude of the terms appears to grow exponentially, a plot shows that the sequence a(n)/2^n has quite a bit of structure. See A082594 for an interesting application. - _T. D. Noe_, May 09 2003 %C A007442 Graph this divided by A122803 using plot2! - _Franklin T. Adams-Watters_ %C A007442 From _Robert G. Wilson v_, Jan 28 2020: (Start) %C A007442 a(n) is odd for all n>1. %C A007442 As opposed to A331573, there are terms where abs(a(n)) >= abs(a(n+1)). (End) %D A007442 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007442 Robert G. Wilson v, <a href="/A007442/b007442.txt">Table of n, a(n) for n = 1..3321</a> (first 1000 from Franklin T. Adams-Watters) %H A007442 Vaclav Kotesovec, <a href="/A007442/a007442.jpg">Plot of |a(n)|^(1/n) for n = 1..10000</a> %H A007442 T. D. Noe, <a href="http://www.sspectra.com/math/A007442.gif">Plot of A007442</a> %H A007442 N. J. A. Sloane, <a href="/transforms.txt">Transforms</a> %H A007442 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BinomialTransform.html">Binomial Transform</a> %F A007442 a(n) = Sum_{k=0..n-1} (-1)^(n-k-1) binomial(n-1, k) prime(k+1). %F A007442 a(n) = A095195(n,n-1). - _Alois P. Heinz_, Sep 25 2013 %F A007442 G.f.: Sum_{k>=1} prime(k)*x^k/(1 + x)^k. - _Ilya Gutkovskiy_, Apr 23 2019 %e A007442 a(4) = 7 - 3*5 + 3*3 - 2 = -1. %t A007442 Diff[lst_List] := Table[lst[[i + 1]] - lst[[i]], {i, Length[lst] - 1}]; n=1000; dt = Prime[Range[n]]; a = Range[n]; a[[1]] = 2; Do[dt = Diff[dt]; a[[i]] = dt[[1]], {i, 2, n}]; a %t A007442 u = Table[Prime[Range[k]], {k, 1, 100}];Flatten[Table[Differences[u[[k]], k - 1], {k, 1, 100}]] (* _Clark Kimberling_, May 15 2015 *) %t A007442 t = Array[Prime, 30]; f[x_] := Rest[x] - Most[x]; %t A007442 Flatten[Last /@ (NestList[f, t[[1 ;; #]], (# - 1)] & /@ Range[1, 29])] (* _Horst H. Manninger_, Mar 22 2021 *) %o A007442 (PARI) vector(50, n, sum(k=0, n-1,(-1)^(n-k-1)*binomial(n-1, k)*prime(k+1))) \\ _Altug Alkan_, Oct 17 2015 %Y A007442 Cf. A007443, A082594, A095195, A122803, A331573. %K A007442 sign,easy %O A007442 1,1 %A A007442 _N. J. A. Sloane_ %E A007442 Incorrect conjecture concerning the sign of even terms removed by _Glen Whitney_, Nov 10 2024