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.

Showing 1-2 of 2 results.

A286547 Restricted growth sequence of A286546 (A006068(n) - n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 18 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])); }
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ Essentially Joerg Arndt's Jul 19 2012 code.
    A286546(n) = (A006068(n)-n);
    write_to_bfile(0,rgs_transform(vector(16384,n,A286546(n-1))),"b286547.txt");

A286548 a(n) = A003188(n) - n.

Original entry on oeis.org

0, 0, 1, -1, 2, 2, -1, -3, 4, 4, 5, 3, -2, -2, -5, -7, 8, 8, 9, 7, 10, 10, 7, 5, -4, -4, -3, -5, -10, -10, -13, -15, 16, 16, 17, 15, 18, 18, 15, 13, 20, 20, 21, 19, 14, 14, 11, 9, -8, -8, -7, -9, -6, -6, -9, -11, -20, -20, -19, -21, -26, -26, -29, -31, 32, 32, 33, 31, 34, 34, 31, 29, 36, 36, 37, 35, 30, 30, 27, 25, 40, 40
Offset: 0

Views

Author

Antti Karttunen, May 18 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A003188(n) - n.
a(n) = -A286546(A003188(n)). - Antti Karttunen, Oct 02 2017
Showing 1-2 of 2 results.