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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135556 Squares of numbers not divisible by 3: a(n) = A001651(n)^2. 2
1, 4, 16, 25, 49, 64, 100, 121, 169, 196, 256, 289, 361, 400, 484, 529, 625, 676, 784, 841, 961, 1024, 1156, 1225, 1369, 1444, 1600, 1681, 1849, 1936, 2116, 2209, 2401, 2500, 2704, 2809, 3025, 3136, 3364, 3481, 3721, 3844, 4096, 4225, 4489, 4624, 4900 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

From Fermat's Little Theorem all these numbers are congruent to 1 mod 3.

LINKS

Colin Barker, Table of n, a(n) for n = 1..1000

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

FORMULA

G.f.: -x*(1+3*x+10*x^2+3*x^3+x^4) / ((1+x)^2*(x-1)^3). - R. J. Mathar, Feb 16 2011

From Colin Barker, Jan 26 2016: (Start)

a(n) = (18*n^2-6*(-1)^n*n-18*n+3*(-1)^n+5)/8.

a(n) = (9*n^2-12*n+4)/4 for n even.

a(n) = (9*n^2-6*n+1)/4 for n odd.

(End)

E.g.f.: (1/8)*( (3 + 6*x)*exp(-x) - 8 + (5 + 18*x^2)*exp(x)). - G. C. Greubel, Oct 19 2016

MATHEMATICA

LinearRecurrence[{1, 2, -2, -1, 1}, {1, 4, 16, 25, 49}, 25] (* or *) Table[(18*n^2-6*(-1)^n*n-18*n+3*(-1)^n+5)/8, {n, 1, 25}] (* G. C. Greubel, Oct 19 2016 *)

Flatten[Partition[Range[70], 2, 3, {1, 1}, {}]]^2 (* Harvey P. Dale, Jun 19 2018 *)

PROG

(PARI) isok(n) = issquare(n) && (n % 3 == 1); \\ Michel Marcus, Nov 02 2013

(PARI) Vec(-x*(1+3*x+10*x^2+3*x^3+x^4) / ( (1+x)^2*(x-1)^3 ) + O(x^100)) \\ Colin Barker, Jan 26 2016

CROSSREFS

Cf. A001651, A001082.

Partial sums of A298028.

Sequence in context: A214937 A235001 A087055 * A163095 A075576 A295921

Adjacent sequences:  A135553 A135554 A135555 * A135557 A135558 A135559

KEYWORD

nonn,easy

AUTHOR

Artur Jasinski, Nov 25 2007

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 November 13 20:57 EST 2019. Contains 329106 sequences. (Running on oeis4.)