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.

A376222 Numbers k such that Sum_{i=1..q-1} d(i)^i is prime, where d(1) are the q divisors of k.

This page as a plain text file.
%I A376222 #17 Oct 16 2024 21:54:32
%S A376222 4,21,27,39,57,77,183,189,203,205,219,237,253,371,387,391,417,489,565,
%T A376222 611,655,667,669,675,687,749,767,799,831,849,897,921,955,1007,1047,
%U A376222 1135,1189,1207,1349,1371,1379,1407,1421,1461,1469,1497,1513,1569,1633,1643,1659
%N A376222 Numbers k such that Sum_{i=1..q-1} d(i)^i is prime, where d(1)<d(2)<...<d(q) are the q divisors of k.
%C A376222 The corresponding primes are in A376223.
%e A376222 39 is a term because the 3 first divisors of 39 are {1,3,13} and 1^1 + 3^2 + 13^3 = 2207 is prime.
%e A376222 189 is a term since the 7 first divisors of 189 are {1, 3, 7, 9, 21, 27, 63} and 1^1+3^2+7^3+9^4+21^5+27^6+63^7 = 3939372150671 is prime.
%p A376222 with(numtheory):nn:=1700:
%p A376222 for n from 1 to nn do:
%p A376222 d:=divisors(n):n0:=nops(d):s:=sum(‘d[k]^k’, ‘k’=1..n0-1):
%p A376222    if isprime(s)
%p A376222     then
%p A376222      printf(`%d,`,n):
%p A376222     else
%p A376222    fi:
%p A376222 od:
%t A376222 Select[Range[1700],PrimeQ[Sum[Part[Divisors[#],i]^i,{i,DivisorSigma[0,#]-1}]] &] (* _Stefano Spezia_, Sep 16 2024 *)
%o A376222 (PARI) isok(k) = my(d=divisors(k)); isprime(sum(j=1, #d-1, d[j]^j)); \\ _Michel Marcus_, Sep 16 2024
%Y A376222 Cf. A180852, A376223.
%K A376222 nonn
%O A376222 1,1
%A A376222 _Michel Lagneau_, Sep 16 2024