login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338398 Inverse boustrophedon transform of the primes. 1

%I #9 Jun 11 2022 01:19:57

%S 2,1,1,-3,-1,-29,33,-315,1251,-7905,48667,-344723,2623549,-21739937,

%T 193680399,-1849767375,18840708855,-203907377005,2336594492591,

%U -28262970918841,359855118160333,-4810909461068941,67379837645787507,-986592769520379701

%N Inverse boustrophedon transform of the primes.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BoustrophedonTransform.html">Boustrophedon Transform</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>

%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>

%F a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A000111(n-k) * A000040(k+1).

%o (Python)

%o import sympy

%o def A338398(n):

%o T=[]

%o for k in range(n+1):

%o T.append(sympy.prime(k+1))

%o T.reverse()

%o for i in range(k):

%o T[i+1]=T[i]-T[i+1]

%o return T[-1]

%o (Python)

%o from itertools import accumulate, islice, count

%o from operator import sub

%o from sympy import prime

%o def A338398_gen(): # generator of terms

%o blist = tuple()

%o for i in count(1):

%o yield (blist := tuple(accumulate(reversed(blist),func=sub,initial=prime(i))))[-1]

%o A338398_list = list(islice(A338398_gen(),20)) # _Chai Wah Wu_, Jun 10 2022

%Y Cf. A000040, A000111, A000747.

%K sign

%O 0,1

%A _Pontus von Brömssen_, Oct 24 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)