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.

A227993 Let d(1) < d(2) < ... < d(q) denote the divisors of k. Sequence lists numbers k > 1 such that d(1)/d(2) + d(2)/d(3) + ... + d(q-1)/d(q) is an integer.

This page as a plain text file.
%I A227993 #38 Jan 14 2025 06:03:55
%S A227993 4,16,27,54,64,256,729,1024,1296,1536,3125,4096,6250,9375,12500,16384,
%T A227993 19683,30720,39366,65536,262144,472392,531441,823543,1048576,1179648,
%U A227993 1647086,2125764,3294172,4194304,6291456,6770688,9765625,11595672,14348907,16777216
%N A227993 Let d(1) < d(2) < ... < d(q) denote the divisors of k. Sequence lists numbers k > 1 such that d(1)/d(2) + d(2)/d(3) + ... + d(q-1)/d(q) is an integer.
%C A227993 The sequence is infinite because the powers of 4 (A000302) are in the sequence: the divisors of 2^(2m) are {1, 2, 4, 8, ..., 2^(2m)} and Sum_{i=1..q-1} d(i)/d(i+1) = 1/2 + 2/4 + 4/8 + ... + 2^(2m-1)/2^(2m) = 1/2 + 1/2 + ... + 1/2 = 2m.
%C A227993 The powers of 27 (A009971) are also in the sequence.
%C A227993 In the general case, the numbers of the form p^(p*m) where p is prime are in the sequence.
%H A227993 Amiram Eldar, <a href="/A227993/b227993.txt">Table of n, a(n) for n = 1..55</a>
%e A227993 54 is in the sequence because the divisors of 54 are {1, 2, 3, 6, 9, 18, 27, 54} and 1/2 + 2/3 + 3/6 + 6/9 + 9/18 + 18/27 + 27/54 = 4 is an integer.
%p A227993 with(numtheory):for n from 1 to 2000000 do: x:=divisors(n):n1:=nops(x): s:=sum('x[i]/x[i+1]', 'i'=1..n1-1): if s=floor(s)then printf(`%d, `, n):else fi:od:
%t A227993 fQ[n_] := Module[{d = Divisors[n]}, IntegerQ[Total[Most[d]/Rest[d]]]]; t = {}; n = 1; While[Length[t] < 40, n++; If[fQ[n], AppendTo[t, n]]]; t (* _T. D. Noe_, Aug 06 2013 *)
%o A227993 (PARI) is(n)=my(t,s);fordiv(n,d,s+=t/d;t=d);denominator(s)==1 && n>1 \\ _Charles R Greathouse IV_, Aug 06 2013
%o A227993 (Python)
%o A227993 from sympy import divisors
%o A227993 from fractions import Fraction
%o A227993 def ok(n):
%o A227993     if n < 2: return False
%o A227993     divs = divisors(n)
%o A227993     f = sum(Fraction(dn, dd) for dn, dd in zip(divs[:-1], divs[1:]))
%o A227993     return f.denominator == 1
%o A227993 print([k for k in range(70000) if ok(k)]) # _Michael S. Branicky_, Feb 06 2022
%Y A227993 Cf. A000302, A009971.
%K A227993 nonn
%O A227993 1,1
%A A227993 _Michel Lagneau_, Aug 06 2013