login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A185273 Period 6: repeat [1, 6, 5, 6, 1, 0]. 1
1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6, 5, 6, 1, 0, 1, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The terms of this sequence are the units' digits of the nonzero square triangular numbers.

The coefficients of x in the numerator of the generating function are the terms that constitute the periodic cycle of the sequence.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

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

FORMULA

G.f.: x*(1+6*x+5*x^2+6*x^3+x^4) / ((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)).

a(n) = a(n-6) for n>6.

a(n) = 19 - a(n-1) - a(n-2) - a(n-3) - a(n-4) - a(n-5) for n>5.

a(n) = (1/3)*(sin(n*Pi/6))^2*(57+76*cos(n*Pi/3)+58*cos(2*n*Pi/3)+44*cos(n*Pi)+20*cos(4*n*Pi/3)).

a(n) = (1/45)*(17*(n mod 6)+47*((n+1) mod 6)+2*((n+2) mod 6)+17*((n+3) mod 6)-28*((n+4) mod 6)+2*((n+5) mod 6)). - Bruno Berselli, Jan 24 2012

EXAMPLE

The fourth nonzero square triangular number is 41616. As this has units' digit 6, we have a(4) = 6.

MAPLE

A185273:=n->[1, 6, 5, 6, 1, 0][(n mod 6)+1]: seq(A185273(n), n=0..100); # Wesley Ivan Hurt, Jun 18 2016

MATHEMATICA

LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 6, 5, 6, 1, 0}, 86]

PadRight[{}, 120, {1, 6, 5, 6, 1, 0}] (* Harvey P. Dale, Sep 22 2015 *)

PROG

(MAGMA) &cat[[1, 6, 5, 6, 1, 0]^^20]; // Wesley Ivan Hurt, Jun 18 2016

(PARI) a(n)=[0, 1, 6, 5, 6, 1][n%6+1] \\ Charles R Greathouse IV, Jul 17 2016

CROSSREFS

Cf. A001110.

Sequence in context: A195956 A336814 A019850 * A330065 A191220 A246673

Adjacent sequences:  A185270 A185271 A185272 * A185274 A185275 A185276

KEYWORD

nonn,easy

AUTHOR

Ant King, Jan 24 2012

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 May 17 00:16 EDT 2021. Contains 343957 sequences. (Running on oeis4.)