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.

A329896 Lexicographically earliest infinite sequence such that a(i) = a(j) => A219175(i) = A219175(j) and A322592(i) = A322592(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 07 2019

Keywords

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; };
    A219175(n) = (n%lcm(znstar(n)[2]));
    A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); };
    Aux329896(n) = if((n>2)&&isprime(n),0,[A219175(n),A289625(n)]);
    v329896 = rgs_transform(vector(up_to, n, Aux329896(n)));
    A329896(n) = v329896[n];