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

A286622 Restricted growth sequence computed for filter-sequence A278222, related to 1-runs in the binary representation of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

When filtering sequences (by equivalence class partitioning), this sequence can be used instead of A278222, because for all i, j it holds that: a(i) = a(j) <=> A278222(i) = A278222(j).
For example, for all i, j: a(i) = a(j) => A000120(i) = A000120(j), and for all i, j: a(i) = a(j) => A001316(i) = A001316(j).
The sequence allots a distinct value for each distinct multiset formed from the lengths of 1-runs in the binary representation of n. See the examples. - Antti Karttunen, Jun 04 2017

Examples

			For n = 0, there are no 1-runs, thus the multiset is empty [], and it is allotted the number 1, thus a(0) = 1.
For n = 1, in binary also "1", there is one 1-run of length 1, thus the multiset is [1], which has not been encountered before, and a new number is allotted for that, thus a(1) = 2.
For n = 2, in binary "10", there is one 1-run of length 1, thus the multiset is [1], which was already encountered at n=1, thus a(2) = a(1) = 2.
For n = 3, in binary "11", there is one 1-run of length 2, thus the multiset is [2], which has not been encountered before, and a new number is allotted for that, thus a(3) = 3.
For n = 4, in binary "100", there is one 1-run of length 1, thus the multiset is [1], which was already encountered at n=1 for the first time, thus a(4) = a(1) = 2.
For n = 5, in binary "101", there are two 1-runs, both of length 1, thus the multiset is [1,1], which has not been encountered before, and a new number is allotted for that, thus a(5) = 4.
		

Crossrefs

Cf. A286552 (ordinal transform).
Cf. also A101296, A286581, A286589, A286597, A286599, A286600, A286602, A286603, A286605, A286610, A286619, A286621, A286626, A286378, A304101 for similarly constructed or related sequences.
Cf. also A305793, A305795.

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 }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    v286622 = rgs_transform(vector(1+65537, n, A278222(n-1)));
    A286622(n) = v286622[1+n];

Extensions

Example section added by Antti Karttunen, Jun 04 2017

A366263 Doudna sequence permuted by Blue code: a(n) = A005940(1+A193231(n)).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 9, 8, 16, 27, 25, 18, 15, 12, 10, 7, 14, 11, 21, 20, 35, 30, 24, 45, 81, 32, 54, 125, 36, 75, 49, 50, 100, 147, 121, 98, 225, 72, 150, 245, 625, 162, 64, 243, 250, 343, 375, 108, 33, 28, 22, 13, 40, 63, 55, 42, 90, 175, 135, 48, 77, 70, 60, 105, 210, 385, 315, 120, 143, 154, 140, 231, 525, 180
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) };
    A366263(n) = A005940(1+A193231(n));

Formula

a(n) = A332450(A005940(1+n)).
For all n >= 0, A001222(a(n)) = A234022(n) and A046523(a(n)) = A286601(n).
For all n >= 1, A055396(a(n)) = A277818(n) = 1+A268389(n).

A286597 Restricted growth sequence transform of A286596.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

A286599 Restricted growth sequence transform of A286598.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

A286601 a(n) = A278222(A193231(n)).

Original entry on oeis.org

1, 2, 4, 2, 6, 2, 4, 8, 16, 8, 4, 12, 6, 12, 6, 2, 6, 2, 6, 12, 6, 30, 24, 12, 16, 32, 24, 8, 36, 12, 4, 12, 36, 12, 4, 12, 36, 72, 60, 12, 16, 48, 64, 32, 24, 8, 24, 72, 6, 12, 6, 2, 24, 12, 6, 30, 60, 12, 24, 48, 6, 30, 60, 30, 210, 30, 60, 120, 6, 30, 60, 30, 60, 180, 60, 12, 96, 48, 24, 120, 6, 30, 24, 12, 6, 2, 6, 12, 60, 30, 6, 30
Offset: 0

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

Cf. A193231, A234022, A278222, A278231, A278233, A286602 (rgs-version of this sequence).

Programs

Formula

a(n) = A278222(A193231(n)).

A303779 Restricted growth sequence transform of A278222(A303775(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 06 2018

Keywords

Crossrefs

Programs

  • PARI
    \\ Needs also code from A303775:
    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 };
    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));
    write_to_bfile(0,rgs_transform(vector(65538,n,A278222(A303775(n-1)))),"b303779.txt");

Formula

For all i, j: a(i) = a(j) => A303780(i) = A303780(j).

A366262 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366261(i) = A366261(j) for all i, j >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 05 2023

Keywords

Comments

Restricted growth sequence transform of A366261.
For all i, j >= 0: a(i) = a(j) => A366254(i) = A366254(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    A209229(n) = (n && !bitand(n,n-1));
    A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); };
    A303767(n) = if(!n,n,if(A209229(n),n+A303767(n-1),A053644(n)+A303767(n-A053644(n)-1)));
    A366260(n) = A005940(1+A303767(n));
    A366261(n) = A046523(A366260(n));
    v366262 = rgs_transform(vector(1+up_to,n,A366261(n-1)));
    A366262(n) = v366262[1+n];

A286600 a(n) = A286622(A193231(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 04 2017

Keywords

Crossrefs

Formula

a(n) = A286622(A193231(n)).

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");

A366280 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366279(i) = A366279(j) for all i, j >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Comments

Restricted growth sequence transform of A366279.
For all i, j >= 0, a(i) = a(j) => A290251(i) = A290251(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    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)));
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A366275(n) = A163511(A057889(n));
    A366279(n) = A046523(A366275(n));
    v366280 = rgs_transform(vector(1+up_to,n,A366279(n-1)));
    A366280(n) = v366280[1+n];
Showing 1-10 of 10 results.