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.

A163836 Composites whose largest prime factor is equal to the sum of all the other prime factors (with repetition).

This page as a plain text file.
%I A163836 #24 Apr 10 2021 02:49:19
%S A163836 4,9,25,30,49,70,84,121,169,286,289,308,361,440,495,528,529,594,646,
%T A163836 728,819,841,884,961,975,1040,1170,1248,1369,1404,1496,1681,1683,1748,
%U A163836 1798,1849,1976,2209,2223,2499,2809,2975,3128,3135,3344,3481,3519,3526,3570
%N A163836 Composites whose largest prime factor is equal to the sum of all the other prime factors (with repetition).
%C A163836 Sequence contains the square of every prime. - _Sean A. Irvine_, Oct 05 2009
%C A163836 Contains 4*A143206. - _David A. Corneth_, Apr 28 2020
%C A163836 Contains 2*A037074. - _Bernard Schott_, Apr 28 2020
%H A163836 Amiram Eldar, <a href="/A163836/b163836.txt">Table of n, a(n) for n = 1..10000</a>
%e A163836 a(1) = 4 (2=2), a(2) = 9 (3=3), a(3) = 25 (5=5), a(4) = 30 (5=3+2), a(5) = 49 (7=7), a(6) = 70 (7=5+2), a(7) = 84 (7=3+2+2), a(8) = 121 (11=11), a(9) = 169 (13=13), a(10) = 286 (13=11+2), a(11) = 289(17=17), a(12) = 308 (11=7+2+2), ...
%p A163836 A002808 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc: A006530 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; max(op(%)) ; end if; end: A001414 := proc(n) ifactors(n)[2] ; add( op(1,p)*op(2,p),p=%) ; end: A163836 := proc(n) option remember; local a,lpf; if n =1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then lpf := A006530(a) ; if 2*lpf = A001414(a) then return a; end if; end if; od: end if; end: seq(A163836(n),n=1..80) ; # _R. J. Mathar_, Oct 10 2009
%t A163836 seqQ[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 2]] == 2, f[[-1, 2]] == 1 && f[[-1, 1]] == Plus @@ Times @@@ Most[f]]]; Select[Range[4000], seqQ] (* _Amiram Eldar_, Apr 28 2020 *)
%o A163836 (Python)
%o A163836 from sympy import factorint
%o A163836 def ok(n):
%o A163836   f = factorint(n)
%o A163836   return sum(f[p] for p in f) > 1 and 2*max(f) == sum(p*f[p] for p in f)
%o A163836 print(list(filter(ok, range(3571)))) # _Michael S. Branicky_, Apr 09 2021
%Y A163836 Cf. A002808, A037074, A143206.
%K A163836 nonn
%O A163836 1,1
%A A163836 _Juri-Stepan Gerasimov_, Aug 05 2009
%E A163836 Corrected and extended by _Sean A. Irvine_ and _R. J. Mathar_, Oct 05 2009