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.

A247246 Differences of consecutive Achilles numbers.

This page as a plain text file.
%I A247246 #46 Feb 16 2025 08:33:23
%S A247246 36,92,88,104,40,68,148,27,125,64,104,4,153,27,171,29,20,196,232,144,
%T A247246 56,312,280,108,188,199,113,67,189,72,344,16,112,232,268,63,45,392,
%U A247246 292,32,76,8,80,587,50,147,456,184,288,488,115,772,137,36,40,212,248
%N A247246 Differences of consecutive Achilles numbers.
%C A247246 29 is the first prime in this sequence, and it equals 1352 - 1323. Clearly, if the difference is prime, then these two Achilles numbers must be relatively prime, so primes appear in this sequence rarely. However, are there infinitely many n such that a(n) is prime?
%C A247246 The number 1 can also appear in this sequence, because it equals 5425069448 - 5425069447 = (2^3 * 26041^2) - (7^3 * 41^2 * 97^2). Does every natural number appear in this sequence? If so, do they appear infinitely often?
%H A247246 Amiram Eldar, <a href="/A247246/b247246.txt">Table of n, a(n) for n = 1..10000</a>
%H A247246 Carlos Rivera, <a href="http://www.primepuzzles.net/problems/prob_053.htm">Problem 53</a>, The Prime Puzzles and Problems Connection.
%H A247246 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AchillesNumber.html">Achilles number</a>.
%H A247246 Wikipedia, <a href="http://en.wikipedia.org/wiki/Achilles_number">Achilles number</a>.
%F A247246 a(n) = A052486(n+1) - A052486(n).
%p A247246 f:= proc(n) local E; E:= map(t->t[2], ifactors(n)[2]); min(E)>1 and igcd(op(E))=1 end proc:
%p A247246 Achilles:= select(f, [$1..10^5]):
%p A247246 seq(Achilles[i+1]-Achilles[i],i=1..nops(Achilles)-1); # _Robert Israel_, Dec 13 2014
%t A247246 achillesQ[n_] := With[{ee = FactorInteger[n][[All, 2]]}, Min[ee] > 1 && GCD @@ ee == 1];
%t A247246 Select[Range[10^4], achillesQ] // Differences (* _Jean-François Alcover_, Sep 26 2020 *)
%o A247246 (PARI) isA052486(n) = { n>1 & vecmin(factor(n)[, 2])>1 & !ispower(n); }
%o A247246 lista(nn) = {v = select(n->isA052486(n), vector(nn, i, i)); vector(#v-1, n, v[n+1] - v[n]);} \\ _Michel Marcus_, Nov 29 2014
%o A247246 (Python)
%o A247246 from math import isqrt
%o A247246 from sympy import mobius, integer_nthroot
%o A247246 def A247246(n):
%o A247246     def squarefreepi(n):
%o A247246         return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
%o A247246     def bisection(f, kmin=0, kmax=1):
%o A247246         while f(kmax) > kmax: kmax <<= 1
%o A247246         while kmax-kmin > 1:
%o A247246             kmid = kmax+kmin>>1
%o A247246             if f(kmid) <= kmid:
%o A247246                 kmax = kmid
%o A247246             else:
%o A247246                 kmin = kmid
%o A247246         return kmax
%o A247246     def f(x):
%o A247246         c, l = n+x+1, 0
%o A247246         j = isqrt(x)
%o A247246         while j>1:
%o A247246             k2 = integer_nthroot(x//j**2,3)[0]+1
%o A247246             w = squarefreepi(k2-1)
%o A247246             c -= j*(w-l)
%o A247246             l, j = w, isqrt(x//k2**3)
%o A247246         c -= squarefreepi(integer_nthroot(x,3)[0])-l+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length()))
%o A247246         return c
%o A247246     return -(a:=bisection(f,n,n))+bisection(lambda x:f(x)+1,a,a) # _Chai Wah Wu_, Sep 10 2024
%Y A247246 Cf. A052486, A076446, A053289.
%K A247246 nonn,easy
%O A247246 1,1
%A A247246 _Eric Chen_, Nov 28 2014