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.

A323246 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323248(n) for n > 1, and f(1) = -1.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 4, 5, 4, 2, 6, 2, 7, 2, 3, 2, 8, 2, 9, 10, 11, 2, 12, 13, 14, 15, 16, 2, 6, 2, 17, 18, 19, 20, 21, 2, 22, 23, 12, 2, 24, 2, 25, 26, 27, 2, 28, 23, 11, 29, 30, 2, 31, 32, 33, 23, 34, 2, 35, 2, 36, 37, 11, 38, 39, 2, 40, 41, 42, 2, 24, 2, 43, 6, 44, 45, 46, 2, 47, 48, 49, 2, 50, 51, 52, 53, 54, 2, 38, 55, 56, 57, 58, 59, 60, 2, 35, 61, 54, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 10 2019

Keywords

Crossrefs

Cf. A323248.

Programs

  • PARI
    up_to = 1024;
    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; };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    A323244(n) = if(1==n, 0, my(k=A156552(n)); (2*k)-sigma(k));
    A323248(n) = (A323244(n) - bigomega(n));
    A323246aux(n) = if(1==n,-1,A323248(n));
    v323246 = rgs_transform(vector(up_to, n, A323246aux(n)));
    A323246(n) = v323246[n];