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.

A379004 Lexicographically earliest infinite sequence such that a(i) = a(j) => v_2(i) = v_2(j) and v_5(i) = v_5(j), for all i, j, where v_2 (A007814) and v_5 (A112765) give the 2- and 5-adic valuations of n respectively.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 15 2024

Keywords

Comments

Restricted growth sequence transform of A132741, or equally, of the ordered pair [A007814(n), A112765(n)].
For all i, j:
A379005(i) = A379005(j) => a(i) = a(j).
A379003 (after its initial 0) and this sequence are ordinal transforms of each other.

Crossrefs

Cf. A007814, A112765, A132741, A379003 (ordinal transform), A379005.

Programs

  • PARI
    up_to = 100000;
    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; };
    v379004 = rgs_transform(vector(up_to, n, [valuation(n,2), valuation(n,5)]));
    A379004(n) = v379004[n];