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!)
A050092 a(n) = floor(a(n-1)/3) if this is positive and not yet in the sequence, otherwise a(n) = 7*a(n-1). 5

%I

%S 1,7,2,14,4,28,9,3,21,147,49,16,5,35,11,77,25,8,56,18,6,42,294,98,32,

%T 10,70,23,161,53,17,119,39,13,91,30,210,1470,490,163,54,378,126,882,

%U 6174,2058,686,228,76,532,177,59,19,133,44,308

%N a(n) = floor(a(n-1)/3) if this is positive and not yet in the sequence, otherwise a(n) = 7*a(n-1).

%H Ivan Neretin, <a href="/A050092/b050092.txt">Table of n, a(n) for n = 1..10000</a>

%t Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 3]], r, 7 #[[-1]]]] &, {0, 1}, 55] (* _Ivan Neretin_, Jul 31 2016 *)

%o (PARI) first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\3; if(t<2, v[i]=7*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=7*v[i-1]; next(2))); v[i]=t); v \\ _Charles R Greathouse IV_, Jul 31 2016

%Y Cf. A050000 and references therein.

%K nonn

%O 1,2

%A _Clark Kimberling_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 22 05:19 EST 2022. Contains 350481 sequences. (Running on oeis4.)