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.

A072453 Shadow transform of A000522.

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 0, 0, 1, 0, 2, 0, 0, 3, 0, 0, 1, 0, 0, 2, 2, 0, 0, 2, 0, 2, 3, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 3, 2, 0, 2, 1, 0, 1, 0, 0, 2, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 6, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 4, 0, 1, 0, 0, 2, 0, 0, 1, 3
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2002

Keywords

Crossrefs

Programs

  • Maple
    A000522 := proc(n)
        add(n!/k!,k=0..n) ;
    end proc:
    shadD := proc(a)
        local s,n ;
        s := {} ;
        for n from 0 to a-1 do
            if A000522(n) mod a = 0 then
                s := s union {n} ;
            end if;
        end do:
        s ;
    end proc:
    A072453 := proc(a)
        nops(shadD(a)) ;
    end proc: # R. J. Mathar, Jun 24 2013
    # second Maple program:
    b:= proc(n) option remember; n*b(n-1)+1 end: b(0):=1:
    a:= n-> add(`if`(irem(b(j), n)=0, 1, 0), j=0..n-1):
    seq(a(n), n=0..150);  # Alois P. Heinz, Jun 28 2018
  • Mathematica
    b[n_] := b[n] = n*b[n - 1] + 1 ; b[0] = 1;
    a[n_] := Sum[If[Mod[b[j], n] == 0, 1, 0], {j, 0, n - 1}];
    a /@ Range[0, 104] (* Jean-François Alcover, Jan 15 2020, after Alois P. Heinz *)

Extensions

More terms from Christian G. Bower, Jun 08 2005