login
A092092
Back and Forth Summant S(n, _3): a(n) = Sum_{i=0..floor(2n/3)} (n-3i).
8
1, 1, 0, 3, 2, 0, 5, 3, 0, 7, 4, 0, 9, 5, 0, 11, 6, 0, 13, 7, 0, 15, 8, 0, 17, 9, 0, 19, 10, 0, 21, 11, 0, 23, 12, 0, 25, 13, 0, 27, 14, 0, 29, 15, 0, 31, 16, 0, 33, 17, 0, 35, 18, 0, 37, 19, 0, 39, 20, 0, 41, 21, 0, 43, 22, 0, 45, 23, 0, 47, 24, 0, 49, 25, 0, 51, 26, 0, 53, 27, 0, 55, 28
OFFSET
1,4
COMMENTS
The terms for n>1 can also be defined by: a(n)=0 if n==0 (mod 3), and otherwise a(n) equals the inverse of 3 in Z/nZ*. - José María Grau Ribas, Jun 18 2013
The subsequence of nonzero terms is essentially the same as A026741. - Giovanni Resta, Jun 18 2013
REFERENCES
F. Smarandache, Back and Forth Summants, Arizona State Univ., Special Collections, 1972.
LINKS
J. Dezert, editor, Smarandacheials, Mathematics Magazine, Aurora, Canada
FORMULA
a(3n) = 0; a(3n+1) = 2n+1; a(3n+2) = n+1.
G.f.: x*(1+x+x^3) / ( (x-1)^2*(1+x+x^2)^2 ). - R. J. Mathar, Jun 26 2013
a(n) = Sum_{k=1..n} k*( floor((3k-1)/n)-floor((3k-2)/n) ). - Anthony Browne, May 17 2016
MAPLE
f:= proc(n) local t;
t:= n mod 3;
if t = 0 then 0 elif t = 1 then 2/3*(n+1/2) else (n+1)/3 fi
end proc:
map(f, [$1..100]); # Robert Israel, May 19 2016
MATHEMATICA
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 1, 0, 3, 2, 0}, 100] (* Jean-François Alcover, Jun 04 2020 *)
PROG
(PARI) S(n, k=3) = local(s, x); s = n; x = n - k; while (x >= -n, s = s + x; x = x - k); s;
CROSSREFS
Other values of k: A000004 (k = 1, 2), A027656 (k = 4), A092093 (k = 5).
Cf. A226782 - A226787 for inverses of 4,5,6,.. in Z/nZ*.
Sequence in context: A331095 A138377 A021316 * A308179 A086800 A326296
KEYWORD
nonn,easy
AUTHOR
Jahan Tuten (jahant(AT)indiainfo.com), Mar 29 2004
EXTENSIONS
Edited and extended by David Wasserman, Dec 19 2005
STATUS
approved