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.

A275938 Numbers m such that d(m) is prime while sigma(m) is not prime (where d(m) = A000005(m) and sigma(m) = A000203(m)).

This page as a plain text file.
%I A275938 #20 Jul 25 2024 22:54:48
%S A275938 3,5,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59,61,67,71,73,79,81,83,
%T A275938 89,97,101,103,107,109,113,121,127,131,137,139,149,151,157,163,167,
%U A275938 169,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277
%N A275938 Numbers m such that d(m) is prime while sigma(m) is not prime (where d(m) = A000005(m) and sigma(m) = A000203(m)).
%C A275938 From _Robert Israel_, Aug 12 2016: (Start)
%C A275938 d(m) is prime iff m = p^k where p is prime and k+1 is prime.
%C A275938 For such m, sigma(m) = 1 + p + ... + p^k = (p*m-1)/(p-1).
%C A275938 The sequence contains 2^(q-1) for q in A054723,
%C A275938 3^(q-1) for q prime but not in A028491,
%C A275938 5^(q-1) for q prime but not in A004061,
%C A275938 7^(q-1) for q prime but not in A004063, etc.
%C A275938 In particular, it contains all odd primes. (End)
%H A275938 Robert Israel, <a href="/A275938/b275938.txt">Table of n, a(n) for n = 1..10000</a>
%F A275938 UNION of A000040 and A286095 (except for the term 2). - _Bill McEachen_, Jul 16 2024
%e A275938 49 is a term because A000005(49) = 3 is prime while sigma(49) = 57 is not.
%p A275938 N:= 1000: # to get all terms <= N
%p A275938 P:= select(isprime, {2,seq(p,p=3..N,2)}):
%p A275938 fp:= proc(p) local q,res;
%p A275938   q:= 2;
%p A275938   res:= NULL;
%p A275938   while p^(q-1) <= N do
%p A275938      if not isprime((p^q-1)/(p-1)) then res:= res, p^(q-1) fi;
%p A275938      q:= nextprime(q);
%p A275938   od;
%p A275938   res;
%p A275938 end proc:
%p A275938 sort(convert(map(fp, P),list)); # _Robert Israel_, Aug 12 2016
%o A275938 (PARI) lista(nn) = for(n=1, nn, if(isprime(numdiv(n)) && !isprime(sigma(n)), print1(n, ", ")));
%Y A275938 Cf. A000005, A000203, A004061, A004063, A009087, A023194, A028491.
%Y A275938 Cf. A000040, A286095.
%K A275938 nonn,easy
%O A275938 1,1
%A A275938 _Altug Alkan_, Aug 12 2016