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!)
A121173 Sequence S with property that for n in S, a(n) = a(1) + a(2) +...+ a(n-1) and for n not in S, a(n) = n+1. 4
2, 2, 4, 8, 6, 22, 8, 52, 10, 114, 12, 240, 14, 494, 16, 1004, 18, 2026, 20, 4072, 22, 8166, 24, 16356, 26, 32738, 28, 65504, 30, 131038, 32, 262108, 34, 524250, 36, 1048536, 38, 2097110, 40, 4194260, 42, 8388562, 44, 16777168, 46, 33554382 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(1)=1 cannot happen, so the sequence S starts with a(1)=2.
Note that a(n)=a(1)+a(2)+...+a(n-1) can hold even if n is not in S. The smallest example is n=3.
All terms are even. - Reinhard Zumkeller, Nov 06 2013
LINKS
FORMULA
a(2*n) = A145654(n+1). - Reinhard Zumkeller, Nov 06 2013
a(2*n+1) = 2*n+2.
Conjectures from Colin Barker, Jan 30 2016: (Start)
a(n) = 2*(2^(n/2+1)-2)-n for n even.
a(n) = n+1 for n odd.
a(n) = -a(n-1)+3*a(n-2)+3*a(n-3)-2*a(n-4)-2*a(n-5) for n>5.
G.f.: 2*x*(1+2*x) / ((1-x)*(1+x)^2*(1-2*x^2)).
(End)
PROG
(Haskell)
a121173 n = a121173_list !! (n-1)
a121173_list = f 1 [] where
f x ys = y : f (x + 1) (y : ys) where
y = if x `elem` ys then sum ys else x + 1
-- Reinhard Zumkeller, Nov 06 2013
CROSSREFS
Sequence in context: A123958 A048572 A337561 * A160159 A283241 A101651
KEYWORD
nonn
AUTHOR
Max Alekseyev, Aug 15 2006
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 March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)