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.

A332902 a(1) = 1, then after the first differences of A332809.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, -2, 2, 0, 1, 0, 1, 1, 1, -5, 1, 3, 1, -2, 4, -2, 1, -2, 0, 2, -1, 2, 1, 1, 1, -9, 11, -9, 10, -6, 1, 1, 1, -5, 1, 6, 1, -5, 5, -3, 1, -5, 7, -6, 2, 0, 1, -1, 2, -1, 2, 0, 1, 0, 1, 1, 0, -13, 15, 1, 1, -14, 16, -2, 1, -10, 1, 1, 4, -3, 12, -10, 1, -9, 3, -1, 1, 7, -6, 8, 1, -9, 1, 7, 4, -9, 8, -6, 7, -15, 1, 10
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Crossrefs

Programs

  • PARI
    up_to = 105;
    A332809list(up_to) = { my(v=vector(up_to)); v[1] = Set([1]); for(n=2,up_to, my(f=factor(n)[, 1]~, s=Set([n])); for(i=1,#f,s = setunion(s,v[n-(n/f[i])])); v[n] = s); apply(length,v); }
    v332809 = A332809list(up_to);
    A332809(n) = v332809[n];
    A332902(n) = if(1==n,n,(A332809(n)-A332809(n-1)));

Formula

a(1) = 1, and for n > 1, a(n) = A332809(n) - A332809(n-1).
a(p) = 1 for all primes p.