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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097602 a(n+1) = a(n) + number of squares so far; a(1) = 1. 6
1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 19, 22, 25, 29, 33, 37, 41, 45, 49, 54, 59, 64, 70, 76, 82, 88, 94, 100, 107, 114, 121, 129, 137, 145, 153, 161, 169, 178, 187, 196, 206, 216, 226, 236, 246, 256, 267, 278, 289, 301, 313, 325, 337, 349, 361, 374, 387, 400, 414, 428 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Conjecture: a(n) = m^2 iff m mod 3 > 0.

a(n) is a square iff n is congruent to {1, 4} mod 9. - Vladeta Jovovic, Aug 30 2004

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,0,1,-2,1).

FORMULA

a(9*n+1) = (3*n+1)^2; a(9*n+4) = (3*n+2)^2. - Vladeta Jovovic, Aug 30 2004

G.f.: x*(1+x^4-x^9+x^10)/((1+x+x^2)*(1+x^3+x^6)*(1-x)^3). - Vladeta Jovovic, Aug 30 2004

a(n+1) = a(n) + Sum_{k=1..n} A010052(a(k)). - Reinhard Zumkeller, Nov 15 2011

EXAMPLE

a(2) = a(1) + #{1} = 1 + 1 = 2;

a(3) = a(2) + #{1} = 2 + 1 = 3;

a(4) = a(3) + #{1} = 3 + 1 = 4;

a(5) = a(4) + #{1,4} = 4 + 2 = 6;

a(6) = a(5) + #{1,4} = 6 + 2 = 8;

a(7) = a(6) + #{1,4} = 8 + 2 = 10;

a(8) = a(7) + #{1,4} = 10 + 2 = 12;

a(9) = a(8) + #{1,4} = 12 + 2 = 14;

a(10) = a(9) + #{1,4} = 14 + 2 = 16;

a(11) = a(10) + #{1,4,16} = 16 + 3 = 19;

a(12) = a(11) + #{1,4,16} = 19 + 3 = 22.

MATHEMATICA

LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 19}, 70] (* G. C. Greubel, Jan 14 2019 *)

PROG

(Haskell)

a097602 n = a097602_list !! (n-1)

a097602_list = 1 : f 1 1 where

   f x c = y : f y (c + a010052 y) where y = x + c

-- Reinhard Zumkeller, Nov 15 2011

(PARI) my(x='x+O('x^70)); Vec(x*(1+x^4-x^9+x^10)/((1+x+x^2)*(1+x^3+x^6)*(1-x)^3)) \\ G. C. Greubel, Jan 14 2019

(MAGMA) m:=70; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( x*(1+x^4-x^9+x^10)/((1+x+x^2)*(1+x^3+x^6)*(1-x)^3) )); // G. C. Greubel, Jan 14 2019

(Sage) a=(x*(1+x^4-x^9+x^10)/((1+x+x^2)*(1+x^3+x^6)*(1-x)^3)).series(x, 70).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jan 14 2019

(GAP) a:=[1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 19];; for n in [12..70] do a[n]:= 2*a[n-1]-a[n-2]+a[n-9]-2*a[n-10]+a[n-11]; od; a; # G. C. Greubel, Jan 14 2019

CROSSREFS

Cf. A101135, A096777, A131073.

Sequence in context: A047894 A113769 A056865 * A126794 A011862 A122957

Adjacent sequences:  A097599 A097600 A097601 * A097603 A097604 A097605

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Aug 30 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 03:06 EST 2019. Contains 320364 sequences. (Running on oeis4.)