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.

A153979 Prime sums of prime factors of composite(k)=A002808(k).

This page as a plain text file.
%I A153979 #17 May 02 2015 10:18:11
%S A153979 5,7,7,13,11,19,11,11,11,17,11,13,31,13,13,23,13,43,17,13,13,17,19,13,
%T A153979 19,61,23,73,17,41,23,19,47,17,19,29,19,103,29,17,109,17,19,37,17,17,
%U A153979 71,23,139,37,19,43,151,17,83,17,23,47,43,31,19,181,17,31,47,53,193,17,23,101,23,199,29,17
%N A153979 Prime sums of prime factors of composite(k)=A002808(k).
%C A153979 More precisely: Take the sum of prime factors of the n-th composite number A002808(n), with repetition (e.g., 72 = 2^3*3^2 => 2+2+2+3+3). If the sum is prime, list it here; if not, don't list it and skip over to the next composite number. - _M. F. Hasler_, May 02 2015
%C A153979 The count of the same numbers is A168470. - _Gionata Neri_, Apr 26 2015
%H A153979 Karl Hovekamp, <a href="/A153979/b153979.txt">Table of n, a(n) for n=1,...,12285</a>.
%H A153979 Karl Hovekamp, <a href="/A153979/a153979.txt">Table of n, a(n), source, factors for n=1,...,12285</a>.
%e A153979 A002808(1)=4=2*2, and 2+2=4(nonprime), so 4 does not contribute to this sequence. A002808(2)=6=2*3 and 2+3=5(prime), so a(1)=5. A002808(5)=10=2*5 and 2+5=7(prime), so a(2)=7. A002808(6)=12=2*2*3 and 2+2+3=7(prime), so a(3)=7.
%p A153979 N:= 1000: # to get a(1) to a(N)
%p A153979 count:= 0:
%p A153979 for x from 2 while count < N do
%p A153979    if not isprime(x) then
%p A153979      y:= add(f[1]*f[2],f=ifactors(x)[2]);
%p A153979      if isprime(y) then
%p A153979        count:= count+1;
%p A153979        A[count]:= y;
%p A153979      fi
%p A153979    fi
%p A153979 od;
%p A153979 seq(A[i],i=1..N); # _Robert Israel_, Apr 26 2015
%t A153979 lim = 410; s = Select[Range@ lim, CompositeQ]; f[n_] := Plus @@ (Flatten[Table[#1, {#2}] & @@@ FactorInteger@ n]); Select[f /@ s, PrimeQ] (* _Michael De Vlieger_, Apr 26 2015 *)
%o A153979 (PARI) forcomposite(c=1,999,isprime(s=(s=factor(c))[,1]~*s[,2])&&print1(s",")) \\ _M. F. Hasler_, May 02 2015
%Y A153979 Cf. A000040, A002808.
%K A153979 nonn
%O A153979 1,1
%A A153979 _Juri-Stepan Gerasimov_, Jan 04 2009
%E A153979 Corrected and edited by _Karl Hovekamp_, Dec 05 2009