A255576 Integers k such that Sum_{i=1..t-1} d(i)/d(i+1) is prime, where d(1), ..., d(t) are the divisors of k in ascending order.
16, 64, 729, 1024, 1536, 6250, 9375, 16384, 19683, 39366, 1179648, 4194304, 6770688, 9765625, 14348907, 29229255, 39062500, 67108864, 125000000, 128472708, 335544320, 1337982976, 10460353203
Offset: 1
Examples
64 is in the sequence because the divisors of 64 are {1, 2, 4, 8, 16, 32, 64} and 1/2 + 2/4 + 4/8 + 8/16 + 16/32 + 32/64 = 3 is prime.
Crossrefs
Subsequence of A227993.
Programs
-
Mathematica
Do[s=0;Do[s=s+Divisors[n][[i]]/Divisors[n][[i+1]],{i,1,Length[Divisors[n]]-1}];If[PrimeQ[s]&&!PrimeQ[n],Print[n]],{n,10^6}] Select[Range[40000],PrimeQ[Total[#[[1]]/#[[2]]&/@Partition[ Divisors[ #],2,1]]]&] (* The program generates the first 10 terms of the sequence. To generate more, increase the Range constant. *) (* Harvey P. Dale, Feb 06 2022 *)
-
Python
from sympy import isprime, divisors from fractions import Fraction def ok(n): divs = divisors(n) f = sum(Fraction(dn, dd) for dn, dd in zip(divs[:-1], divs[1:])) return f.denominator == 1 and isprime(f.numerator) print([k for k in range(1, 40000) if ok(k)]) # Michael S. Branicky, Feb 06 2022
Extensions
a(20) inserted and a(22)-a(23) from Michael S. Branicky, Feb 06 2022 using A227993
Comments