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.

A340680 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(1+i) = A007814(1+j) and A292251(i) = A292251(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 11 2021

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A007814(1+n), A292251(n)], where the first element is the 2-adic valuation of 1+n (i.e., the number of trailing 1-digits in the base-2 representation of n), and the latter element is the 3-adic valuation of A048673(n).
For all i, j: a(i) = a(j) => A341345(i) = A341345(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; };
    A007814(n) = valuation(n,2);
    A003961(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
    A048673(n) = (A003961(n)+1)/2;
    A292251(n) = valuation(A048673(n),3);
    Aux340680(n) = [A007814(1+n), A292251(n)];
    v340680 = rgs_transform(vector(up_to, n, Aux340680(n)));
    A340680(n) = v340680[n];

Formula

a(2n) = 2.