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-7 of 7 results.

A066938 Primes of the form p*q+p+q, where p and q are primes.

Original entry on oeis.org

11, 17, 23, 31, 41, 47, 53, 59, 71, 79, 83, 89, 107, 113, 127, 131, 151, 167, 179, 191, 227, 239, 251, 263, 269, 271, 293, 311, 359, 383, 419, 431, 439, 443, 449, 479, 491, 503, 521, 587, 593, 599, 607, 631, 647, 659, 683, 701, 719, 727, 743, 773, 809, 827
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 24 2002

Keywords

Comments

For p not equal to q, either p*q or p+q is odd, so their sum is odd.
The representation is ambiguous, e.g. 2*7+2+7 = 23 = 3*5+3+5.
Complement of A198273 with respect to A000040. - Reinhard Zumkeller, Oct 23 2011
None of these primes are in A158913 since if p*q+p+q is a prime, then sigma(p*q+p+q) = sigma(p*q). - Amiram Eldar, Nov 15 2021

Examples

			59 is in the sequence because 59 = 2 * 19 + 2 + 19.
		

Crossrefs

Programs

  • Haskell
    a066938 n = a066938_list !! (n-1)
    a066938_list = map a000040 $ filter ((> 0) . a067432) [1..]
    -- Reinhard Zumkeller, Oct 23 2011
    
  • Mathematica
    nn = 1000; n2 = PrimePi[nn/3]; Select[Union[Flatten[Table[(Prime[i] + 1) (Prime[j] + 1) - 1, {i, n2}, {j, n2}]]], # <= nn && PrimeQ[#] &]
  • PARI
    is(n)=fordiv(n+1,d,my(p=d-1,q=(n+1)/d-1); if(isprime(p) && isprime(q), return(isprime(n)))); 0 \\ Charles R Greathouse IV, Jul 23 2013

Formula

A067432(A049084(a(n))) > 0. - Reinhard Zumkeller, Oct 23 2011
A054973(a(n)+1) >= 2. - Amiram Eldar, Nov 15 2021

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A206036 Numbers m such that sigma(m) = sigma(k) has solution for distinct numbers m and k.

Original entry on oeis.org

6, 10, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 28, 30, 31, 33, 34, 35, 38, 39, 40, 41, 42, 44, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94
Offset: 1

Views

Author

Jaroslav Krizek, Feb 03 2012

Keywords

Examples

			6 and 11 are in the sequence because sigma(6) = sigma(11) = 12.
7 is not on the list because sigma(7) = 8 and there is no other integer for which sigma(n) = 8.
		

Crossrefs

Complement of A211656.

Programs

  • Mathematica
    max = 9000; sigmaList = Table[DivisorSigma[1, n], {n, Prime[PrimePi[max]]}]; Select[Range[Floor[Sqrt[max]]], Count[sigmaList, sigmaList[[#]]] > 1 &] (* Alonso del Arte, Feb 06 2012 *)
  • PARI
    is(k) = invsigmaNum(sigma(k)) > 1; \\ Amiram Eldar, Dec 15 2024, using Max Alekseyev's invphi.gp

A206447 Composite numbers n such that sigma(n) = sigma(d) has solution for some other composite number d.

Original entry on oeis.org

14, 15, 16, 20, 24, 25, 26, 28, 30, 33, 35, 38, 39, 40, 42, 44, 46, 48, 51, 54, 55, 56, 58, 60, 62, 65, 66, 68, 69, 70, 75, 77, 78, 80, 82, 84, 87, 88, 90, 92, 94, 95, 96, 99, 102, 104, 105, 108, 110, 112, 114, 115, 116, 118, 119, 120, 122, 123, 124, 125
Offset: 1

Views

Author

Jaroslav Krizek, Feb 07 2012

Keywords

Examples

			Composite numbers 14 and 15 are in sequence because sigma(14) = sigma(15) = 24.
		

Crossrefs

Programs

  • Maple
    N:= 500:
    Res:= {}: Q:= {}:
    for n from 4 to N do
      if isprime(n) then next fi;
      s:= numtheory:-sigma(n);
      if not assigned(V[s]) then
         V[s]:= n;
         if s > N then Q:= Q union {n} fi;
      else
         Res:= Res union {n,V[s]};
         if s > N then Q:= Q minus {V[s]} fi;
      fi
    od:
    convert(select(`<`,Res, min(Q)),list); # Robert Israel, Dec 17 2017
  • Mathematica
    t2 = Table[If[PrimeQ[n], 0, DivisorSigma[1, n]], {n, 1000}]; Select[Range[132], ! PrimeQ[#] && Length[Position[t2, t2[[#]]]] > 1 &] (* T. D. Noe, Feb 27 2012 *)

A248793 Sigma(n) - 1 for n such that sigma(n) - 1 is prime.

Original entry on oeis.org

2, 3, 5, 11, 7, 17, 11, 13, 23, 23, 17, 19, 41, 31, 23, 59, 41, 29, 71, 31, 47, 53, 47, 37, 59, 89, 41, 43, 83, 71, 47, 71, 97, 53, 71, 79, 89, 59, 167, 61, 103, 83, 67, 71, 73, 113, 139, 167, 79, 83, 223, 107, 131, 179, 89, 233, 167, 127, 251, 97, 101, 103
Offset: 1

Views

Author

Jaroslav Krizek, Nov 01 2014

Keywords

Comments

a(n) = corresponding values of primes p = sigma(A248792(n)) - 1, where A248792(n) = numbers n such that sigma(n) - 1 is prime.
If there are at least two numbers k, h such that a(k) = a(h) = p, then p is in A158913.

Crossrefs

Programs

  • Magma
    [a: n in [1..1000] | IsPrime(a) where a is SumOfDivisors(n)-1]
    
  • Maple
    F:= proc(n)
    local r;
    r:= numtheory:-sigma(n)-1;
    if isprime(r) then r else NULL fi
    end proc:
    seq(F(n),n=1..1000); # Robert Israel, Nov 02 2014
  • Mathematica
    a248793[n_Integer] :=
    Cases[DivisorSigma[1, #] - 1 & /@ Range[n], ?PrimeQ]; a248793[104] (* _Michael De Vlieger, Nov 07 2014 *)
  • PARI
    for(n=1,10^3,if(isprime(sigma(n)-1),print1(sigma(n)-1,", "))) \\ Derek Orr, Nov 01 2014

Formula

a(n) = A000203(A248792(n)) - 1.
If A248792(n) is a prime p, then a(n) = A248792(n) = p.

A261023 Least number k such that prime(n) = sigma(k) - k - 1.

Original entry on oeis.org

4, 9, 6, 10, 121, 22, 289, 34, 529, 841, 58, 1369, 30, 82, 2209, 42, 3481, 118, 4489, 5041, 70, 6241, 6889, 78, 9409, 10201, 202, 60, 214, 102, 16129, 17161, 18769, 84, 138, 298, 24649, 26569, 27889, 29929, 32041, 358, 36481, 238, 186, 394, 44521, 49729, 51529
Offset: 1

Views

Author

Paolo P. Lava, Aug 07 2015

Keywords

Comments

For any prime k <= p^2. In fact if k = p^2 we have that sigma(p) = sigma(p^2) - p^2, that is 1 + p = 1 + p + p^2 - p^2.

Examples

			sigma(2) = 3 and 4 is the least number such that sigma(4) - 4 = 7 - 4 = 3.
sigma(13) = 14 and 22 is the least number such that sigma(22) - 22 = 36 - 22 = 14.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,k,n; for n from 1 to q do
    if isprime(n) then for k from 1 to q do
    if sigma(n)=sigma(k)-k then print(k); break; fi; od;
    fi; od; end: P(10^9);
  • Mathematica
    Table[k = 1; While[DivisorSigma[1, Prime@ p] != DivisorSigma[1, k] - k, k++]; k, {p, 60}] (* Michael De Vlieger, Aug 07 2015 *)
  • PARI
    a(n) = my(k = 1, p = prime(n)); while(sigma(k)-k-1 != p, k++); k; \\ Michel Marcus, Aug 12 2015
    
  • PARI
    first(m)=my(v=vector(m),k);for(i=1,m,k=1;while(!(prime(i)==sigma(k)-k-1),k++);v[i]=k;);v; \\ Anders Hellström, Aug 14 2015

Formula

a(n) = A070015(A008864(n)). - Robert Israel, Aug 14 2015

A158914 Primes p such that there is a composite c with sigma_2(p)=sigma_2(c).

Original entry on oeis.org

7, 47, 157, 3863
Offset: 1

Views

Author

T. D. Noe, Mar 30 2009

Keywords

Comments

No other terms less than 10^8.
The corresponding composite numbers are 6, 40, 136, and 3352.
Is this sequence finite?
See A158913 for the sequence for sigma_1.
Terms 47, 157, 3863 are x values of solutions to Pell-Fermat equation x^2 - 85*y^2 = 84, where y is also prime and c = 8*y. For any other solution (x,y) formed by primes, x is a term. - Max Alekseyev, Jun 14 2025

Programs

  • Mathematica
    tp=DivisorSigma[2,Select[Range[4000],PrimeQ]]; tc=DivisorSigma[2,Select[Range[4000],!PrimeQ[ # ]&]]; Sqrt[Intersection[tp,tc]-1]

A206449 Values of sigma(p) of primes p such that sigma(p) = sigma(c) has a solution for some composite number c.

Original entry on oeis.org

12, 18, 24, 32, 42, 48, 54, 60, 72, 80, 84, 90, 98, 104, 108, 114, 128, 132, 140, 152, 168, 180, 182, 192, 224, 228, 234, 240, 252, 264, 270, 272, 294, 308, 312, 360, 384, 390, 420, 432, 434, 440, 444, 450, 468, 480, 492, 504, 522, 558, 570, 572, 588, 594, 600
Offset: 1

Views

Author

Jaroslav Krizek, Feb 07 2012

Keywords

Comments

Corresponding values of sigma(p) of primes p from A158913.

Crossrefs

Cf. A000203, A158913 (primes p such that there is a composite c with sigma(p)=sigma(c)), A206448 (values of sigma(c) of composite numbers c such that sigma(c) = sigma(d) has a solution for any other composite number d).

Programs

  • Mathematica
    Union@ Select[ DivisorSigma[1, Select[ Range@ 100, !PrimeQ@# &]], PrimeQ[# - 1] &] (* Robert G. Wilson v, Feb 09 2012 *)
  • PARI
    list(lim) = forprime(p = 1, lim, if(invsigmaNum(p+1) > 1, print1(p+1, ", "))); \\ Amiram Eldar, Dec 16 2024, using Max Alekseyev's invphi.gp

Formula

a(n) = A158913(n) + 1.
Showing 1-7 of 7 results.