The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286626 Restricted growth sequence computed for primorial base related filter-sequence A278226. 20

%I #17 May 14 2017 15:56:00

%S 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,

%T 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,

%U 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

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

%C 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).

%C For example, for all i, j: a(i) = a(j) => A276150(i) = A276150(j).

%H Antti Karttunen, <a href="/A286626/b286626.txt">Table of n, a(n) for n = 0..30030</a>

%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>

%t 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 *)

%o (PARI)

%o 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; };

%o write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }

%o 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

%o 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; };

%o A278226(n) = A046523(A276086(n));

%o write_to_bfile(0,rgs_transform(vector(30031,n,A278226(n-1))),"b286626.txt");

%Y Cf. A278226, A276150.

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

%K nonn,look

%O 0,2

%A _Antti Karttunen_, May 11 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 08:55 EDT 2024. Contains 373105 sequences. (Running on oeis4.)