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.

Showing 1-9 of 9 results.

A116661 Integers in both sequences A114522 and A063989.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 18, 20, 22, 25, 27, 32, 34, 44, 48, 49, 50, 58, 68, 72, 80, 82, 108, 116, 118, 121, 125, 128, 142, 162, 164, 165, 169, 176, 192, 200, 202, 214, 236, 242, 243, 272, 273, 274, 284, 288, 289, 298, 320, 343, 345, 358, 361, 382, 385, 394, 399, 404
Offset: 1

Views

Author

Leroy Quet, Feb 21 2006

Keywords

Examples

			20 = 2^2 *5^1. Both the number of prime divisors (counted with multiplicity), 2+1 = 3 and the sum of the distinct prime divisors, 2+5 = 7, are primes. So 20 is in the sequence.
		

Crossrefs

Programs

  • Magma
    f:=func; [k:k in [2..450]| IsPrime(f(k)) and IsPrime(&+PrimeDivisors(k))]; // Marius A. Burtea, Nov 14 2019
  • Mathematica
    Select[Range[500],AllTrue[{PrimeOmega[#],Total[FactorInteger[#][[All, 1]]]}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 03 2019 *)

Extensions

More terms from Robert Gerbicz, Jun 09 2007

A114518 Numbers n such that A008475(n) is prime.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 12, 13, 17, 18, 19, 22, 23, 24, 28, 29, 31, 34, 36, 37, 40, 41, 43, 47, 48, 52, 53, 54, 58, 59, 61, 67, 71, 72, 73, 76, 79, 82, 83, 88, 89, 97, 100, 101, 103, 107, 108, 109, 112, 113, 118, 127, 131, 137, 139, 142, 148, 149, 151, 157, 160, 162, 163
Offset: 1

Views

Author

Leroy Quet, Dec 05 2005

Keywords

Examples

			24 = 2^3 * 3 and 2^3 + 3 = 11, which is prime. So 24 is included.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Power @@@ FactorInteger[n]; Select[Range[165], PrimeQ[f[ # ]] &] (* Ray Chandler, Dec 07 2005 *)
  • PARI
    A008475(n)=local(t);if(n<1,0,t=factor(n);sum(k=1,matsize(t)[1],t[k,1]^t[k,2])); for(i=1,500,if(isprime(A008475(i)),print1(i,","))) (Herrgesell)

Extensions

Extended by Ray Chandler and Lambert Herrgesell (zero815(AT)googlemail.com), Dec 07 2005

A194594 Numbers such that the sum of the their nonprime divisors and the sum of their prime divisors are both primes.

Original entry on oeis.org

4, 6, 8, 10, 12, 16, 22, 27, 32, 40, 44, 58, 68, 80, 82, 88, 116, 125, 136, 164, 165, 176, 192, 232, 236, 250, 256, 284, 328, 352, 358, 382, 420, 428, 435, 462, 472, 478, 486, 512, 548, 562, 640, 651, 656, 665, 704, 714, 764, 768, 788, 798, 808, 819, 838
Offset: 1

Views

Author

Michel Lagneau, Aug 30 2011

Keywords

Examples

			The divisors of 136 are { 1, 2, 4, 8, 17, 34, 68, 136 }, the sum of its nonprime divisors is 1 + 4 + 8 + 34 + 68 + 136 = 251 is prime, and the sum of its prime divisors is 2 + 17 = 19 is prime, hence 136 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Plus@@Select[Divisors[n],!PrimeQ[#]&];g[n_]:=Plus@@First/@FactorInteger[n];Select[Range[1000],PrimeQ[f[#]&&PrimeQ[g[#]]]&]
    ndpdQ[n_]:=Module[{d=Divisors[n],pr},pr=Select[d,PrimeQ];AllTrue[ {Total[ pr],Total[Complement[d,pr]]},PrimeQ]]; Select[Range[900],ndpdQ] (* Harvey P. Dale, Sep 23 2021 *)
  • PARI
    isok(n) = isprime(s=sumdiv(n, d, if (isprime(d), d))) && isprime(sigma(n)-s); \\ Michel Marcus, Jan 07 2020

A114989 Numbers whose sum of squares of distinct prime factors is prime.

Original entry on oeis.org

6, 10, 12, 14, 18, 20, 24, 26, 28, 34, 36, 40, 48, 50, 52, 54, 56, 68, 72, 74, 80, 94, 96, 98, 100, 104, 105, 108, 112, 134, 136, 144, 146, 148, 160, 162, 188, 192, 194, 196, 200, 206, 208, 216, 224, 231, 250, 268, 272, 273, 274, 288, 292, 296, 315, 320, 324, 326
Offset: 1

Views

Author

Jonathan Vos Post, Feb 22 2006

Keywords

Comments

A005063 is "sum of squares of primes dividing n." Hence this is the sum of squares of prime factors analog of A114522 "numbers n such that sum of distinct prime divisors of n is prime." Note the distinction between A005063 and A067666 is "sum of squares of prime factors of n (counted with multiplicity)."

Examples

			a(1) = 6 because 6 = 2 * 3 and 2^2 + 3^2 = 13 is prime.
a(2) = 10 because 10 = 2 * 5 and 2^2 + 5^2 = 29 is prime.
a(3) = 12 because 12 = 2^2 * 3 and 2^2 + 3^2 = 13 is prime (note that we are not counting the prime factors with multiplicity).
a(4) = 14 because 14 = 2 * 7 and 2^2 + 7^2 = 53 is prime.
a(8) = 26 because 26 = 2 * 3 and 2^2 + 13^2 = 173 is prime.
a(10) = 34 because 34 = 2 * 17 and 2^2 + 17^2 = 293 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local DPF: DPF:=factorset(n): if isprime(sum(DPF[j]^2,j=1..nops(DPF)))=true then n else fi end: seq(a(n),n=1..400); # Emeric Deutsch, Mar 07 2006
  • Mathematica
    Select[Range[400],PrimeQ[Total[Transpose[FactorInteger[#]][[1]]^2]]&] (* Harvey P. Dale, Jan 16 2016 *)
  • PARI
    is(n)=isprime(norml2(factor(n)[,1]))

Formula

{k such that A005063(k) is prime}. {k such that A005063(k) is an element of A000040}. {k = (for distinct i, j, ... prime(i)^e_1 * prime(j)^e_2 * ...) such that (prime(i)^2 * prime(j)^2 * ...) is prime}.

Extensions

More terms from Emeric Deutsch, Mar 07 2006

A114988 Numbers whose sum of distinct prime factors is 3-almost prime.

Original entry on oeis.org

15, 35, 42, 45, 51, 65, 75, 77, 78, 84, 86, 91, 110, 115, 122, 123, 126, 130, 135, 138, 141, 146, 153, 154, 156, 161, 168, 172, 175, 185, 187, 194, 201, 206, 209, 219, 220, 221, 222, 225, 230, 234, 235, 244, 245, 252, 259, 260, 266, 267, 276, 282, 285, 292
Offset: 1

Views

Author

Jonathan Vos Post, Feb 22 2006

Keywords

Comments

Numbers k such that A008472(k) is an element of A014612.
This is the 3-almost prime analog of A114522.

Examples

			a(1) = 15 because 15 = 3 * 5 and 3 + 5 = 8 = 2^3 is a 3-almost prime.
a(2) = 35 because 15 = 5 * 7 and 5 + 7 = 12 = 2^2 * 3 is a 3-almost prime.
a(3) = 42 because 42 = 2 * 3 * 7 and 2 + 3 + 7 = 12 = 2^2 * 3 is a 3-almost prime.
a(4) = 45 because 45 = 3^2 * 5 and 3 + 5 = 8 = 2^3 is a 3-almost prime.
a(5) = 51 because 51 = 3 * 17 and 3 + 17 = 20 = 2^2 * 5 is a 3-almost prime.
a(6) = 65 because 65 = 5 * 13 and 5 + 13 = 18 = 2 * 3^2 is a 3-almost prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeOmega[ Total[ First /@ FactorInteger[#]]] == 3 &] (* Giovanni Resta, Jun 15 2016 *)
  • PARI
    is(n)=bigomega(vecsum(factor(n)[,1]))==3 \\ Charles R Greathouse IV, Feb 05 2017

Extensions

Corrected and extended by Giovanni Resta, Jun 15 2016

A224830 Numbers n such that both the sum of the semiprime divisors of n and the sum of the prime divisors of n are prime numbers.

Original entry on oeis.org

36, 72, 108, 144, 165, 210, 216, 273, 288, 324, 345, 385, 399, 432, 462, 561, 576, 595, 648, 651, 665, 715, 795, 798, 858, 864, 885, 957, 972, 1001, 1015, 1110, 1152, 1218, 1281, 1290, 1296, 1335, 1443, 1463, 1495, 1515, 1533, 1547, 1551, 1615, 1645, 1659
Offset: 1

Views

Author

Michel Lagneau, Jul 21 2013

Keywords

Comments

Numbers n such that A008472(n) and A076290(n) are both prime numbers.
There exists a subsequence of squares {36, 144, 324, 576, 1296, 2304, 2916, 5184, 9216, 11664, 20736, 26244, 36864, ...} and the numbers of the form n = (p*q)^2 or (p^a*q^v)^2 with p and q primes are in the sequence if we have the two conditions:
(1) p+q = p1 is prime => p=2
(2) p^2 + p*q + q^2 = p2 is prime (subsequence of A007645), because p^2, p*q and q^2 are the three possible semiprime divisors of n, but with p=2, the semiprime divisors are 4, 2q and q^2.
(1) and (2) => p2 - 2*p1 = q^2, hence the property:
Let a number n such that the sum of the semiprime divisors is a prime number p1 and the sum of the prime divisors of n is a prime number p2. If n is a perfect square having two prime divisors, then p1 - 2*p2 = 9. Proof:
If q > 3, q == 1 mod 6 => q^2 + 2q + 4 == 1 mod 6 (if q==5 mod 6, q^2 + 2q + 4 == 3 mod 6 is not prime), but q+2 == 3 mod 6 is not prime. Conclusion: q = 3, and q^2 = 9 if a(n) is a square.
Consequence: if a(n) is a square having two prime divisors, the number k*a(n) with k = 2 or 3 is in the sequence.

Examples

			72 is in the sequence because the sum of the prime divisors is 2+3 = 5 and the sum of the semiprime divisors is 4 + 2*3 + 9 = 19.
		

Crossrefs

Intersection of A114522 and A227680.

Programs

  • Maple
    with(numtheory):for n from 2 to 2000 do:x:=divisors(n):n1:=nops(x): y:=factorset(n):n2:=nops(y):s1:=0:s2:=0:for i from 1 to n1 do: if bigomega(x[i])=2 then s1:=s1+x[i]:else fi:od: s2:=sum('y[i]', 'i'=1..n2):if type(s1,prime)=true and type(s2,prime)=true then printf(`%d, `,n):else fi:od:
  • Mathematica
    primeSum[n_] := Plus @@ First[Transpose[FactorInteger[n]]]; semipSigma[n_] := DivisorSum[n, # &, PrimeOmega[#] == 2 &]; Select[Range[2000], PrimeQ @ primeSum[#] && PrimeQ @ semipSigma[#] &] (* Amiram Eldar, May 10 2020 *)

A367176 Numbers k, such that (Sum_{d|k} (-1)^[d is prime] * d) is prime.

Original entry on oeis.org

4, 6, 8, 9, 18, 32, 49, 50, 128, 162, 169, 242, 288, 400, 512, 578, 729, 900, 1058, 1156, 1521, 1600, 1682, 2048, 2116, 2312, 2450, 3025, 3249, 3600, 3872, 4356, 4418, 4489, 4624, 5000, 6241, 6728, 6962, 7225, 8100, 8281, 8450, 8464, 8649, 8712, 10000
Offset: 1

Views

Author

Peter Luschny, Nov 10 2023

Keywords

Crossrefs

Programs

  • Maple
    select(n -> isprime(A367175(n)), [seq(1..10000)]);
  • Mathematica
    Select[Range[10000], And[# > 1, PrimeQ[#]] &@ DivisorSum[#, (-1)^Boole[PrimeQ[#]]*# &] &] (* Michael De Vlieger, Nov 10 2023 *)
  • PARI
    isok(k) = isprime(sumdiv(k, d, (-1)^isprime(d)*d)); \\ Michel Marcus, Nov 10 2023
    
  • Python
    from itertools import count, islice
    from sympy import divisor_sigma, primefactors
    def A367176_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n: isprime(divisor_sigma(n)-(sum(primefactors(n))<<1)), count(max(startvalue,2)))
    A367176_list = list(islice(A367176_gen(),20)) # Chai Wah Wu, Nov 10 2023
  • SageMath
    def is_a(n): return is_prime(sum((-1)^is_prime(d)*d for d in divisors(n)))
    print([n for n in range(1, 10001) if is_a(n)])
    

Formula

k is a term if and only if A367175(k) is prime.

A114985 Numbers whose sum of distinct prime factors is semiprime.

Original entry on oeis.org

14, 21, 26, 28, 30, 33, 38, 46, 52, 56, 57, 60, 62, 63, 69, 70, 74, 76, 85, 90, 92, 93, 94, 98, 99, 102, 104, 105, 106, 112, 120, 124, 129, 133, 134, 140, 145, 147, 148, 150, 152, 166, 171, 174, 177, 178, 180, 182, 184, 188, 189, 190, 195, 196, 204, 205, 207, 208
Offset: 1

Views

Author

Jonathan Vos Post, Feb 22 2006

Keywords

Comments

This is the semiprime analog of A114522 "numbers n such that sum of distinct prime divisors of n is prime." See also A110893 "numbers with a semiprime number of prime divisors (counted with multiplicity)."

Examples

			a(1) = 14 because 14 = 2 * 7 and 2 + 7 = 9 = 3^2 is semiprime.
a(2) = 21 because 21 = 3 * 7 and 3 + 7 = 10 = 2 * 5 is semiprime.
a(3) = 26 because 26 = 2 * 13 and 2 + 13 = 15 = 3 * 5 is semiprime.
a(4) = 28 because 28 = 2^2 * 7 and 2 + 7 = 9 = 3^2 is semiprime.
a(5) = 30 because 30 = 2 * 3 * 5 and 2 + 3 + 5 = 10 = 2 * 5 is semiprime.
a(6) = 33 because 33 = 3 * 11 and 3 + 11 = 14 = 2 * 7 is semiprime.
a(7) = 38 because 38 = 2 * 19 and 2 + 19 = 21 = 3 * 7 is semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local A,s,B: A:=factorset(n): s:=sum(A[j],j=1..nops(A)): B:=factorset(s): if nops(B)=2 and B[1]*B[2]=s or nops(B)=1 and B[1]^2=s then n else fi end: seq(a(n),n=2..250); # Emeric Deutsch, Mar 07 2006
  • Mathematica
    Select[Range[250],PrimeOmega[Total[Transpose[FactorInteger[#]][[1]]]]==2&] (* Harvey P. Dale, May 06 2013 *)
  • PARI
    is(n)=bigomega(vecsum(factor(n)[,1]))==2 \\ Charles R Greathouse IV, Sep 14 2015

Formula

{k such that A008472(k) is an element of A001358}. {k such that sopf(k) is an element of A001358}. {k = Product(Prime(j)^e_j) such that Sum(Prime(j)) is in A001358}.

Extensions

Corrected and extended by Emeric Deutsch, Mar 07 2006

A380098 Numbers whose sum of cubes of distinct prime factors is prime.

Original entry on oeis.org

165, 210, 390, 399, 420, 462, 495, 561, 570, 595, 615, 630, 651, 780, 798, 825, 840, 924, 957, 1050, 1085, 1140, 1170, 1173, 1197, 1218, 1235, 1245, 1260, 1302, 1386, 1435, 1470, 1482, 1485, 1495, 1554, 1560, 1596, 1615, 1680, 1683, 1705, 1710, 1767, 1771, 1815, 1845, 1848, 1885, 1890, 1938, 1950, 1953
Offset: 1

Views

Author

Rafik Khalfi, Jan 12 2025

Keywords

Examples

			165=3*5*11 and 3^3 + 5^3 + 11^3 = 1483, which is prime. Therefore, 165 is included.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) local DPF: DPF:=factorset(n): if isprime(sum(DPF[j]^3, j=1..nops(DPF)))=true then n else fi end: seq(a(n), n=1..2000);
  • Mathematica
    Select[Range[2000], PrimeQ[Total[Transpose[FactorInteger[#]][[1]]^3]]&]
  • Python
    from sympy import isprime, factorint
    def ok(n): return isprime(sum(p**3 for p in factorint(n)))
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Jan 12 2025
Showing 1-9 of 9 results.