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.

A297161 Restricted growth sequence transform of A297171, which is Möbius transform of A243071.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 27 2017

Keywords

Crossrefs

Programs

  • PARI
    up_to = 8192;
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A243071(n) = if(n<=2, n-1, if(!(n%2), 2*A243071(n/2), 1+(2*A243071(A064989(n)))));
    A297171(n) = sumdiv(n,d,moebius(n/d)*A243071(d));
    write_to_bfile(1,rgs_transform(vector(up_to,n,A297171(n))),"b297161.txt");