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.

A286605 Restricted growth sequence computed for number of divisors, d(n) (A000005).

This page as a plain text file.
%I A286605 #11 May 12 2017 18:22:08
%S A286605 1,2,2,3,2,4,2,4,3,4,2,5,2,4,4,6,2,5,2,5,4,4,2,7,3,4,4,5,2,7,2,5,4,4,
%T A286605 4,8,2,4,4,7,2,7,2,5,5,4,2,9,3,5,4,5,2,7,4,7,4,4,2,10,2,4,5,11,4,7,2,
%U A286605 5,4,7,2,10,2,4,5,5,4,7,2,9,6,4,2,10,4,4,4,7,2,10,4,5,4,4,4,10,2,5,5,8,2,7,2,7,7,4,2,10,2,7,4,9,2,7,4,5,5,4,4
%N A286605 Restricted growth sequence computed for number of divisors, d(n) (A000005).
%C A286605 For all i, j: A101296(i) = A101296(j) => a(i) = a(j).
%C A286605 For all i, j: a(i) = a(j) <=> A000005(i) = A000005(j).
%H A286605 Antti Karttunen, <a href="/A286605/b286605.txt">Table of n, a(n) for n = 1..10000</a>
%t A286605 With[{nn = 119}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Array[DivisorSigma[0, #] &, nn]] (* _Michael De Vlieger_, May 12 2017, Version 10 *)
%o A286605 (PARI)
%o A286605 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 A286605 write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
%o A286605 A000005(n) = numdiv(n);
%o A286605 write_to_bfile(1,rgs_transform(vector(10000,n,A000005(n))),"b286605.txt");
%Y A286605 Cf. A000005, A007416 (positions of records, and also the first occurrence of each n).
%Y A286605 Cf. also A101296, A286603, A286610, A286619, A286621, A286622, A286626, A286378.
%K A286605 nonn
%O A286605 1,2
%A A286605 _Antti Karttunen_, May 11 2017