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.

A351963 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(A109812(i)) = A278222(A109812(j)), for all i, j >= 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 3, 1, 2, 3, 3, 2, 3, 4, 1, 4, 2, 3, 3, 5, 3, 5, 3, 6, 3, 5, 2, 7, 1, 5, 6, 3, 5, 5, 3, 5, 6, 3, 8, 2, 9, 3, 5, 4, 5, 5, 3, 8, 5, 1, 8, 5, 3, 7, 5, 3, 10, 6, 3, 6, 6, 5, 6, 5, 6, 5, 5, 4, 8, 3, 9, 5, 5, 7, 2, 11, 3, 10, 3, 10, 6, 6, 9, 5, 8, 6, 5, 8, 5, 10, 6, 12, 6, 10, 6, 5, 10, 4, 6, 8, 5, 13
Offset: 1

Views

Author

Antti Karttunen, Apr 06 2022

Keywords

Comments

Restricted growth sequence transform of A278222(A109812(n)), or equally of, A278222(A351965(n)).
For all i, j: A351578(i) = A351578(j) => a(i) = a(j) => A352884(i) = A352884(j).

Crossrefs

Programs

  • PARI
    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; };
    v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
    up_to = #v109812;
    A109812(n) = v109812[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
    v351963 = rgs_transform(vector(up_to, n, A046523(A005940(1+A109812(n)))));
    A351963(n) = v351963[n];

A351578 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(f(i)) = A007814(f(j)) and A278222(f(i)) = A278222(f(j)), for all i, j >= 1, where f(k) = A109812(k).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 07 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A007814(A109812(n)), A046523(A005940(1+A109812(n)))].
The sequence allots a new distinct number for each newly encountered combination of the 2-adic valuation of A109812 (A351964), and the multiset of the lengths of 1-runs in the odd part of A109812 (A351965). See the examples.
For all i, j: a(i) = a(j) => A352889(i) = A352889(j).

Examples

			   n   A109812(n)  [base-2]   A351964(n)           Lengths of       a(n)
                              (# of trailing 0's)  1-runs       (allotted #)
-----+----------------------------------------------------------------------
   1 :          1       [1],  0                    [1]               1
   2 :          2      [10],  1                    [1]               2
   3 :          4     [100],  2                    [1]               3
   4 :          3      [11],  0                    [2]               4
   5 :          8    [1000],  3                    [1]               5
   6 :          5     [101],  0                    [1,1]             6
   7 :         10    [1010],  1                    [1,1]             7
   8 :         16   [10000],  4                    [1]               8
   9 :          6     [110],  1                    [2]               9
  10 :          9    [1001],  0                    [1,1]             6
  11 :         18   [10010],  1                    [1,1]             7
Because the combinations of the multiset of 1-runs in the binary expansion of A109812(n) and the number of trailing zeros in it (A351964) are unique for n = 1 .. 9, a unique increasing number (starting from 1) is allotted for each, and a(n) = n for n <= 9. On the other hand, at n=10, the binary expansion is [1001], for which these two measures are equal to that of binary expansion [101] found first time at n=6, therefore the rgs-transform allots for 10 the same number as for 6, and a(10) = a(6) = 6. At n=11, the binary expansion is [10010], where these two measures coincide with that of [1010] found first time at n=7, therefore a(10) = a(7) = 7.
		

Crossrefs

Programs

  • PARI
    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; };
    v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
    up_to = #v109812;
    A109812(n) = v109812[n];
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A007814(n) = valuation(n,2);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    v351578 = rgs_transform(vector(up_to, n, [A007814(A109812(n)), A046523(A005940(1+A109812(n)))]));
    A351578(n) = v351578[n];

A352889 Number of runs in the binary expansion of A109812(n).

Original entry on oeis.org

1, 2, 2, 1, 2, 3, 4, 2, 2, 3, 4, 2, 3, 2, 2, 1, 2, 3, 4, 3, 4, 3, 4, 5, 4, 3, 2, 1, 2, 4, 5, 4, 3, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 3, 4, 4, 3, 4, 2, 3, 4, 3, 2, 3, 4, 5, 6, 4, 6, 5, 4, 5, 4, 6, 3, 4, 2, 3, 4, 3, 4, 3, 2, 2, 1, 4, 5, 4, 5, 6, 5, 4, 3, 4, 5, 4, 3, 4, 5, 6, 7, 6, 5, 6, 4, 5, 2, 5, 4, 4, 3, 2, 3, 4
Offset: 1

Views

Author

Antti Karttunen, Apr 07 2022

Keywords

Examples

			   n   A109812(n)  [in base-2]   a(n) = number of runs
-----+-------------------------------------------------
   1 |          1       [1],      1
   2 |          2      [10],      2
   3 |          4     [100],      2
   4 |          3      [11],      1
   5 |          8    [1000],      2
   6 |          5     [101],      3
   7 |         10    [1010],      4
   8 |         16   [10000],      2
   9 |          6     [110],      2
  10 |          9    [1001],      3
  11 |         18   [10010],      4
		

Crossrefs

Programs

  • PARI
    v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
    up_to = #v109812;
    A109812(n) = v109812[n];
    A352889(n) = A005811(A109812(n));

Formula

a(n) = A005811(A109812(n)).
Showing 1-3 of 3 results.