Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A130532
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A130532 a(n) + a(n - 1) is alternatively a square or a cube. +0
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; listen)
OFFSET

1,2

COMMENT

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)).

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 (ppl(AT)spl.at), 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: A081361 A086181 A000655 this_sequence A019707 A077861 A076308

Adjacent sequences: A130529 A130530 A130531 this_sequence A130533 A130534 A130535

KEYWORD

nonn

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), Aug 08 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 24 12:00 EDT 2008. Contains 142294 sequences.


AT&T Labs Research