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.

A302039 Analog of A056239 for nonstandard factorization based on the sieve of Eratosthenes (A083221).

This page as a plain text file.
%I A302039 #11 Apr 02 2018 21:20:13
%S A302039 0,1,2,2,3,3,4,3,4,4,5,4,6,5,5,4,7,5,8,5,6,6,9,5,6,7,6,6,10,6,11,5,7,
%T A302039 8,7,6,12,9,7,6,13,7,14,7,8,10,15,6,8,7,8,8,16,7,9,7,8,11,17,7,18,12,
%U A302039 8,6,8,8,19,9,9,8,20,7,21,13,9,10,9,8,22,7,9,14,23,8,10,15,9,8,24,9,12,11,10,16,9,7,25,9,10,8,26,9,27,9,10
%N A302039 Analog of A056239 for nonstandard factorization based on the sieve of Eratosthenes (A083221).
%C A302039 Each n occurs A000041(n) times in total.
%H A302039 Antti Karttunen, <a href="/A302039/b302039.txt">Table of n, a(n) for n = 1..65537</a>
%H A302039 <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>
%F A302039 a(1) = 0; for n > 1, a(n) = A055396(n) + a(A302042(n)).
%F A302039 a(1) = 0; for n > 1, a(n) = (A055396(n)*A302045(n)) + a(A302044(n)).
%F A302039 a(n) = A056239(A250246(n)).
%o A302039 (PARI)
%o A302039 up_to = 65537;
%o A302039 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 A302039 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639, by Hasler.
%o A302039 A055396(n) = if(1==n,0,primepi(A020639(n)));
%o A302039 v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
%o A302039 A078898(n) = v078898[n];
%o A302039 A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p));
%o A302039 A302039(n) = if(1==n,0,A055396(n) + A302039(A302042(n)));
%Y A302039 Cf. A000041, A056239, A250246, A302042, A302044, A302045.
%Y A302039 Cf. also A253557, A302041, A302050, A302051, A302052, A302055 for other similar analogs.
%K A302039 nonn
%O A302039 1,3
%A A302039 _Antti Karttunen_, Mar 31 2018