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.

A030281 COMPOSE natural numbers with primes.

Original entry on oeis.org

2, 11, 53, 237, 1013, 4196, 16992, 67647, 265743, 1032827, 3979023, 15217248, 57835016, 218636365, 822691425, 3083074193, 11512489353, 42851360088, 159043175322, 588767623587, 2174488780469, 8013945343961, 29477541831841, 108233492257428, 396751988675780
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0], (p->
          p+[0, p[1]])(add(ithprime(j)*b(n-j), j=1..n)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=1..27);  # Alois P. Heinz, Sep 11 2019
  • Mathematica
    b[n_] := b[n] = If[n==0, {1, 0}, #+{0, #[[1]]}&[Sum[Prime[j] b[n-j], {j, 1, n}]]];
    a[n_] := b[n][[2]];
    Array[a, 27] (* Jean-François Alcover, Nov 09 2020, after Alois P. Heinz *)

Formula

G.f.: Sum_{j>=1} j*(Sum_{k>=1} prime(k)*x^k)^j. - Ilya Gutkovskiy, Apr 21 2019
a(n) = Sum_{k=0..n} k * A340991(n,k). - Alois P. Heinz, Feb 01 2021