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!)
A104774 a(1) = 1, a(2) = 2, a(3) = 0, a(4) = 4, and for n > 4, if n is an even number, a(n) = a(n/2) - (1 if a(n/2) is not zero), otherwise if n is an odd semiprime p*q (with q >= p), then a(n) = p+q, otherwise 0. 3

%I #14 Apr 01 2021 14:43:08

%S 1,2,0,4,0,0,0,3,6,0,0,0,0,0,8,2,0,5,0,0,10,0,0,0,10,0,0,0,0,7,0,1,14,

%T 0,12,4,0,0,16,0,0,9,0,0,0,0,0,0,14,9,20,0,0,0,16,0,22,0,0,6,0,0,0,0,

%U 18,13,0,0,26,11,0,3,0,0,0,0,18,15,0,0,0,0,0,8,22,0,32,0,0,0,20,0,34,0,24

%N a(1) = 1, a(2) = 2, a(3) = 0, a(4) = 4, and for n > 4, if n is an even number, a(n) = a(n/2) - (1 if a(n/2) is not zero), otherwise if n is an odd semiprime p*q (with q >= p), then a(n) = p+q, otherwise 0.

%C The original name was: If n is even then (if n<=4 then n else a(n/2) + 0^a(n/2) - 1) else (if n=p*q is semiprime then p+q else 0^(n-1))).

%H Antti Karttunen, <a href="/A104774/b104774.txt">Table of n, a(n) for n = 1..16384</a>

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

%F a(A104772(n)) = n; a(A104773(n)) = A104772(n).

%o (PARI) A104774(n) = if(!(n%2),if(n<=4,n,my(u=A104774(n/2)); (u+!u-1)),if(2==bigomega(n),my(f=factor(n)[,1]); if(1==omega(n),2*f[1],f[1]+f[2]), !(n-1))); \\ _Antti Karttunen_, Mar 30 2021

%Y Cf. A001358, A046315, A090967, A104772, A104773.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Mar 24 2005

%E Name changed by _Antti Karttunen_, Apr 01 2021

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 April 24 11:49 EDT 2024. Contains 371936 sequences. (Running on oeis4.)