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-3 of 3 results.

A302795 Restricted growth sequence transform of A278222(A302793(n)).

Original entry on oeis.org

1, 2, 3, 4, 2, 3, 2, 5, 6, 4, 2, 7, 4, 7, 4, 3, 5, 4, 2, 7, 4, 8, 9, 6, 7, 7, 10, 3, 7, 10, 5, 11, 9, 9, 2, 7, 4, 8, 12, 4, 7, 8, 12, 13, 8, 9, 7, 14, 4, 7, 10, 3, 7, 6, 7, 15, 12, 9, 5, 15, 4, 14, 16, 9, 11, 4, 2, 7, 12, 8, 9, 4, 7, 8, 9, 4, 8, 10, 7, 14, 12, 8, 12, 12, 8, 12, 8, 17, 4, 18, 7, 19, 12, 17, 4, 9, 14, 7, 12, 3, 7, 10, 7, 15, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Apr 26 2018

Keywords

Crossrefs

Cf. also A286602, A286622 (compare the scatter-plots).

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])); }
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ After code in A005940
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) }; \\ From A193231
    A302793(n) = if(!n,n,A193231(1+A193231(n-1)));
    write_to_bfile(0,rgs_transform(vector(65538,n,A278222(A302793(n-1)))),"b302795.txt");

A302027 Permutation of nonnegative integers: a(0) = 0; for n >= 1, a(n) = A057889(1+A057889(n-1)), where A057889 is a bijective bit-reverse.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 11, 12, 15, 16, 17, 18, 25, 22, 21, 26, 27, 30, 19, 20, 29, 28, 23, 24, 31, 32, 33, 34, 49, 38, 41, 42, 51, 46, 37, 50, 53, 54, 43, 58, 55, 62, 35, 36, 57, 44, 45, 52, 59, 60, 39, 40, 61, 56, 47, 48, 63, 64, 65, 66, 97, 70, 81, 74, 99, 78, 73, 82, 101, 86, 83, 90, 103, 94, 69, 98, 105, 102, 85
Offset: 0

Views

Author

Antti Karttunen, Apr 26 2018

Keywords

Crossrefs

Cf. A302028 (inverse).
Cf. A057889.
Cf. also A268717, A302793.

Programs

  • Mathematica
    f[n_] := FromDigits[Reverse[IntegerDigits[n, 2]], 2]*2^IntegerExponent[n, 2]; Fold[Append[#1, f[1 + f[#2 - 1]]] &, {0, 1}, Range[2, 85]] (* Michael De Vlieger, Apr 27 2018, after Ivan Neretin at A057889 *)
  • PARI
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));
    A302027(n) = if(!n,n,A057889(1+A057889(n-1)));

Formula

a(0) = 0; for n >= 1, a(n) = A057889(1+A057889(n-1)).

A302794 Permutation of nonnegative integers: a(0) = 0; for n >= 1, a(n) = 1+A193231(A193231(n)-1), where A193231(n) is blue code of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 26 2018

Keywords

Crossrefs

Cf. A302793 (inverse).
Cf. A193231.
Cf. also A268718, A302028.

Programs

Formula

a(0) = 0; for n >= 1, a(n) = 1+A193231(A193231(n)-1).
Showing 1-3 of 3 results.