A193351 Numbers k such that A071324(k) is prime.
3, 4, 8, 9, 16, 18, 49, 50, 64, 81, 169, 225, 288, 324, 392, 578, 625, 729, 882, 900, 1024, 1458, 1568, 1936, 2304, 2450, 2592, 3042, 3136, 3200, 3362, 3600, 4096, 4489, 4802, 4900, 5000, 6241, 6272, 6400, 6962, 7744, 7938, 8100, 10082, 11025, 11552, 12996
Offset: 1
Keywords
Examples
169 is in the sequence because the divisors of 169 are 1, 13, 169 and 169 - 13 + 1 = 157 is prime.
Links
- Shreyansh Jaiswal, Table of n, a(n) for n = 1..1362 (terms 1..400 from Harvey P. Dale) [All terms upto 10^8]
Programs
-
Maple
with(numtheory):for n from 1 to 20000 do:x:=divisors(n):n1:=nops(x):s:=0: s:=sum('((-1)^(i+1))*x[n1-i+1]', 'i'=1..n1): if type(s,prime)=true then printf(`%d, `,n):else fi:od:
-
Mathematica
Select[Range[13000],PrimeQ[Total[Times@@@Partition[Riffle[ Reverse[ Divisors[ #]],{1,-1},{2,-1,2}],2]]]&] (* Harvey P. Dale, Feb 04 2015 *)
-
Python
from sympy import *; from functools import lru_cache cached_divisors = lru_cache()(divisors) def A071324(n): return sum(d if i%2==0 else -d for i, d in enumerate(reversed(cached_divisors(n)))) for n in range(1,13001): if isprime(A071324(n)): print(n, end=", ") # Shreyansh Jaiswal, Apr 17 2025
Comments