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!)
A167051 Start at 1, then add the first term (which is one here) plus 1 for the second term; then add the second term plus 2 for the third term; then add the third term to the sum of the first and second term; this gives the fourth term. Restart the sequence by adding 1 to the fourth term, etc. (From a sixth grade math extra credit assignment) 1

%I #8 Apr 14 2021 05:23:21

%S 1,2,4,7,8,10,25,26,28,79,80,82,241,242,244,727,728,730,2185,2186,

%T 2188,6559,6560,6562,19681,19682,19684,59047,59048,59050,177145,

%U 177146,177148,531439,531440,531442,1594321,1594322,1594324,4782967,4782968,4782970,14348905

%N Start at 1, then add the first term (which is one here) plus 1 for the second term; then add the second term plus 2 for the third term; then add the third term to the sum of the first and second term; this gives the fourth term. Restart the sequence by adding 1 to the fourth term, etc. (From a sixth grade math extra credit assignment)

%H Andrew Howroyd, <a href="/A167051/b167051.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = a(n-1) + 1 for n mod 3 == 2;

%F a(n) = a(n-1) + 2 for n mod 3 == 0;

%F a(n) = a(n-1) + a(n-2) + a(n-3) for n mod 3 == 1 and n > 1.

%F G.f.: x*(1 + 2*x + 4*x^2 + 3*x^3 - 6*x^5)/((1 - x)*(1 + x + x^2)*(1 - 3*x^3)). - _Andrew Howroyd_, Apr 13 2021

%o (PARI) seq(n)={my(a=vector(n)); a[1]=1; for(n=2, #a, my(t=n%3); a[n]=a[n-1]+if(t==2, 1, if(t==0, 2, a[n-2]+a[n-3]))); a} \\ _Andrew Howroyd_, Apr 13 2021

%o (PARI) Vec((1 + 2*x + 4*x^2 + 3*x^3 - 6*x^5)/((1 - x)*(1 + x + x^2)*(1 - 3*x^3)) + O(x^40)) \\ _Andrew Howroyd_, Apr 13 2021

%K nonn

%O 1,2

%A Chris Rice (cwrice(AT)research.att.com), Oct 27 2009

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 12:26 EDT 2024. Contains 371254 sequences. (Running on oeis4.)