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.

Showing 1-2 of 2 results.

A030015 Binomial transform of {1, primes}.

Original entry on oeis.org

1, 3, 8, 21, 54, 137, 342, 837, 2006, 4713, 10882, 24771, 55764, 124465, 275934, 608283, 1334120, 2911871, 6325092, 13674121, 29425308, 63042233, 134517426, 285984131, 606056546, 1280778343, 2700105566, 5680099085, 11925792492, 24993841655, 52291456452
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[{1, Table[1 + Sum[Binomial[n, k]*Prime[k], {k, 1, n}], {n, 1, 30}]}] (* Vaclav Kotesovec, Oct 29 2017 *)

Formula

G.f.: Prime(x/(1-x)), Prime(x) = Sum_{n>0} A008578(n)*x^n. - Vladimir Kruchinin, Aug 11 2010

A333176 a(n) = Sum_{k=1..n} (binomial(n,k) mod 2) * prime(k).

Original entry on oeis.org

2, 3, 10, 7, 20, 23, 58, 19, 44, 51, 112, 63, 140, 151, 328, 53, 114, 117, 250, 131, 276, 287, 604, 161, 342, 355, 742, 383, 798, 825, 1720, 131, 270, 273, 566, 289, 596, 607, 1252, 323, 664, 675, 1392, 711, 1458, 1481, 3046, 407, 832, 839, 1718, 875, 1782
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 10 2020

Keywords

Crossrefs

Programs

  • Maple
    N:= 200: # for a(1) .. a(N)
    P:= [seq(ithprime(i),i=1..N)]:
    B:= [1,1]: R:= 2:
    for n from 2 to N do
      B:= [1,op(B[2..-1]+B[1..-2] mod 2),1];
      R:= R, convert(P[select(t -> B[t+1] = 1,[$1..n])],`+`);
    od:
    R; # Robert Israel, Jan 29 2025
  • Mathematica
    Table[Sum[Mod[Binomial[n, k], 2] Prime[k], {k, 1, n}], {n, 1, 53}]
  • PARI
    a(n) = sum(k=1, n, if (binomial(n, k) % 2, prime(k))); \\ Michel Marcus, Mar 10 2020
    
  • Python
    from sympy import prime
    def A333176(n): return sum(prime(k) for k in range(1,n+1) if not ~n&k) # Chai Wah Wu, Jul 22 2025

Formula

Sum_{k=1..n} (-1)^A010060(n-k) * (binomial(n,k) mod 2) * a(k) = prime(n).
Showing 1-2 of 2 results.