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.

A252737 Row sums of irregular tables A005940, A163511, and A332977.

Original entry on oeis.org

1, 2, 7, 28, 130, 702, 4384, 31516, 260068, 2445372, 25796360, 299286550, 3751803964, 50211590696, 712746859372, 10697637496288, 169490803535680, 2830925427778810, 49785906936838240, 921273098388684878, 17944637546960083042, 368472898102440537484, 7993616254370783660414, 183539682466936703629744
Offset: 0

Views

Author

Antti Karttunen, Dec 21 2014

Keywords

Crossrefs

Row sums of tables A005940, A163511, and A332977.
Cf. A252738 (row products).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-`if`(
          i=0, j, 1), j)*ithprime(j), j=1..`if`(i=0, n, i)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..23);  # Alois P. Heinz, Mar 04 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - If[i == 0, j, 1], j]* Prime[j], {j, 1, If[i == 0, n, i]}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jan 03 2022, after Alois P. Heinz *)
  • PARI
    allocatemem(234567890);
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A252737print(up_to_n) = { my(s, i=0, n=0); for(n=0, up_to_n, if(0 == n, s = 1, if(1 == n, s = 2; lev = vector(1); lev[1] = 2, oldlev = lev; lev = vector(2*length(oldlev)); s = 0; for(i = 0, (2^(n-1))-1, lev[i+1] = if((i%2),A003961(oldlev[(i\2)+1]),2*oldlev[(i\2)+1]); s += lev[i+1]))); write("b252737.txt", n, " ", s)); };
    A252737print(23); \\ Terms a(0) .. a(23) were computed with this program.
    
  • Scheme
    (define (A252737 n) (if (zero? n) 1 (add A163511 (A000079 (- n 1)) (A000225 n))))
    
  • Scheme
    (define (A252737 n) (if (zero? n) 1 (add (COMPOSE A005940 1+) (A000079 (- n 1)) (A000225 n))))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
    (define (COMPOSE . funlist) (cond ((null? funlist) (lambda (x) x)) (else (lambda (x) ((car funlist) ((apply COMPOSE (cdr funlist)) x))))))

Formula

a(0) = 1; for n>1: a(n) = Sum_{k = A000079(n-1) .. A000225(n)} A163511(k) = Sum_{k = 2^(n-1) .. (2^n)-1} A163511(k).