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.

A286448 Restricted growth sequence computed for A252748 (= A003961(n) - 2*n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Programs

  • PARI
    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])); }
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from Michel Marcus
    A252748(n) = (A003961(n) - (2*n));
    write_to_bfile(1,rgs_transform(vector(10000,n,A252748(n))),"b286448.txt");