|
|
A130532
|
|
a(n) + a(n - 1) is alternatively a square or a cube, a(1) = 1.
|
|
1
|
|
|
1, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 1, 7, 2, 6, 3, 5, 4, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(1) = 1; a(2n) is a minimal positive m such that a(2n - 1) + m is a square, a(2n + 1) is a minimal positive m such that a(2n) + m is a cube. Sequence is periodic (apparently with the same period for any a(1)).
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=1, a(2)=3 because 1+3 is a square, a(3)=5 because 3+5 is a cube, a(4)=4 because 5+4 is a square, etc.
|
|
MATHEMATICA
|
b=1; s={b}; Do[Do[bi=b+i; If[IntegerQ[Sqrt[bi]], b=i; AppendTo[s, b]; Break[]], {i, 1000}]; c=b; Do[ci=c+i; If[IntegerQ[ci^(1/3)], c=i; Break[]], {i, 1000}]; AppendTo[s, c]; b=c, {100}]; s
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|