login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122061 First pentagonal number, 2nd hexagonal number, 3rd heptagonal number, 4th octagonal number and then repeat the same pattern: 5th pentagonal, 6th hexagonal, 7th heptagonal, 8th octagonal, etc. 1

%I #9 Jul 13 2015 21:53:29

%S 1,6,18,40,35,66,112,176,117,190,286,408,247,378,540,736,425,630,874,

%T 1160,651,946,1288,1680,925,1326,1782,2296,1247,1770,2356,3008,1617,

%U 2278,3010,3816,2035,2850,3744,4720,2501,3486,4558,5720,3015,4186,5452

%N First pentagonal number, 2nd hexagonal number, 3rd heptagonal number, 4th octagonal number and then repeat the same pattern: 5th pentagonal, 6th hexagonal, 7th heptagonal, 8th octagonal, etc.

%C From a quiz.

%D A. Wareham, Test Your Brain Power, Ward Lock Ltd (1995).

%H Harvey P. Dale, <a href="/A122061/b122061.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1).

%F a(n) = n*(3*n-1)/2 if n=1 mod 4 or n*(4*n-2)/2 if n=2 mod 4 or n*(5*n-3)/2 if n=3 mod 4 or n*(6*n-4)/2 if n=0 mod 4

%F a(n)=3*a(n-4)-3*a(n-8)+a(n-12) for n>11. - _Harvey P. Dale_, Mar 01 2015

%t fn[n_]:=Module[{r=Mod[n,4]},Which[r==1,(n(3n-1))/2,r==2,(n(4n-2))/2,r==3,(n(5n-3))/2,r==0,(n(6n-4))/2]]; Array[fn,50] (* or *) LinearRecurrence[ {0,0,0,3,0,0,0,-3,0,0,0,1},{1,6,18,40,35,66,112,176,117,190,286,408},50] (* _Harvey P. Dale_, Mar 01 2015 *)

%o (PARI) for(n=1,60,m=(n+3)%4;print1(n*((m+3)*n-m-1)/2,","))

%Y Cf. A060354.

%K nonn

%O 1,2

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 14 2006

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)