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

A195382 Numbers such that the difference between the sum of the even divisors and the sum of the odd divisors is prime.

Original entry on oeis.org

4, 8, 16, 18, 32, 50, 256, 512, 578, 1458, 2048, 3362, 4802, 6962, 8192, 10082, 15842, 20402, 31250, 34322, 55778, 57122, 59858, 167042, 171698, 293378, 524288, 559682, 916658, 982802, 1062882, 1104098, 1158242, 1195058, 1367858, 1407842, 1414562
Offset: 1

Views

Author

Michel Lagneau, Sep 17 2011

Keywords

Comments

Note that these are all even numbers. The odd numbers, producing the negative of a prime, are all squares whose square roots are in A193070. - T. D. Noe, Sep 19 2011

Examples

			The divisors of 18 are  { 1, 2, 3, 6, 9, 18}, and  (2 + 6 + 18) - (1 + 3 + 9) = 13  is prime. Hence 18 is in the sequence.
		

Crossrefs

Subsequence of A088827.

Programs

  • Maple
    with(numtheory):for n from 2 by 2 to 200 do:x:=divisors(n):n1:=nops(x):s1:=0:s2:=0:for m from 1 to n1 do:if irem(x[m],2)=1 then s1:=s1+x[m]:else s2:=s2+x[m]:fi:od: if type(s2-s1,prime)=true then printf(`%d, `,n): else fi:od:
  • Mathematica
    f[n_] := Module[{d = Divisors[n], p}, p = Plus @@ Select[d, OddQ] - Plus @@ Select[d, EvenQ]; PrimeQ[p]]; Select[Range[2,1000000,2], f] (* T. D. Noe, Sep 19 2011 *)
  • PARI
    list(lim)=my(v=List(),t);forstep(n=3,sqrt(lim\2),2,if(isprime(s=sigma(n^2)),listput(v,2*n^2)));t=2;while((t*=2)<=lim,if(isprime(2*sigma(t/2)-1),listput(v,t)));vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 18 2011

A278911 Odd numbers with prime sum of divisors.

Original entry on oeis.org

9, 25, 289, 729, 1681, 2401, 3481, 5041, 7921, 10201, 15625, 17161, 27889, 28561, 29929, 83521, 85849, 146689, 279841, 458329, 491401, 531441, 552049, 579121, 597529, 683929, 703921, 707281, 734449, 829921, 1190281, 1203409, 1352569, 1394761, 1423249, 1481089
Offset: 1

Views

Author

Jaroslav Krizek, Nov 30 2016

Keywords

Comments

Also odd numbers with prime number and sum of divisors; if the sum of divisors is prime, then the number of divisors is prime.
Values of prime sums are sorted in A247837.
Subsequence of A050150 (odd numbers with prime number of divisors).
Odd terms of A023194.
All terms are squares of the form p^e such that p is odd prime and e+1 is a prime.

Examples

			sigma(9) = 13 (prime).
		

Crossrefs

Programs

  • Magma
    [n: n in[2..10^7] | IsOdd(n) and IsPrime(SumOfDivisors(n)) and IsPrime(NumberOfDivisors(n))];
    
  • Maple
    N:= 10^7: # to get all terms <= N
    Ps:= select(isprime, [seq(i,i=3..floor(N^(1/2)),2)]):
    es:= map(`-`,select(isprime, [seq(i,i=3..floor(log[3](N))+1,2)]),1):
    Pes:= [seq(seq([p,e],p=Ps),e=es)]:
    filter:= proc(pe) local v; v:= (pe[1]^(pe[2]+1)-1)/(pe[1]-1); pe[1]^pe[2] <= N and isprime(v) end proc:
    sort(map(pe -> pe[1]^pe[2], select(filter, Pes))); # Robert Israel, Jan 22 2019
  • Mathematica
    Select[Range[1, 2*10^6, 2], PrimeQ@DivisorSigma[1, #] &] (* Michael De Vlieger, Dec 01 2016 *)
  • PARI
    isok(n) = (n % 2) && isprime(sigma(n)); \\ Michel Marcus, Dec 01 2016

Formula

a(n) = A193070(n)^2. - Michel Marcus, Dec 01 2016

A193071 Odd numbers N for which sigma(N^2) is not prime.

Original entry on oeis.org

1, 7, 9, 11, 13, 15, 19, 21, 23, 25, 29, 31, 33, 35, 37, 39, 43, 45, 47, 51, 53, 55, 57, 61, 63, 65, 67, 69, 73, 75, 77, 79, 81, 83, 85, 87, 91, 93, 95, 97, 99, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 127, 129, 133, 135, 137, 139, 141, 143, 145, 147
Offset: 1

Views

Author

M. F. Hasler, Jul 15 2011

Keywords

Comments

The function sigma(n) (=A000203(n)) takes odd values when n is a square or twice a square. Thus, odd numbers n for which sigma(n) is prime (cf. A023194) must be odd squares. This sequence gives the odd numbers whose square yields a composite sum of divisors (or 1).
This is the complement of A193070 in the odd numbers A005408.

Programs

  • Mathematica
    Select[Range[1,151,2],!PrimeQ[DivisorSigma[1,#^2]]&] (* Harvey P. Dale, Dec 13 2012 *)
  • PARI
    forstep(N=1, 1e7, 2, !isprime(sigma(N^2)) && print1(N", "))

Formula

A273459 Even numbers such that the sum of the odd divisors is a prime p and the sum of the even divisors is 2p.

Original entry on oeis.org

18, 50, 578, 1458, 3362, 4802, 6962, 10082, 15842, 20402, 31250, 34322, 55778, 57122, 59858, 167042, 171698, 293378, 559682, 916658, 982802, 1062882, 1104098, 1158242, 1195058, 1367858, 1407842, 1414562, 1468898, 1659842, 2380562, 2406818, 2705138, 2789522
Offset: 1

Views

Author

Michel Lagneau, May 30 2016

Keywords

Comments

a(n) is of the form 2q^2 where q is an odd numbers for which sigma(q^2) is prime (A193070).
The corresponding primes p are 13, 31, 307, 1093, 1723, 2801, 3541, 5113, 8011, 10303, 19531, 17293, 28057, 30941, 30103, 88741, 86143, 147073, 292561, 459007, 492103, 797161, 552793, 579883, 598303, 684757, 704761, 732541, 735307, 830833, 1191373, 1204507, ...
We observe an interesting property: each prime p is element of A053183 (primes of the form m^2 + m + 1 when m is prime) or element of A247837 (primes of the form sigma(2m-1) for a number m) or element of both A053183 and A247837.
Examples:
The numbers 13, 31, 307, 1723, 3541, 5113,... are in A053183;
The numbers 13, 31, 307, 1093, 1723, 2801, 3541,...are in A247837;
The numbers 13, 31, 307, 1723, 3541,... are in A053183 and A247837.

Examples

			18 is in the sequence because the divisors of 18 are {1, 2, 3, 6, 9, 18}. The sum of the odd divisors is 1 + 3 + 9 = 13 and the sum of the even divisors is 2 + 6 + 18 = 26 = 2*13.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 2 by 2  to 500000 do:
       y:=divisors(n):n1:=nops(y):s0:=0:s1:=0:
         for k from 1 to n1 do:
           if irem(y[k], 2)=0
            then
            s0:=s0+ y[k]:
            else
            s1:=s1+ y[k]:
          fi:
         od:
         ii:=0:
            if isprime(s1) and s0=2*s1
            then
            printf(`%d, `, n):
             else fi:
         od:
  • Mathematica
    Select[Range[2, 3000000, 2], And[PrimeQ[Total@ Select[#, EvenQ]/2], PrimeQ@ Total@ Select[#, OddQ]] &@ Divisors@ # &] (* Michael De Vlieger, May 30 2016 *)
    sodpQ[n_]:=Module[{d=Divisors[n],s},s=Total[Select[d,OddQ]];PrimeQ[ s] && Total[ Select[d,EvenQ]]==2s]; Select[Range[2,279*10^4,2],sodpQ] (* Harvey P. Dale, Dec 01 2020 *)
    2 * Select[Range[1, 1200, 2]^2, PrimeQ@DivisorSigma[1, #] &] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    is(n)=my(t); n%4==2 && issquare(n/2,&t) && isprime(n/2+t+1) \\ Charles R Greathouse IV, Jun 08 2016

Formula

a(n) >> n^2. - Charles R Greathouse IV, Jun 08 2016
a(n) = 2 * A278911(n) = 2 * A193070(n)^2. - Amiram Eldar, Jul 19 2022
Showing 1-4 of 4 results.