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!)
A319391 a(n) = (1 + 2)^3 + (4 + 5)^6 + (7 + 8)^9 + (10 + 11)^12 + ... + (up to n). 1
1, 3, 27, 31, 36, 531468, 531475, 531483, 38443890843, 38443890853, 38443890864, 7355865955277484, 7355865955277497, 7355865955277511, 2954320062416788976127, 2954320062416788976143, 2954320062416788976160, 2154028838712789034859190336 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{i=1..n} (floor(i/3)-floor((i-1)/3))*(6*floor((i+2)/3)-3)^(3*floor((i+2)/3)) + i*(floor((i-1)/3)-floor((i-2)/3))+i*(floor((i+1)/3)-floor(i/3))-(6*floor((i+2)/3)-3)*(floor(i/3)-floor((i-1)/3)).
If 3|n then a(n) = a(n-3)+(2*n-3)^n, otherwise a(n) = a(n-1)+n. - Robert Israel, Oct 05 2018
EXAMPLE
a(1) = 1;
a(2) = 1 + 2 = 3;
a(3) = (1 + 2)^3 = 27;
a(4) = (1 + 2)^3 + 4 = 31;
a(5) = (1 + 2)^3 + 4 + 5 = 36;
a(6) = (1 + 2)^3 + (4 + 5)^6 = 531468;
a(7) = (1 + 2)^3 + (4 + 5)^6 + 7 = 531475;
a(8) = (1 + 2)^3 + (4 + 5)^6 + 7 + 8 = 531483;
a(9) = (1 + 2)^3 + (4 + 5)^6 + (7 + 8)^9 = 38443890843;
a(10) = (1 + 2)^3 + (4 + 5)^6 + (7 + 8)^9 + 10 = 38443890853; etc.
MAPLE
f:= proc(n) option remember;
if n mod 3 = 0 then procname(n-3)+(2*n-3)^n
else procname(n-1)+n
fi
end proc:
f(0):= 0:
map(f, [$1..20]); # Robert Israel, Oct 05 2018
MATHEMATICA
Table[Sum[(Floor[i/3] - Floor[(i - 1)/3])*(6*Floor[(i + 2)/3] - 3)^(3*Floor[(i + 2)/3]) + i*(Floor[(i - 1)/3] - Floor[(i - 2)/3]) + i*(Floor[(i + 1)/3] - Floor[i/3]) - (6*Floor[(i + 2)/3] - 3)*(Floor[i/3] - Floor[(i - 1)/3]), {i, n}], {n, 20}]
CROSSREFS
Sequence in context: A284863 A121068 A136895 * A034594 A077533 A175545
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 18 2018
STATUS
approved

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 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)