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.

A286626 Restricted growth sequence computed for primorial base related filter-sequence A278226.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 2, 3, 3, 6, 5, 7, 4, 5, 5, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 2, 3, 3, 6, 5, 7, 3, 6, 6, 20, 7, 21, 5, 7, 7, 21, 9, 22, 11, 12, 12, 23, 14, 24, 16, 17, 17, 25, 19, 26, 4, 5, 5, 7, 8, 9, 5, 7, 7, 21, 9, 22, 8, 9, 9, 22, 27, 28, 13, 14, 14, 24, 29, 30, 18, 19, 19, 26, 31, 32, 10, 11, 11, 12, 13, 14, 11, 12, 12, 23, 14, 24
Offset: 0

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

When filtering sequences (by equivalence class partitioning), this sequence (with its modestly sized terms) can be used instead of A278226, because for all i, j it holds that: a(i) = a(j) <=> A278226(i) = A278226(j).
For example, for all i, j: a(i) = a(j) => A276150(i) = A276150(j).

Crossrefs

Cf. also A101296, A286603, A286605, A286610, A286619, A286621, A286622, A286378 for similarly constructed sequences.

Programs

  • Mathematica
    b = MixedRadix[Reverse@ Prime@ Range@ 12]; f[n_] := Times @@ MapIndexed[Prime[#2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1]; With[{nn = 102}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Function[k, f[Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ k, Reverse@ k}]]@ IntegerDigits[n, b], {n, 0, nn}]] (* Michael De Vlieger, May 12 2017, Version 10.2 *)
  • 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])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A278226(n) = A046523(A276086(n));
    write_to_bfile(0,rgs_transform(vector(30031,n,A278226(n-1))),"b286626.txt");