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!)
A331185 a(n) = n - prime(A067004(n)), where A067004 is the ordinal transform of number of divisors of n (A000005). 3

%I #16 Dec 20 2021 14:37:47

%S -1,0,0,2,0,4,0,5,6,5,0,10,0,7,4,14,0,15,0,15,8,5,0,22,20,7,4,21,0,27,

%T 0,21,4,3,-2,34,0,-3,-4,35,0,35,0,31,28,-1,0,46,42,31,-2,29,0,43,-4,

%U 43,-4,-9,0,58,0,-9,34,62,-8,49,0,37,-10,51,0,69,0,-9,38,35,-12,55,0,77,78,-15,0,79,-16,-17,-20,59,0,83

%N a(n) = n - prime(A067004(n)), where A067004 is the ordinal transform of number of divisors of n (A000005).

%H Antti Karttunen, <a href="/A331185/b331185.txt">Table of n, a(n) for n = 1..10201</a>

%H Antti Karttunen, <a href="/A331185/a331185.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%F a(n) = n - A000040(A067004(n)).

%t b[_] = 0;

%t c[n_] := c[n] = With[{t = DivisorSigma[0, n]}, b[t] = b[t]+1];

%t a[n_] := n - Prime[c[n]];

%t Array[a, 105] (* _Jean-François Alcover_, Dec 20 2021 *)

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%o v067004 = ordinal_transform(vector(up_to,n,numdiv(n)));

%o A067004(n) = v067004[n];

%o A331185(n) = (n - prime(A067004(n)));

%Y Cf. A000005, A000040 (positions of zeros), A067004, A331186, A331187.

%K sign,look

%O 1,4

%A _Antti Karttunen_, Jan 12 2020

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 August 2 22:39 EDT 2024. Contains 374875 sequences. (Running on oeis4.)