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.

A289626 Restricted growth sequence transform of A289625, related to the structure of multiplicative group of integers modulo n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 18 2017

Keywords

Crossrefs

Cf. A000010, A002322, A034380, A046072, A289624 (some of the matching sequences).

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    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); };
    write_to_bfile(1,rgs_transform(vector(16384,n,A289625(n))),"b289626_upto16384.txt");