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.

A338398 Inverse boustrophedon transform of the primes.

This page as a plain text file.
%I A338398 #9 Jun 11 2022 01:19:57
%S A338398 2,1,1,-3,-1,-29,33,-315,1251,-7905,48667,-344723,2623549,-21739937,
%T A338398 193680399,-1849767375,18840708855,-203907377005,2336594492591,
%U A338398 -28262970918841,359855118160333,-4810909461068941,67379837645787507,-986592769520379701
%N A338398 Inverse boustrophedon transform of the primes.
%H A338398 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BoustrophedonTransform.html">Boustrophedon Transform</a>
%H A338398 Wikipedia, <a href="https://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>
%H A338398 <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>
%F A338398 a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A000111(n-k) * A000040(k+1).
%o A338398 (Python)
%o A338398 import sympy
%o A338398 def A338398(n):
%o A338398   T=[]
%o A338398   for k in range(n+1):
%o A338398     T.append(sympy.prime(k+1))
%o A338398     T.reverse()
%o A338398     for i in range(k):
%o A338398       T[i+1]=T[i]-T[i+1]
%o A338398   return T[-1]
%o A338398 (Python)
%o A338398 from itertools import accumulate, islice, count
%o A338398 from operator import sub
%o A338398 from sympy import prime
%o A338398 def A338398_gen(): # generator of terms
%o A338398     blist = tuple()
%o A338398     for i in count(1):
%o A338398         yield (blist := tuple(accumulate(reversed(blist),func=sub,initial=prime(i))))[-1]
%o A338398 A338398_list = list(islice(A338398_gen(),20)) # _Chai Wah Wu_, Jun 10 2022
%Y A338398 Cf. A000040, A000111, A000747.
%K A338398 sign
%O A338398 0,1
%A A338398 _Pontus von Brömssen_, Oct 24 2020