|
|
A251966
|
|
Numbers representable as both b^c - b + c and x^y + x - y, where b, c, x, y are integers greater than 1.
|
|
1
|
|
|
4, 14, 18, 27, 123, 256, 3125, 6556, 6566, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 95367431640610, 95367431640640, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Terms that are not in A000312: 14, 18, 123, 6556, 6566, 95367431640610, 95367431640640.
Sequence is infinite.
If a, b > 1 and b^a+b == 0 mod a+1 then b^c-b+c is a term for c = ab(b^(a-1)+1)/(a+1), y = c/a, x = b^a.
If b > 1 and b <> 1 mod 3, then b^(2b(b+1)/3)+b(2b-1)/3 is a term.
If b > 2, then b^((b-1)(b^(b-2)+1))-b+(b-1)(b^(b-2)+1) is a term.
For a(n) with n > 1, either c>=3 or y>=3. If c=y=2, we get b^2-b+2=x^2+x-2, i.e.(x+b)(x-b+1) = 4.
Since x>1 and b>1 the only solution is x=b=2 which corresponds to the term a(1) = 4.
This allows for a faster search algorithm by assuming c>=3 and y>=3. The cases c=2 and y>=3 can be dealt with by picking y>=3 and solving for b in the quadratic equation b^2-b+2=x^y+x-y. Similarly for c>=3 and y=2.
(End)
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = 123 = 2^7 + 2 - 7 = 5^3 - 5 + 3.
|
|
MATHEMATICA
|
Clear[b0, c0, x0, y0]; m = 100; max = 2^m; tb = Flatten[Table[b0[bc = b^c - b + c ] = b; c0[bc] = c; bc, {b, 2, m}, {c, 2, m}]]; tx = Flatten[Table[x0[xy = x^y + x - y] = x; y0[xy] = y; xy, {x, 2, m}, {y, 2, m}]]; inter = Intersection[Select[tb, # <= max &], Select[tx, # <= max &]]; Table[Print[n = inter[[k]], " b = ", b0[n], " c = ", c0[n], " x = ", x0[n], " y = ", y0[n]]; n, {k, Length[inter]}] (* Jean-François Alcover, Mar 23 2015 *)
|
|
PROG
|
(Python)
TOP = 10000000
a = [0]*TOP
for y in range(2, TOP//2):
if 2**y+2-y>=TOP: break
for x in range(2, TOP//2):
k = x**y+x-y
if k>=TOP: break
if k>=0: a[k]=1
for y in range(2, TOP//2):
if 2**y-2+y>=TOP: break
for x in range(2, TOP//2):
k = x**y-x+y
if k>=TOP: break
if k>=0: a[k]|=2
print([n for n in range(TOP) if a[n]==3])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|