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.

A318311 Filter sequence combining A278222(n) and A294898(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 6, 7, 8, 9, 10, 11, 12, 1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 8, 22, 23, 24, 25, 26, 1, 27, 28, 29, 30, 31, 32, 19, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 1, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 10, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 62, 79
Offset: 1

Views

Author

Antti Karttunen, Aug 25 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A278222(n), A294898(n)].
For all i, j: a(i) = a(j) => A318310(i) = A318310(j) => A033879(i) = A033879(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A294898(n) = (A005187(n)-sigma(n));
    A318311aux(n) = [A278222(n), A294898(n)]; \\ Needs also code from A286622.
    v318311 = rgs_transform(vector(up_to,n,A318311aux(n)));
    A318311(n) = v318311[n];