login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130532 a(n) + a(n - 1) is alternatively a square or a cube. 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

Table of n, a(n) for n=1..105.

FORMULA

a(n)=(1/90)*{-28*(n mod 10)+53*[(n+1) mod 10]-46*[(n+2) mod 10]+26*[(n+3) mod 10]+26*[(n+4) mod 10]-[(n+5) mod 10]+8*[(n+6) mod 10]+17*[(n+7) mod 10]-10*[(n+8) mod 10]+35*[(n+9) mod 10]}-5*{1-[(n+2) mod (n+1)]}, with n>=0. - Paolo P. Lava, Aug 31 2007

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

Sequence in context: A195132 A086181 A000655 * A019707 A197825 A077861

Adjacent sequences:  A130529 A130530 A130531 * A130533 A130534 A130535

KEYWORD

nonn

AUTHOR

Zak Seidov, Aug 08 2007

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 22 20:46 EDT 2013. Contains 225583 sequences.