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.

A304740 Restricted growth sequence transform of A304760(n), formed from 1-digits in ternary representation of A254103(n).

Original entry on oeis.org

1, 2, 1, 3, 3, 4, 1, 1, 5, 6, 6, 2, 3, 7, 6, 8, 9, 4, 1, 6, 10, 1, 1, 5, 5, 11, 11, 3, 10, 12, 12, 8, 13, 6, 6, 14, 3, 15, 11, 1, 16, 17, 12, 14, 3, 17, 12, 2, 9, 18, 19, 2, 20, 4, 1, 12, 16, 4, 1, 11, 21, 12, 12, 2, 22, 4, 1, 23, 10, 19, 19, 14, 5, 24, 24, 2, 20, 7, 6, 25, 26, 23, 23, 3, 21, 19, 19, 25, 5, 23, 23, 10, 21, 1, 1, 10, 13, 27, 27, 21, 28, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 29 2018

Keywords

Crossrefs

Cf. also A304746.

Programs

  • PARI
    A254103(n) = if(!n,n,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2));
    A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
    A304760(n) = A289813(A254103(n));
    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; };
    v304740 = rgs_transform(vector(65538,n,A304760(n-1)));
    A304740(n) = v304740[1+n];